-
Clone the Repository
git clone https://github.com/sammy429b/ECOM-MERN.git cd ECOM-MERN -
Install Dependencies
Frontend
cd Client npm installBackend
cd ../Server npm install -
Set Up Environment Variables
Create
.envfiles in both theclientandserverdirectories with the necessary environment variables. Refer.env.examplefiles for required variables. -
Start the Application
Backend
cd Server npm run devFrontend
cd ../Client npm run dev
- Project Setup:
- Initialized the frontend with React.js and TypeScript.
- Set up the backend with Node.js, Express.js, and TypeScript.
- Database Design:
- Used MongoDB for storing user data.
- Utilized Redis for managing OTPs.
- Authentication Service:
- Implemented JWT for secure token-based authentication.
- Created routes for user registration, login, OTP verification, and password management.
- Used bcrypt for secure password hashing.
- Email Notifications:
- Integrated Nodemailer for sending automated email notifications for password resets.
- API Integration:
- Connected frontend to backend using Axios for API calls.
- Managed authentication state in React using the context API.
- Responsive UI Design:
- Developed a responsive UI with React.js and Shadcn.