A complete e-commerce website EasyCart with database integration, featuring product management, shopping cart, user authentication and more.
-
User Management
- User registration and authentication
- Profile management
- Address book
-
Product Catalog
- Product categories and brands
- Product details with images
- Search and filter functionality
-
Shopping Experience
- Shopping cart
- Wishlist
- Order tracking
-
Admin Dashboard
- Product management (CRUD)
- Category management
- Brand management
- Order management
- User management
E-comm/
βββ admin/ # Admin panel files
β βββ index.html # Admin dashboard
β βββ manage-products.html
β βββ manage-categories.html
β βββ manage-brands.html
β βββ manage-orders.html
β βββ insert-product.html
β βββ insert-category.html
β βββ insert-brand.html
βββ api/ # Backend API endpoints
β βββ delete_*.php # Delete operations
β βββ get_*.php # Data retrieval
β βββ insert_*.php # Create operations
β βββ update_*.php # Update operations
β βββ login.php # User authentication
β βββ register.php # User registration
βββ css/ # Stylesheets
βββ images/ # Static assets
βββ js/ # Frontend JavaScript
β βββ app.js
β βββ datastore.js
βββ config.php # Database configuration
βββ database_schema.sql # Complete database schema
βββ index.html # Main storefront
βββ login.php # Login page
βββ register.php # Registration page
βββ README.md # This file
- users - User accounts and profiles
- addresses - Shipping/billing addresses
- products - Product catalog with pricing and inventory
- categories - Product categories with hierarchical support
- brands - Product brands and manufacturers
- cart - Shopping cart items
- orders - Order management
- order_items - Individual order line items
- product_images - Product image gallery
- wishlist - User wishlists
- Normalized schema (3NF)
- Referential integrity with foreign key constraints
- Indexed columns for better query performance
- Timestamps for tracking record changes
-- Create database
CREATE DATABASE easycart_db;
-- Import schema
SOURCE database_schema.sql;
-- Import sample data
SOURCE sample_data.sql;- Update
config/database.phpwith your database credentials:private $host = 'localhost'; private $db_name = 'easycart_db'; private $username = 'your_username'; private $password = 'your_password';
- Ensure PHP 7.4+ is installed
- Enable PDO and PDO_MySQL extensions
- Set up Apache/Nginx to serve PHP files
- Ensure
uploads/directory is writable
php setup.phpGET api/products.php- Get all productsGET api/products.php?featured=true- Get featured productsGET api/products.php?categories=true- Get categoriesGET api/products.php?brands=true- Get brandsGET api/products.php?id=1- Get single product
GET api/cart.php- Get cart itemsGET api/cart.php?count=true- Get cart countPOST api/cart.php- Add item to cartPUT api/cart.php- Update cart itemDELETE api/cart.php?cart_id=1- Remove from cart
POST api/auth.php- Login/Register/LogoutGET api/auth.php?user=true- Get current userPUT api/auth.php- Update profile
The website uses JavaScript to dynamically load content:
- Dynamic Product Loading - Products loaded from database
- Real-time Cart Updates - Cart count and total updates
- Search Functionality - Live search as you type
- Category/Brand Filtering - Filter products by category or brand
- User Authentication - Login/logout functionality
- Responsive Notifications - User feedback for actions
EasyCartApp- Main application class- Handles all API calls and DOM updates
- Manages user sessions and cart state
- Top Navigation - Logo, menu items, cart, search
- Secondary Navigation - User status, login/logout
- Sidebar - Categories and brands for filtering
- Product Cards - Image, name, description, price
- Add to Cart - Dynamic cart updates
- View More - Product details (expandable)
- Cart Icon - Shows item count
- Total Price - Dynamic price calculation
- Cart Management - Add/remove/update items
- Password Hashing - Secure password storage
- SQL Injection Prevention - Prepared statements
- Input Validation - Server-side validation
- Session Management - Secure user sessions
- CSRF Protection - Token-based protection
The database includes comprehensive sample data:
- 5 Users with complete profiles
- 9 Categories with hierarchical structure
- 9 Brands with logos and descriptions
- 9 Products with images and details
- Sample Orders with order items
- Product Reviews with ratings
- Coupons for testing discounts
- Admin Users for management
- Clone/Download the project files
- Set up MySQL database and import schema
- Configure database credentials
- Run setup script for initial configuration
- Test the website functionality
- Customize products, categories, and branding
- Add product images to
images/directory - Insert product data into database
- Products will automatically appear on website
- Modify
style.cssfor custom styling - Update Bootstrap classes in HTML
- Customize JavaScript behavior in
js/app.js
- Add new categories/brands in database
- Modify product structure as needed
- Add custom fields to tables
The website is fully responsive and works on:
- Desktop - Full feature set
- Tablet - Optimized layout
- Mobile - Touch-friendly interface
- Product Catalog - Browse all products
- Search & Filter - Find products easily
- Shopping Cart - Add/remove items
- User Accounts - Registration and profiles
- Order Management - Track orders
- Reviews & Ratings - Customer feedback
- Coupons - Discount codes
- Admin Panel - Manage products and orders
The database structure supports analytics:
- Sales Reports - Revenue tracking
- Product Performance - Best sellers
- Customer Analytics - User behavior
- Inventory Management - Stock tracking
This project is ideal for DBMS coursework because it includes:
- Complex Database Design - 15 interconnected tables
- Real-world Relationships - E-commerce business logic
- Advanced Queries - Joins, subqueries, aggregations
- Performance Optimization - Indexes and triggers
- Data Integrity - Constraints and validations
- Complete Documentation - ER diagrams and documentation
For questions or issues:
- Check the database documentation
- Review the setup instructions
- Verify database connection
- Check PHP error logs
Created by: Relational Minds Development Team
Version: 1.0
Last Updated: November 2025