🚀 Live Demo: https://aelaf-mart.onrender.com/
A high-performance, futuristic e-commerce platform built with Django 6.0, Tailwind CSS, and PostgreSQL (Neon). AELAF MART features an advanced AI Shopping Assistant powered by LangChain and Groq (Llama 3.3), providing real-time inventory-aware recommendations and persistent conversation memory.
- Key Features
- Technical Architecture
- Tech Stack
- Getting Started
- Environment Variables
- Development Workflow
- RAG-Powered Conversations: The assistant (Llama-3.3-70b) has real-time access to the store's inventory to help users find exactly what they need.
- Persistent Memory: Uses
PostgresChatMessageHistoryvia LangChain to remember user preferences and past interactions across sessions. - Sleek Widget: A futuristic, floating chat interface with real-time typing indicators.
- Social Login: Integrated Google OAuth 2.0 via
django-allauthfor seamless onboarding. - Custom Adapters: Intelligent account linking for users with existing emails.
- Persistent Shopping Cart: Add/remove items with real-time total calculation.
- Item Discovery: Dynamic filtering by categories with neon-accented hover states.
- Full Item CRUD: Sellers can easily manage their listings with a premium dashboard interface.
- Stripe Integration: Production-ready checkout session flow for secure transaction processing.
- Post-Purchase Automation: Mark items as SOLD automatically and notify both parties.
The platform follows a modular Django architecture integrated with a cloud-native database and an AI reasoning layer.
graph TD
User((User)) -->|HTTPS| Django[Django 6.0 App]
Django -->|ORM| Postgres[(Postgres - Neon)]
Django -->|Context| LangChain[LangChain Engine]
LangChain -->|Llama-3.3 API| Groq[Groq Cloud AI]
LangChain -->|History| Postgres
Django -->|Stripe API| Stripe((Stripe Payments))
Django -->|OAuth| Google((Google Auth))
Django -->|Media Storage| Cloudinary((Cloudinary Storage))
Django -->|Static Delivery| WhiteNoise[WhiteNoise]
- Item: Name, description, price, category, status (is_sold), and Cloudinary-backed media.
- Profile: User-specific data including bio, phone, and Cloudinary-hosted avatars.
- SiteConfiguration: Dynamic brand management (Logo, Favicon, Site Name) via Admin.
- Order: Tracks Stripe payment intents and transaction status.
- Backend: Django 6.0.2 & Python 3.10+
- AI Engine: LangChain & Groq (Llama-3.3-70b-versatile)
- Database: PostgreSQL (Neon Cloud)
- Media Storage: Cloudinary (Persistent & Optimized)
- Static Delivery: WhiteNoise (Edge-ready assets)
- Payments: Stripe API
- Styling: Tailwind CSS (Modern Glassmorphic UI)
- Auth: django-allauth & Google OAuth
- Clone & Setup Venv:
git clone <repository-url> cd Online_Market_Place python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
- Install Dependencies:
pip install -r requirements.txt
- Environment Setup: (Create a
.envfile based on the template below) - Run Migrations:
python manage.py migrate
- Start Dev Server:
python manage.py runserver
Create a .env file in the root directory:
# Django Settings
SECRET_KEY="your-secret-key"
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
# Database (Neon Postgres)
DATABASE_URL=postgresql://user:pass@ep-host.aws.neon.tech/neondb?sslmode=require
# AI Assistant
GROQ_API_KEY="gsk_..."
# Social Auth
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Stripe Payments
STRIPE_PUBLIC_KEY="pk_test_..."
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."- AI Features: The chatbot logic resides in
chatbot/views.py. It uses a custom RAG (Retrieval-Augmented Generation) flow to fetch store items. - Styling: Tailwind is used for all UI components. Visual changes should follow the established Glassmorphism design pattern.
- Migrations: Always run
python manage.py makemigrationsandmigrateafter updating models.