{"id":24905659,"url":"https://github.com/gambosuraj/ecommerce-website","last_synced_at":"2026-04-09T23:03:21.506Z","repository":{"id":274925363,"uuid":"924511127","full_name":"GamboSuraj/ecommerce-website","owner":"GamboSuraj","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 ","archived":false,"fork":false,"pushed_at":"2025-02-08T22:03:45.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T23:18:39.863Z","etag":null,"topics":["expressjs","forgetpassword","material-ui","mongodb","node","react","react-router","redux-toolkit"],"latest_commit_sha":null,"homepage":"https://mern-ecommerce-frontend-gamma.vercel.app/login","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/GamboSuraj.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":"2025-01-30T06:19:59.000Z","updated_at":"2025-02-08T22:03:48.000Z","dependencies_parsed_at":"2025-01-30T07:33:37.958Z","dependency_job_id":null,"html_url":"https://github.com/GamboSuraj/ecommerce-website","commit_stats":null,"previous_names":["gambosuraj/ecommerce-website"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamboSuraj%2Fecommerce-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamboSuraj%2Fecommerce-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamboSuraj%2Fecommerce-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamboSuraj%2Fecommerce-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GamboSuraj","download_url":"https://codeload.github.com/GamboSuraj/ecommerce-website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245931756,"owners_count":20695958,"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":["expressjs","forgetpassword","material-ui","mongodb","node","react","react-router","redux-toolkit"],"created_at":"2025-02-02T00:23:51.353Z","updated_at":"2026-04-09T23:03:16.460Z","avatar_url":"https://github.com/GamboSuraj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ecommerce-website\n\n**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# **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\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgambosuraj%2Fecommerce-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgambosuraj%2Fecommerce-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgambosuraj%2Fecommerce-website/lists"}