A Django-based e-commerce platform for plants, featuring product management, order processing, AI plant chat, community blog, and a full custom admin dashboard.
- Browse and search products by name, description, or category
- Filter by price range, eco-friendly status, and stock availability
- Sort by name, price, or newest
- Product detail page with related products and recently viewed
- Low stock alerts (auto-notifies admin when stock ≤ 5)
- Eco-friendly product tagging
- Add to cart with quantity and stock validation
- Cart management (update, remove items)
- Checkout with saved shipping address selection
- Order tracking by order number + email (no login required)
- Order history and detailed order view
- Cancel orders (pending/processing only with stock restoration)
- Razorpay integration
- Dummy card payment
- Cash on Delivery, PayPal, Bank Transfer
- Payment status tracking (pending, completed, failed, refunded)
- Admin can process refunds with automatic stock restoration
- Register, login, logout
- Role-based access: Admin and Customer
- Profile with picture, bio, and display name
- Multiple saved addresses (Home, Work, Billing, Shipping, Other)
- Password reset via token (24-hour expiry)
- Create and browse blog posts (Gardening Tips, DIY, Plant Care, Sustainability, etc.)
- Comment on blog posts
- Upload video posts (file or YouTube/Vimeo URL) with thumbnails
- Community hub with recent blogs and videos
- AI-powered plant care assistant using Google Gemini API
- Ask questions about plant care and gardening
- Redirects off-topic questions back to plants
- Real-time messaging between customers and admin
- Unread message count and read receipts
- Customer profile info visible to admin
- In-app notifications for customers (order updates, welcome, etc.)
- Admin notifications (new orders, low stock, new users, etc.)
- Mark as read, dismiss, unread count badge
- Overview stats: products, users, orders, monthly revenue
- Manage products and categories (add, edit, delete)
- Manage orders and update order status
- Manage users (create, edit, activate/deactivate, delete)
- Manage blog posts and video content
- Analytics dashboard with date range selection, revenue trends, top products, sales by category
- Export reports as CSV (orders, revenue, customers, products)
- Manage payments with filtering and refund processing
- Configure Google AI API key from the dashboard
- Python / Django 4.2
- MySQL
- Razorpay (payments)
- Google Generative AI / Gemini (plant AI chat)
- Pillow (image handling)
- python-dotenv
- Clone the repo
- Create a virtual environment and install dependencies:
pip install -r requirements.txt
- Copy
.env.exampleto.envand fill in your values:cp .env.example .env
- (Optional) Create the MySQL database automatically:
python create_database.py
- Run migrations:
python manage.py migrate
- Create default roles:
python create_roles.py
- Create a superuser:
python manage.py createsuperuser
- Collect static files:
python manage.py collectstatic
- Start the development server:
python manage.py runserver
Copy .env.example to .env and fill in your values:
cp .env.example .env| Variable | Description | Required |
|---|---|---|
DJANGO_SECRET_KEY |
Django secret key (generate a strong random string) | Yes |
DJANGO_DEBUG |
Set to False in production |
Yes |
DJANGO_ALLOWED_HOSTS |
Comma-separated list of allowed hosts | Yes |
DB_NAME |
MySQL database name | Yes |
DB_USER |
MySQL username | Yes |
DB_PASSWORD |
MySQL password | Yes |
DB_HOST |
MySQL host (default: localhost) |
Yes |
DB_PORT |
MySQL port (default: 3306) |
Yes |
GOOGLE_AI_API_KEY |
Google Generative AI API key for plant chat | No |
OPENAI_API_KEY |
OpenAI API key | No |
RAZORPAY_KEY_ID |
Razorpay key ID for payments | No |
RAZORPAY_KEY_SECRET |
Razorpay key secret for payments | No |
EMAIL_HOST |
SMTP host for sending emails | No |
EMAIL_HOST_USER |
SMTP username | No |
EMAIL_HOST_PASSWORD |
SMTP password | No |


