{"id":14957636,"url":"https://github.com/rishibakshii/mern-ecommerce","last_synced_at":"2025-05-16T12:03:17.669Z","repository":{"id":210571420,"uuid":"726579419","full_name":"RishiBakshii/mern-ecommerce","owner":"RishiBakshii","description":"Modern e-commerce built with best practices in mind. MERN stack, Redux Toolkit for state management, Material UI for a delightful UI, and RESTful APIs for seamless integration. Dive in and explore!","archived":false,"fork":false,"pushed_at":"2025-03-14T16:22:21.000Z","size":2535,"stargazers_count":239,"open_issues_count":8,"forks_count":101,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T06:19:13.552Z","etag":null,"topics":["async-thunk","bcryptjs","cors","express-js","forgot-password","http-only-cookies","jwt-authentication","lottie-animation","material-ui","mern","mongodb","mongoose","node-js","otp-verification","react","react-hook-form","react-router","redux-toolkit","restful-api","role-based-permissions"],"latest_commit_sha":null,"homepage":"https://mern-ecommerce-frontend-gamma.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RishiBakshii.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T19:20:51.000Z","updated_at":"2025-04-11T16:20:59.000Z","dependencies_parsed_at":"2023-12-12T12:24:19.424Z","dependency_job_id":"41e55585-7f91-4306-a6a7-9e08cc75d8e8","html_url":"https://github.com/RishiBakshii/mern-ecommerce","commit_stats":{"total_commits":315,"total_committers":3,"mean_commits":105.0,"dds":"0.022222222222222254","last_synced_commit":"1947e9f0e6dd851e2f7d97d6d5b3ff38264c0cab"},"previous_names":["rishibakshii/mern-auth-reduxtoolkit","rishibakshii/mern-ecommerce-reduxtoolkit","rishibakshii/mern-ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishiBakshii%2Fmern-ecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishiBakshii%2Fmern-ecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishiBakshii%2Fmern-ecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishiBakshii%2Fmern-ecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RishiBakshii","download_url":"https://codeload.github.com/RishiBakshii/mern-ecommerce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525195,"owners_count":21118628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-thunk","bcryptjs","cors","express-js","forgot-password","http-only-cookies","jwt-authentication","lottie-animation","material-ui","mern","mongodb","mongoose","node-js","otp-verification","react","react-hook-form","react-router","redux-toolkit","restful-api","role-based-permissions"],"created_at":"2024-09-24T13:15:16.475Z","updated_at":"2025-04-12T06:19:24.905Z","avatar_url":"https://github.com/RishiBakshii.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## MERN Ecommerce: A Seamless Shopping Experience Powered by the MERN Stack, Redux Toolkit, and Material UI\n\n### Also try -\u003e [https://mernchat.in](https://mernchat.in)\n### ```Note✨: I have another amazing project on``` [end-to-end-encrypted-chat-application](https://github.com/RishiBakshii/mern-chat) ```using Next.js, Prisma, Postgresql, Express, Socket.io.```\n\n**MERN Ecommerce** is a full-stack application designed to transform your online shopping experience. Built with the MERN stack (MongoDB, Express.js, React, Node.js), it leverages Redux Toolkit for efficient state management and Material UI for a sleek, user-friendly interface. This project offers a robust platform for both users and admins, packed with essential features for a seamless experience.\n\n![ecommerce-homepage](https://github.com/RishiBakshii/mern-ecommerce/blob/main/frontend/src/assets/images/front.png?raw=true)\n\u003c!-- ![ecommerce-banner](https://github.com/RishiBakshii/mern-ecommerce/blob/main/frontend/src/assets/images/banner4.jpg?raw=true) --\u003e\n![ecommerce-banner](https://github.com/RishiBakshii/mern-ecommerce/blob/main/frontend/src/assets/images/banner3.jpg?raw=true)\n\n\n# **Features**\n\n### **User:**\n- **Product Reviews:**\n  - Write, edit, and delete reviews.\n  - Instant updates on ratings and star percentages.\n  \n- **Wishlist:**\n  - Add, remove, and annotate products with personalized notes.\n  \n- **Order Management:**\n  - Create new orders and view order history.\n  \n- **Profile Management:**\n  - Manage email, username, and multiple addresses.\n  \n- **Shopping Cart:**\n  - Add products, adjust quantities, and view subtotals.\n\n### **Admin:**\n- **Product Management:**\n  - Add, edit, delete, and soft-delete products.\n  - Manage product attributes like name and stock.\n  \n- **Order Management:**\n  - View and update order details and status.\n\n### **Security \u0026 User Experience:**\n- **Secure Authentication:**\n  - Login, signup, OTP verification, password reset, and logout.\n\n- **Intuitive Interface:**\n  - Powered by Material UI for a visually appealing and user-friendly experience.\n\n### **Scalability:**\n- **Built for Growth:**\n  - Scalable architecture to handle increasing user demands.\n\n\n# **Project Setup**\n\n### Prerequisites\n- Node.js ( version v21.1.0 or later )\n- MongoDB installed and running locally\n\n### Clone the project\n\n```bash\n  git clone https://github.com/RishiBakshii/mern-ecommerce.git\n```\n\n### Navigate to the project directory\n\n```bash\n  cd mern-ecommerce\n```\n\n### Install dependencies for frontend and backend separately\n**Tip:** To efficiently install dependencies for both frontend and backend simultaneously, use split terminals.\n\nInstall frontend dependencies\n```bash\ncd frontend\nnpm install\n```\n\nInstall backend dependencies\n\n```bash\ncd backend\nnpm install\n```\n\n\n### Environment Variables\n**Backend**\n- Create a `.env` file in the `backend` directory.\n- Add the following variables with appropriate values\n```bash\n# Database connection string\nMONGO_URI=\"mongodb://localhost:27017/your-database-name\"\n\n# Frontend URL (adjust if needed)\nORIGIN=\"http://localhost:3000\"\n\n# Email credentials for sending password resets and OTPs\nEMAIL=\"your-email@example.com\"\nPASSWORD=\"your-email-password\"\n\n# Token and cookie expiration settings\nLOGIN_TOKEN_EXPIRATION=\"30d\"  # Days\nOTP_EXPIRATION_TIME=\"120000\"  # Milliseconds\nPASSWORD_RESET_TOKEN_EXPIRATION=\"2m\"  # Minutes\nCOOKIE_EXPIRATION_DAYS=\"30\"    # Days\n\n# Secret key for jwt security\nSECRET_KEY=\"your-secret-key\"\n\n# Environment (production/development)\nPRODUCTION=\"false\" # Initially set to false for development\n```\n\n**Frontend**\n- Create a `.env` file in the `frontend` directory\n- Add the following variable:\n```bash\n# Backend URL (adjust if needed)\nREACT_APP_BASE_URL=\"http://localhost:8000\" \n```\n\n**Important**\n- Replace all placeholders (e.g., your_database_name, your_email) with your actual values.\n- Exclude the `.env` file from version control to protect sensitive information.\n\n### Data seeding\n- **Get started quickly with pre-populated data**: Populate your database with sample users, products, reviews, and carts, enabling you to test functionalities without manual data entry.\n\n**Steps**:\n- Open a new terminal window.\n- Navigate to the `backend` directory: `cd backend`\n- Run the seeding script: `npm run seed` ( This script executes the `seed.js` file within the `seed` subdirectory equivalent to running `node seed/seed.js` )\n### Running Development Servers\n\n**Important:**\n\n- **Separate terminals**: Run the commands in separate terminal windows or use `split terminal` to avoid conflicts.\n- **Nodemon required**: Ensure you have `nodemon` installed globally to run the backend development servers using `npm run dev`. You can install it globally using `npm install -g nodemon`.\n\n#### Start the backend server\n- Navigate to the `backend` directory: `cd backend`\n- Start the server: `npm run dev` (or npm start)\n- You should see a message indicating the server is running, usually on port 8000.\n     \n#### Start the frontend server:\n- Navigate to the `frontend` directory: `cd frontend`\n- Start the server: `npm start`\n- You should see a message indicating the server is running, usually on port 3000.\n\n### Login with demo account (Optional)\n- After successfully seeding the database, you can now explore the application's functionalities using pre-populated sample data.\n- here are the `login credentials`\n```bash\n  email: demo@gmail.com\n  pass: helloWorld@123\n```\n\n- **Please Note**: While the demo account provides a convenient way to explore many features, it has some limitations:\n    - **Password Reset and OTP Verification**: Due to security reasons, the demo account uses a non-real email address. Therefore, password reset and OTP verification functionalities are not available for this account.\n\n    **What this means**:\n    - You cannot request a password reset or receive verification codes on the demo email address.\n    - To test password reset and OTP verification flows, you need to create a genuine account with a valid email address.\n\n    **What to do?**\n    - If you're primarily interested in exploring other functionalities like wishlist, cart, and order history, the demo account is sufficient.\n    - To test password reset and OTP verification, create a personal account with a valid email address.\n### Accessing the Application\nOnce both servers are running, you can access them at the following URL's:\n- Backend: http://localhost:8000\n- Frontend: http://localhost:3000\n\n## **Bonus**\nDon't forget to star the repository and share your feedback!✨\n\n## Authors\n- [@RishiBakshii](https://github.com/RishiBakshii)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishibakshii%2Fmern-ecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishibakshii%2Fmern-ecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishibakshii%2Fmern-ecommerce/lists"}