This repository contains a full-stack E-Commerce application developed primarily as a practical implementation for a Database Systems course. While the frontend features a clean and straightforward design, the core emphasis of this project is on robust database architecture, data management, and efficient backend interactions.
It serves as a hands-on demonstration of how real-world applications handle complex data retrieval, storage, and relationships efficiently.
- Database Design & Structure: Architecting a relational database to handle interconnected entities like users, products, carts, and orders.
- Backend Logic & Query Handling: Writing efficient SQL queries to seamlessly bridge the Express.js server and the database.
- Data Retrieval & Storage: Ensuring reliable CRUD (Create, Read, Update, Delete) operations for real-world e-commerce scenarios.
- Product Management: Full capabilities to add, update, and delete products from the database.
- Catalog & Browsing: Product viewing and inventory management.
- Shopping Cart & Checkout: Reliable add-to-cart functionality and order processing logic.
- User Operations: Foundational user handling mapped to relational data.
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Backend: Node.js, Express.js
- Database: MySQL
Follow these steps to run the project on your local machine:
1. Clone the repository
git clone [https://github.com/YourUsername/YourRepoName.git](https://github.com/YourUsername/YourRepoName.git)
cd YourRepoName
**2. Install Dependencies**
Bash
npm install
**3. Database Setup**
Open your MySQL Workbench or preferred database manager.
Locate the .sql files inside the backend/database/ folder.
Execute the SQL scripts to recreate the database schemas (tables for users, products, cart, orders, etc.).
**4. Environment Variables**
Create a .env file in the root directory and add your local database credentials:
Plaintext
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=your_database_name
PORT=3000
**5. Start the Server**
Bash
node backend/server.js