A Next.js template with firebase user authentication implemented to quickly get you started with your project
- PWA: A progressive web app so you can also install and use it as a desktop app
- Firebase Auth: Contains all the code you may need to setup user sign up and login features in your project
- State Management: State Management with
ReduxReact's Context API - Prettier: Integrated Prettier to easily format the code with
npm run format
- MIT Licensed: Free to use for personal and commercial use
- Create a firebase project first then create a web app in that project.
- Once you have done this, you will get some config keys like API key, auth domain, etc. Make sure you save it somewhere.
- Click on Authentication from the left sidebar, go to
Sign-in method
and enableEmail/Password
.
- Either fork the repo or click on the
Use this template
button to create a new repository with this template. - Now clone the repo, open it in your preferred code editor, and install all the dependencies using
npm install
. - Create a
.env.local
file in the root directory and paste the following in there.
NEXT_PUBLIC_Firebase_API_Key=YOUR_API_KEY_GOES_HERE
NEXT_PUBLIC_Auth_Domain=YOUR_AUTH_DOMAIN_GOES_HERE
NEXT_PUBLIC_Project_Id=YOUR_PROJECT_ID_GOES_HERE
NEXT_PUBLIC_Storage_Bucket=YOUR_STORAGE_BUCKET_GOES_HERE
NEXT_PUBLIC_Message_Sender_Id=YOUR_MESSAGE_SENDER_ID_GOES_HERE
NEXT_PUBLIC_App_Id=YOUR_APP_ID_GOES_HERE
- Replace the values above with the keys you got when you set up the web app. (Firebase Setup #2)
- Now open your terminal and type in
npm run dev
to start the server.
Make sure you read the contributing guidelines before opening a PR.
I have curated a detailed list of all the open-source projects I have authored. Do take out a moment and take a look.
- MIT © Saad Irfan
- Code of Conduct