Welcome to this full-stack e-commerce web application, a comprehensive project built from the ground up to demonstrate a complete MERN stack implementation. This platform provides a modern, intuitive, and secure online shopping experience for users, alongside a powerful and easy-to-use dashboard for administrators.
The goal of this project was to engineer a robust, real-world application that handles everything from user authentication and product discovery to state management and order processing, showcasing a deep understanding of both frontend and backend development principles.
- Product Discovery: A clean and responsive interface to browse, search, and filter products across various categories.
- Shopping Cart: Fully persistent cart functionality allowing users to add, remove, and manage items.
- User Account Management: Secure user registration, login, and a personal profile page to view order history.
- Secure Authentication: User sessions are managed securely using JSON Web Tokens (JWT) for protected routes and actions.
- Order Processing: A streamlined, multi-step process for securely placing orders.
- Dedicated Admin Dashboard: A separate, secure interface for site management.
- Content Management: Full CRUD (Create, Read, Update, Delete) capabilities for products.
- Real-time Inventory Control: Easily manage product stock, pricing, and details, with changes reflected instantly on the site.
This project was built using the MERN stack and other modern web technologies.
- React.js
- Redux Toolkit (for global state management)
- Tailwind CSS
- Node.js
- Express.js (for building RESTful APIs)
- MongoDB
- RESTful APIs
- JWT (JSON Web Tokens)
To get a local copy up and running, follow these simple steps.
- Node.js installed on your machine
- npm or yarn
- MongoDB instance (local or cloud)
-
Clone the repository
git clone <YOUR_REPOSITORY_URL>
-
Navigate to the backend directory and install dependencies
cd server npm install
-
Create a
.env
file in theserver
directory and add the following environment variables:PORT=8080 MONGO_URI=<YOUR_MONGODB_CONNECTION_STRING> JWT_SECRET=<YOUR_JWT_SECRET>
-
Navigate to the frontend directory and install dependencies
cd ../client npm install
-
Start the backend server
# From the 'server' directory npm start
-
Start the frontend development server
# From the 'client' directory npm start
The application should now be running on your local machine.
The backend serves a RESTful API for all data transactions. [cite: 14] Key responsibilities include:
- User Authentication: Endpoints for user registration, login, and profile updates, protected with JWT middleware.
- Product Catalog Management: API routes for fetching, creating, updating, and deleting products.
- Order Processing: Secure endpoints to handle the creation and retrieval of user orders.