Provides a solid foundation for building authenticated web experiences using MongoDB, Express, React, and Node.js having Sign In, Sign Up, Profile, Home, About pages where user can sign in through google or local account
- UI: React
- Routing: React Router
- Backend: Express
- Database: MongoDB
- ORM: Mongoose
- Image hosting: Firebase
- Robust Authentication: Secure user signup, login, and logout with JWT (JSON Web Token) implementation.
- Protected Routes: Control access to sensitive data with designated routes accessible only to authenticated users.
- React Front-End: Build a dynamic and interactive user interface using React and React Router for client-side routing.
- Node.js Back-End: Handle server-side logic and API communication with Express.js
- MongoDB Database: Store your application's data efficiently and flexibly with MongoDB.
Clone the repo to your local machine using https://github.com/naumanbutt2002/mern-auth
Install npm dependencies in both mern-auth/client
and mern-auth
subdirectories using npm install
mern-auth$ npm install
mern-auth$ cd client
mern-auth/client$ npm install
Add .env file in mern-auth with variables:
MONGO= 'Your MONGODB connection string'
JWT_SECRET='Any type of letters or keys of your choice'
Add .env file in mern-auth/client with variables:
VITE_FIREBASE_API_KEY="Your Firebase API Key"
Run the server and client
mern-auth$ npm run dev
mern-auth$ cd client
mern-auth/client$ npm run dev
Set up a MongoDB database either locally or online via MongoDB Atlas
Create a Firebase Account
Create a new project on Google Cloud Platform
You can get in touch with me on my LinkedIn Profile:
You can also follow my GitHub Profile to stay updated about my latest projects: Github
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
The project is licensed under the MIT