A complete Django e-commerce application featuring an AI-powered recommendation system with Cython-optimized performance. This project demonstrates full-stack expertise, with a robust backend, responsive UI, and an intelligent recommendation engine that adapts to user behavior.
- Product Catalog: Modern listing and detail pages.
- Dynamic Shopping Cart: Real-time AJAX updates, add/remove items.
- User Authentication: Login, logout, and secure session management.
- Mock Checkout: Records purchases to improve recommendations.
- Image Handling: Products include image uploads managed via Django Admin.
- Content-Based Filtering: Products represented as vectors from attributes (tags).
- "You May Also Like": Cosine Similarity suggests similar products on detail pages.
- "Recommended for You": Personalized recommendations for logged-in users based on interaction history.
- Real-time Feedback: Likes and purchases instantly update user preference profiles.
- Optimized Cosine Similarity: Heavy computation re-implemented in Cython for high performance.
- Fallback Mechanism: Pure Python implementation ensures compatibility if Cython module is missing.
- Scalable & Efficient: Faster recommendations on large datasets.
- Backend: Django 5, Python 3.10+
- Database: SQLite (development)
- AI / Data Science:
- NumPy & Pandas: Efficient matrix and data handling.
- Content-Based Filtering: Product recommendation algorithm.
- Performance: Cython 3.0 for optimized similarity calculations.
- Frontend:
- HTML5, CSS3, responsive design (Flexbox & Grid).
- Vanilla JavaScript for dynamic AJAX interactions.
- Python 3.10+
pipandvenv
git clone https://github.com/your-username/ecommerce-project.git
cd ecommerce-project# Create and activate the virtual environment
python3 -m venv venv
source venv/bin/activate
# On Windows, use:
# venv\Scripts\activateInstall all required packages from requirements.txt.
pip install -r requirements.txtTo enable the high-performance recommendation engine, build the Cython extension.
python setup.py build_ext --inplaceIf you skip this step, the application will automatically use the slower Python fallback.
Run the standard Django migrations to create the database schema.
python manage.py migrateThis account is needed to access the Django Admin to manage products and images.
python manage.py createsuperuserFollow the prompts to set a username and password.
A management command is provided to populate the database with sample products, users, and interaction data.
python manage.py load_demo_dataDemo User Credentials: The loader creates several users. You can log in with:
- Username:
alice - Password:
password
You are now ready to launch the application!
python manage.py runserverThe e-commerce site will be available at http://127.0.0.1:8000/.
The Django Admin panel will be at http://127.0.0.1:8000/admin/.
| Product Detail Page | Dynamic Shopping Cart |
|---|---|
| Modern Login Page | Checkout Confirmation |
This project is licensed under the MIT License - feel free to use, modify, and distribute it.