Welcome to TechBay, a modern eCommerce application built with the MERN stack! This is a portfolio project that showcases a professional online shopping experience for technology and electronics, featuring product listings, user authentication, and secure online payments. The backend is powered by Express and MongoDB, while the frontend leverages React, Redux, and Bootstrap for a responsive user interface.
- Create new orders.
- Payment functionality using PayPal sandbox.
- Retrieve all orders made by a logged-in user.
- Fetch specific order details by order ID.
- Update order status to 'paid'.
- Update order status to 'delivered'.
- Admin functionality to view all orders.
- Fetch all products with pagination and search functionality.
- Retrieve details of a specific product by its ID.
- Admin functionality to create a new product with default sample data.
- Admin functionality to update product details.
- Admin functionality to delete a product.
- Users can post reviews for products.
- Top-rated products featured on a product carousel.
- User authentication using json web tokens.
- Register a new user.
- Logout functionality that clears the authentication cookie.
- Fetch and update the profile of the logged-in user.
- Admin functionality to fetch all users.
- Admin functionality to fetch a user by ID.
- Admin functionality to delete a user.
- Admin functionality to update user details.
-
Navigate to the root directory and install dependencies:
npm install
-
Set up your environment variables in a .env file in the root directory:
MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret PAYPAL_CLIENT_ID=your_paypal_client_id
-
Populate the database with sample data:
npm run data:import
-
Start the backend server:
npm run server
-
Navigate to the frontend directory and install dependencies:
cd frontend && npm install
-
Start the frontend development server:
npm start
- From the root directory, you can run both frontend and backend concurrently:
npm run dev



