Shop smart. Support small.
A sleek, minimalistic e-commerce marketplace targeting GenZ buyers in India, enabling solopreneurs, small businesses, and brands to sell products with an Instagram-clean, Apple-minimalist user experience.
- ποΈ Personalized Feed - Discover products tailored to your interests
- π₯ Trending Products - See what's popular in the community
- π Smart Search & Filters - Find products by category, price, rating
- π Persistent Cart - Cart saved across sessions
- π³ Seamless Checkout - Multi-step checkout with simulated payments
- π¦ Order Tracking - Track order status from pending to delivered
- β Product Reviews - Rate and review purchased products
- πͺ Instant Store Setup - Start selling in minutes
- π€ Bulk Product Upload - Upload products via CSV
- π Dashboard Analytics - Track sales, orders, and revenue
- π Order Management - View and fulfill orders
- π·οΈ Inventory Control - Manage stock levels with low-stock alerts
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.x | React framework with App Router |
| React | 19.x | Component-based UI |
| Tailwind CSS | 4.x | Utility-first CSS |
| Zustand | 5.x | Lightweight state management |
| React Hook Form | 7.x | Form handling & validation |
| Lucide React | Latest | Icon library |
| TypeScript | 5.x | Type safety |
| Technology | Version | Purpose |
|---|---|---|
| FastAPI | 0.115+ | Modern async Python API |
| SQLAlchemy | 2.x | Database ORM |
| SQLite | 3.x | Embedded SQL database |
| Pydantic | 2.x | Data validation |
| python-jose | 3.x | JWT token handling |
| passlib + bcrypt | Latest | Secure password hashing |
| Alembic | 1.13+ | Database migrations |
| pandas | 2.x | CSV processing |
| Component | Technology |
|---|---|
| Containerization | Docker + Docker Compose |
| Reverse Proxy | Nginx |
| Database | SQLite (file-based) |
| File Storage | Local filesystem |
hive/
βββ backend/ # FastAPI backend
β βββ app/
β β βββ main.py # FastAPI entry point
β β βββ config.py # Configuration settings
β β βββ database.py # Database connection
β β βββ models/ # SQLAlchemy models
β β βββ schemas/ # Pydantic schemas
β β βββ routers/ # API routes
β β βββ services/ # Business logic
β β βββ middleware/ # Auth middleware
β β βββ utils/ # Utility functions
β βββ alembic/ # Database migrations
β βββ requirements.txt # Python dependencies
β βββ Dockerfile
β
βββ frontend/ # Next.js frontend
β βββ app/
β β βββ (auth)/ # Auth pages (login, register)
β β βββ (buyer)/ # Buyer pages (home, cart, orders)
β β βββ (seller)/ # Seller pages (dashboard, products)
β β βββ layout.tsx # Root layout
β β βββ providers.tsx # Context providers
β βββ components/ # Reusable components
β β βββ ui/ # UI primitives (Button, Input, etc.)
β β βββ ... # Feature components
β βββ lib/ # Utilities & API client
β βββ store/ # Zustand stores
β βββ package.json
β βββ Dockerfile
β
βββ docker-compose.yml # Docker orchestration
βββ nginx.conf # Nginx configuration
βββ alembic.ini # Alembic configuration
βββ PRD.md # Product Requirements Document
βββ brand-guidelines.md # Brand & design guidelines
- Node.js 18+ (for frontend)
- Python 3.11+ (for backend)
- Docker & Docker Compose (for containerized deployment)
-
Clone the repository
git clone <repository-url> cd hive
-
Create environment files
# Backend environment cp backend/.env.example backend/.env # Frontend environment cp frontend/.env.local.example frontend/.env.local
-
Configure environment variables (see Environment Variables)
-
Build and start services
docker-compose up --build -d
-
Run database migrations
docker-compose exec backend alembic upgrade head -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Nginx Proxy: http://localhost
-
Navigate to backend directory
cd backend -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Create
.envfile with required variables -
Run database migrations
alembic upgrade head
-
Start the server
uvicorn app.main:app --reload --port 8000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Create
.env.localfileNEXT_PUBLIC_API_URL=http://localhost:8000
-
Start development server
npm run dev
# Database
DATABASE_URL=sqlite:///./data/marketplace.db
# JWT Configuration
JWT_SECRET_KEY=your-secret-key-change-in-production
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_DAYS=7
# File Uploads
UPLOAD_DIR=./uploads
MAX_FILE_SIZE=5242880 # 5MB
# Email (SMTP) - Required for production email notifications
# Leave SMTP_USER and SMTP_PASSWORD empty for development (emails logged to console)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM=noreply@hive.com
# CORS
CORS_ORIGINS=http://localhost:3000Hive sends transactional emails for the following events:
| Event | Recipient | Description |
|---|---|---|
| Registration | Buyer/Seller | Welcome email with account setup tips |
| Order Placed | Buyer | Order confirmation with order summary |
| Order Placed | Seller | New order notification requiring action |
| Order Shipped | Buyer | Shipping confirmation with tracking number |
| Out of Stock | Seller | Alert when product stock reaches zero |
Development Mode: If SMTP_USER and SMTP_PASSWORD are empty, emails are logged to the console instead of being sent. This is useful for local development.
Production Mode: Configure your SMTP provider:
- Gmail: Use an App Password (not your regular password). Enable 2FA and create an app password at https://myaccount.google.com/apppasswords
- SendGrid/Mailgun: Use their SMTP credentials
- Custom SMTP: Configure your mail server credentials
NEXT_PUBLIC_API_URL=http://localhost:8000| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register a new user (buyer/seller) |
| POST | /api/auth/login |
Login and get JWT token |
| GET | /api/auth/me |
Get current user info |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/products |
List products with filters |
| GET | /api/products/trending |
Get trending products |
| GET | /api/products/feed |
Personalized product feed |
| GET | /api/products/{id} |
Get product details |
| POST | /api/products |
Create product (seller) |
| PUT | /api/products/{id} |
Update product (seller) |
| DELETE | /api/products/{id} |
Delete product (seller) |
| POST | /api/products/bulk-upload |
Bulk upload via CSV |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cart |
Get user's cart |
| POST | /api/cart/items |
Add item to cart |
| PUT | /api/cart/items/{id} |
Update cart item quantity |
| DELETE | /api/cart/items/{id} |
Remove item from cart |
| DELETE | /api/cart |
Clear entire cart |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/orders |
Create order (checkout) |
| GET | /api/orders |
List orders |
| GET | /api/orders/{id} |
Get order details |
| PUT | /api/orders/{id}/ship |
Mark order as shipped (seller) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/reviews |
Create review |
| GET | /api/reviews/product/{id} |
Get product reviews |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/seller/stats |
Get seller dashboard stats |
For detailed API documentation with request/response examples, visit /docs when the backend is running.
- users - Buyer and seller accounts
- products - Product listings
- orders - Order records
- order_items - Items within orders
- carts - Shopping carts
- cart_items - Items in carts
- reviews - Product reviews
Users βββ¬ββ Products (seller_id)
βββ Orders (buyer_id)
βββ Carts (user_id)
βββ Reviews (user_id)
Products βββ¬ββ CartItems (product_id)
βββ OrderItems (product_id)
βββ Reviews (product_id)
Orders ββ OrderItems (order_id)
Carts ββ CartItems (cart_id)
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Rebuild containers
docker-compose up --build -d
# Run backend migrations
docker-compose exec backend alembic upgrade head
# Access backend shell
docker-compose exec backend bash
# Access frontend shell
docker-compose exec frontend shCopyrightΒ©οΈ Codebasics Inc. All rights reserved.