This project is an eCommerce website built using Next.js for the frontend and Node.js for the backend. It provides a robust platform for users to browse products, manage their cart, and complete purchases. The site includes features such as user authentication, product management, and order processing.
- Product Catalog: Browse and search for products.
- Shopping Cart: Add and remove items from the cart.
- User Authentication: Sign up, log in, and manage user profiles.
- Order Management: Place orders, view order history, and manage shipping information.
- Promo Codes: Apply promo codes for discounts.
- Frontend: Next.js, React, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT)
- Payment Integration: (e.g., Stripe, PayPal) - if applicable
- Node.js and npm installed
- MongoDB server running (local or remote)
-
Clone the Repository
git clone https://github.com/your-username/your-repository.git
-
Navigate to the Project Directory
cd frontend cd node_backend
-
Install Dependencies
npm install
-
Set Up Environment Variables Create a .env file in the root of your project and add the following environment variables:
MONGO_URI=your_mongodb_connection_string secretkey=your_jwt_secret_key
Adjust the variables based on your environment and configuration.
-
Run the Application
Start Frontend
npm run dev
Start Backend
node server.js
Or
nodemon
- Sign Up: Navigate to the registration page and create an account.
- Log In: Use the login page to authenticate and access user-specific features.
- Browse Products: View the product catalog and filter items.
- Add to Cart: Add items to your cart for purchase.
- Checkout: Review cart items, enter shipping information, and place an order.
- View Orders: Access your order history and details.
- Enter Promo Code: Apply promo codes during checkout to receive discounts.