A full-stack e-commerce platform for gaming products, built with a Node.js + Express backend and a React + Vite frontend. The application facilitates product browsing, cart management, checkout, user authentication, order placement, notifications, reviews, and includes an admin dashboard for managing products, users, orders, and store operations.
- Project Title
- Badges
- Description
- Table of Contents
- Features
- Tech Stack
- File Structure Overview
- Prerequisites
- Installation
- Usage / Getting Started
- Configuration
- API Reference
- Contributing
- License
- Author/Acknowledgements
- Contact
- Browse games and accessories
- View product details and technical info
- Add products to a cart
- Create and manage delivery addresses
- Checkout with order validation
- View order details after purchase
- Receive notifications related to orders and account activity
- Submit reviews and ratings for products
- Email OTP verification during authentication workflows
- View dashboard statistics
- Manage user roles and account status
- Ban or unban users
- Add, update, and view products
- Upload product images to Cloudinary
- Review product stock and availability
- Send notifications to users from the admin panel
- Manage orders and user reviews
- React 19
- Vite
- TypeScript
- React Router
- Redux Toolkit
- Tailwind CSS
- MUI components
- Axios
- React Hot Toast
- Framer Motion
- Node.js
- Express.js
- TypeScript
- MongoDB + Mongoose
- JWT authentication
- Bcrypt password hashing
- Cloudinary image uploads
- Nodemailer email sending
- Express rate limiting
Game_Store_MERN/
├── Backend/
│ ├── src/
│ │ ├── config/
│ │ ├── Middleware/
│ │ ├── Models/
│ │ ├── Routes/
│ │ ├── types/
│ │ ├── utils/
│ │ └── index.ts
│ ├── package.json
│ ├── tsconfig.json
│ └── .env.example
├── Frontend/
│ ├── src/
│ ├── public/
│ ├── package.json
│ ├── vite.config.ts
│ ├── tsconfig.json
│ └── index.html
├── docs/
│ └── workflow.md
├── .gitignore
├── LICENSE
└── README.md
Before running the project locally, ensure you have:
- Node.js v18+ or newer
- npm or yarn
- MongoDB running locally or a MongoDB Atlas connection string
- Cloudinary account for product image uploads
- Gmail account with an app password for email sending
-
Clone the repository:
git clone https://github.com/Ali1180-uni/Game_Store_MERN.git cd Game_Store_MERN -
Install backend dependencies:
cd Backend npm install -
Install frontend dependencies:
cd ../Frontend npm install
cd Backend
npm run devThe backend runs with tsx watch, automatically restarting during development when files change. It typically runs on http://localhost:5000.
cd Frontend
npm run devThe frontend usually runs on http://localhost:5173.
Backend build:
cd Backend
npm run build
npm startFrontend build:
cd Frontend
npm run buildTo preview the production frontend build:
npm run previewCreate a .env file in the Backend folder and populate it with your environment variables. An example file .env.example is provided:
MONGODB_URI=mongodb://127.0.0.1:27017/game-store
JWT_SECRET=your_jwt_secret_here
OTP_SECRET=your_otp_secret_here
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
USER=your_email@gmail.com
PASS=your_google_app_passwordFrontend Configuration:
If your frontend needs a custom API base URL, create a .env file in the Frontend directory:
VITE_API_URL=http://localhost:5000The backend exposes several API groups:
POST /auth/registerPOST /auth/login
GET /productsGET /products/:id
GET /reviews/:productIdPOST /reviews
GET /addressesPOST /addresses
POST /ordersGET /orders/:id
GET /notificationsPATCH /notifications/:id/read
POST /otp/sendPOST /otp/verify
GET /admin/statsGET /admin/usersPATCH /admin/users/:id/banPATCH /admin/users/:id/roleGET /admin/productsPOST /admin/productsPUT /admin/products/:idPATCH /admin/products/:id/stockDELETE /admin/products/:id
Most protected endpoints require a valid JWT token.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
Please ensure your code adheres to the project's coding standards and includes relevant tests.
Distributed under the MIT License. See the LICENSE file for more information.
Ali1180-uni - Initial work