This project is a basic login authentication system designed to provide a secure, user-friendly interface for user registration, authentication, and secure storage of user-uploaded photos. It is built using the MERN stack (MongoDB, Express.js, React.js, Node.js) on the backend and utilizes React and Redux Toolkit for the frontend. The system implements advanced encryption techniques for password security, token-based authentication, and rigorous error handling to ensure reliability.
- Stack: MERN (MongoDB, Express.js, React.js, Node.js)
- Description: The application allows users to securely sign up and log in. It utilizes bcrypt for hashing passwords, ensuring that user credentials are securely stored and handled. The system provides robust authentication mechanisms to protect against unauthorized access.
- Frontend Technologies: React.js, Redux, Redux Toolkit
- Description: Token-based authentication is implemented to maintain secure user sessions. Upon successful login, an authentication token is generated and stored securely. Session management is handled through cookies, which have expiration settings to automatically terminate expired sessions, ensuring that user access remains secure at all times.
- Technology: Cloudinary
- Description: The system uses Cloudinary for securely storing user-uploaded images. Cloudinary's secure storage protocols ensure that all images are protected with top-notch security measures, giving users confidence that their data is safe.
- Description: Comprehensive error handling mechanisms are in place to effectively manage various scenarios such as invalid user input, server errors, and connection issues. The system is thoroughly tested to cover both positive and negative cases, ensuring that it remains reliable under different conditions and handles exceptions gracefully.
- Node.js: Ensure that Node.js is installed on your machine.
- MongoDB: Install MongoDB locally or set up a MongoDB Atlas account for cloud-based storage.
- Cloudinary: Create an account on Cloudinary for secure image storage.
To get started, clone the repository:
git clone https://github.com/your-username/project-name.git
- Navigate to the project directory:
cd project-name
- Navigate to the frontend directory:
cd frontend
- Install frontend dependencies:
npm install
- Start the frontend development server:
npm start
- Navigate to the backend directory:
cd ../backend
- Install backend dependencies:
npm install
- Set up environment variables:
Create a
.env
file in thebackend
directory and configure the following variables:
- MONGO_URI=your_mongo_db_connection_string
- CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
- CLOUDINARY_API_KEY=your_cloudinary_api_key
- CLOUDINARY_API_SECRET=your_cloudinary_api_secret
- JWT_SECRET=your_jwt_secret
- Start the backend development server:
npm run dev
Once both frontend and backend servers are running, open your browser and navigate to http://localhost:3000
to access the application.
- Frontend: React.js, Redux, Redux Toolkit, Axios
- Backend: Node.js, Express.js, MongoDB, Mongoose
- Security: Bcrypt, JWT (JSON Web Token)
- Storage: Cloudinary for image storage
- Testing: Jest, React Testing Library (optional)
Feel free to fork this project and submit pull requests. For significant changes, please open an issue first to discuss what you would like to modify.