Skip to content

parth5012/Artify-Bharat

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

145 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Artify Bharat - AI-Powered Verified Handmade Marketplace

A Next.js application that empowers Indian artisans through AI-driven voice onboarding, multilingual storytelling, and authenticity verification.

Features

  • 🎯 Voice Onboarding: Native language voice recording for artisans
  • πŸ€– AI Authenticity Verification: 94% accuracy in detecting handmade products
  • 🌍 Multilingual Support: AI-generated stories in 7+ languages
  • πŸ“œ Digital Craft Passport: Blockchain-verified authenticity certificates
  • πŸ’° Fair AI Pricing: ML-powered price recommendations
  • πŸ“Š Admin Dashboard: Review queue for product approvals
  • πŸ›οΈ Marketplace: Browse and purchase authentic handmade products
  • πŸ” OAuth Authentication: Login with Google and Facebook

Tech Stack

Frontend

  • Framework: Next.js 14
  • Styling: Tailwind CSS
  • Language: JavaScript
  • Fonts: Inter, Poppins, Noto Sans Devanagari

Backend

  • Framework: Django 6.0
  • API: Django REST Framework
  • Authentication: JWT + OAuth (Google, Facebook)
  • Database: SQLite (development) / PostgreSQL (production)

Getting Started

πŸͺ” Artify Bharat

AI-Powered Verified Handmade Marketplace for Indian Artisans

Empowering India's artisan community through voice onboarding, AI-driven authenticity verification, multilingual storytelling, and a fair digital marketplace β€” all in one platform.

Next.js Django FastAPI Gemini AI License


πŸ“– Table of Contents


🌟 Overview

Artify Bharat is a full-stack, three-tier web platform built to bridge the gap between India's skilled artisan community and modern digital commerce. Artisans can onboard using voice recordings in their native language, which are transcribed and transformed into compelling product stories using Google Gemini AI. Buyers get a curated, verified marketplace where every product comes with an AI-authenticated Digital Craft Passport.


✨ Key Features

Feature Description
πŸŽ™οΈ Voice Onboarding Artisans record their story in any Indian language; AssemblyAI transcribes and Gemini rewrites it into a rich English narrative
πŸ€– AI Story Generation Google Gemini AI auto-generates 120-word historical & emotional product descriptions
πŸ›’ Verified Marketplace Buyers browse authentic, AI-verified handmade products with filters, search, and categories
🧾 Digital Craft Passport Each product gets a unique page with its artisan's story and provenance
πŸ’¬ AI Chatbot LangGraph-powered shopping assistant with tool-calling support for product search
πŸ“Š Artisan Dashboard Real-time stats: total sales, active orders, product count, AI verification rate
πŸ›οΈ Cart & Orders Full shopping cart (UUID-based) and order management with payment status tracking
πŸ‘‘ Admin Panel Django admin with full control over products, orders, users, and categories
πŸ” JWT Authentication Secure stateless authentication for artisans, buyers, and admins
πŸ“ Address Management Persistent delivery address tied to each user account

πŸ—οΈ Architecture

Artify Bharat follows a microservice-oriented, three-tier architecture:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   FRONTEND                      β”‚
β”‚         Next.js 16 + Tailwind CSS               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Artisan  β”‚ β”‚  Buyer   β”‚ β”‚     Product      β”‚ β”‚
β”‚  β”‚  Pages   β”‚ β”‚  Pages   β”‚ β”‚     Passport     β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ HTTP / Axios
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    BACKEND     β”‚    β”‚       MICROSERVICES        β”‚
β”‚  Django 6 +   β”‚    β”‚   FastAPI + LangChain +    β”‚
β”‚  DRF + JWT     β”‚    β”‚   Gemini AI + AssemblyAI  β”‚
β”‚                β”‚    β”‚                           β”‚
β”‚  - Auth        β”‚    β”‚  POST /process_audio      β”‚
β”‚  - Products    β”‚    β”‚   β†’ Transcription (AAI)   β”‚
β”‚  - Orders      β”‚    β”‚   β†’ Story Gen (Gemini)    β”‚
β”‚  - Cart        β”‚    β”‚                           β”‚
β”‚  - Customers   β”‚    β”‚  GET /story/{product}     β”‚
β”‚  - Artisans    β”‚    β”‚   β†’ Product Story         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   SQLite DB    β”‚
β”‚  (dev) /       β”‚
β”‚  PostgreSQL    β”‚
β”‚  (prod)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Frontend

Technology Version Purpose
Next.js 16 React framework with SSR/SSG
React 18 UI component library
Tailwind CSS 3.x Utility-first styling
Axios 1.x HTTP client for API calls
Noto Sans Devanagari - Hindi / multilingual font support

Backend (Django REST API)

Technology Version Purpose
Django 6.0 Web framework
Django REST Framework 3.16 REST API toolkit
SimpleJWT 5.5 JWT-based authentication
drf-nested-routers 0.95 Nested API routes (e.g. products β†’ images)
django-filter 25.x Query-param-based filtering
django-cors-headers 4.9 CORS middleware
django-phonenumber-field 8.4 Phone number validation
Celery 5.6 Async task queue
Redis 7.x Celery message broker
Pillow 12.x Image processing
Gunicorn 24.x Production WSGI server

Microservices (FastAPI + AI)

Technology Version Purpose
FastAPI 0.128 High-performance async API
AssemblyAI 0.48 Voice-to-text transcription (Universal-2 model)
LangChain 1.2 LLM orchestration
LangGraph 1.0 Stateful AI chatbot agent
langchain-google-genai 4.2 Google Gemini AI integration
Whoosh 2.7 Local full-text product search indexing
python-dotenv 1.2 Environment variable management

πŸ“ Project Structure

artify-bharat/
β”‚
β”œβ”€β”€ frontend/                     # Next.js web application
β”‚   β”œβ”€β”€ components/               # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Header.js             # Navigation header
β”‚   β”‚   β”œβ”€β”€ Footer.js             # Site footer
β”‚   β”‚   └── AppLayout.js          # Dashboard layout wrapper
β”‚   β”œβ”€β”€ pages/                    # Next.js file-based routing
β”‚   β”‚   β”œβ”€β”€ index.js              # Homepage (landing page)
β”‚   β”‚   β”œβ”€β”€ _app.js               # App wrapper
β”‚   β”‚   β”œβ”€β”€ _document.js          # Custom HTML document
β”‚   β”‚   β”œβ”€β”€ artisan/
β”‚   β”‚   β”‚   β”œβ”€β”€ onboard.js        # Voice onboarding interface
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard.js      # Artisan analytics dashboard
β”‚   β”‚   β”‚   └── orders.js         # Artisan order management
β”‚   β”‚   β”œβ”€β”€ buyer/
β”‚   β”‚   β”‚   └── marketplace.js    # Product browsing & discovery
β”‚   β”‚   β”œβ”€β”€ product/
β”‚   β”‚   β”‚   └── [id].js           # Digital Craft Passport (product page)
β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   β”‚   └── index.js          # User authentication
β”‚   β”‚   └── signup/
β”‚   β”‚       └── index.js          # User registration
β”‚   β”œβ”€β”€ utils/                    # Helper utilities
β”‚   β”œβ”€β”€ styles/                   # Global CSS styles
β”‚   β”œβ”€β”€ tailwind.config.js        # Tailwind configuration
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/                      # Django REST API
β”‚   β”œβ”€β”€ core/                     # Custom User model
β”‚   β”‚   └── models.py             # User (email-based, with phone)
β”‚   β”œβ”€β”€ store/                    # Core marketplace app
β”‚   β”‚   β”œβ”€β”€ models.py             # Product, Artisan, Customer, Order, Cart...
β”‚   β”‚   β”œβ”€β”€ views.py              # ViewSets & API views
β”‚   β”‚   β”œβ”€β”€ serializers.py        # DRF serializers
β”‚   β”‚   β”œβ”€β”€ urls.py               # URL routing (nested routers)
β”‚   β”‚   β”œβ”€β”€ filters.py            # Product filtering
β”‚   β”‚   β”œβ”€β”€ permissions.py        # Custom permissions
β”‚   β”‚   β”œβ”€β”€ signals/              # Django signals (e.g., order_created)
β”‚   β”‚   β”œβ”€β”€ pagination.py         # Default pagination settings
β”‚   β”‚   └── tests/                # Unit tests
β”‚   β”œβ”€β”€ marketplace/              # Project-level Django config
β”‚   β”œβ”€β”€ manage.py
β”‚   └── pyproject.toml
β”‚
β”œβ”€β”€ microservices/                # FastAPI AI microservice
β”‚   β”œβ”€β”€ main.py                   # FastAPI app & route definitions
β”‚   └── utils/
β”‚       β”œβ”€β”€ transcription.py      # AssemblyAI voice transcription
β”‚       β”œβ”€β”€ story_generation.py   # Gemini AI story & product narrative
β”‚       β”œβ”€β”€ chatbot.py            # LangGraph AI chatbot agent
β”‚       β”œβ”€β”€ search.py             # Whoosh full-text product search
β”‚       └── tools.py              # Chatbot tool definitions
β”‚
β”œβ”€β”€ vercel.json                   # Vercel deployment config
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.13+
  • uv (Python package manager) β€” pip install uv
  • Redis (for Celery, optional in development)
  • API Keys:

Google OAuth Setup

To enable Google login, you need to configure OAuth 2.0 credentials:

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Navigate to APIs & Services β†’ Credentials
  4. Click Create Credentials β†’ OAuth 2.0 Client ID
  5. Configure the OAuth consent screen if prompted
  6. For Application type, select Web application
  7. Add Authorized JavaScript origins:
    • http://localhost:3000 (for development)
    • Your production domain (e.g., https://yourdomain.com)
  8. Add Authorized redirect URIs:
    • http://localhost:3000 (for development)
    • Your production domain
  9. Copy the Client ID and save it

Add to environment variables:

Backend (backend/.env):

GOOGLE_CLIENT_ID=your_google_client_id_here.apps.googleusercontent.com

Frontend (frontend/.env.local):

NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id_here.apps.googleusercontent.com

Required Python packages (already in pyproject.toml):

cd backend
uv add google-auth google-auth-oauthlib python-dotenv

1. Frontend (Next.js)

cd frontend
npm install
npm run dev

The frontend will be available at http://localhost:3000

Available scripts:

npm run dev      # Start development server
npm run build    # Build for production
npm run start    # Start production server
npm run lint     # Run ESLint

2. Backend (Django REST API)

cd backend

# Install dependencies with uv
uv sync

# Apply database migrations
uv run python manage.py migrate

# (Optional) Seed sample data
uv run python manage.py seed_db

# Start the development server
uv run python manage.py runserver

The Django API will be available at http://localhost:8000

To access the admin panel, create a superuser:

uv run python manage.py createsuperuser

Then visit: http://localhost:8000/admin/


3. Microservices (FastAPI + AI)

cd microservices

# Create a .env file from the example
cp .env.example .env
# Add your API keys to .env

# Install dependencies
uv sync

# Start the FastAPI server
uv run fastapi dev main.py

The microservices API will be available at http://localhost:8001

Interactive API docs: http://localhost:8001/docs


πŸ“‘ API Reference

Authentication

Method Endpoint Description
POST /store/signup/ Register as artisan or buyer
POST /store/login/ Login with email & password
POST /store/logout/ Logout current user
POST /api/token/ Get JWT access & refresh tokens
POST /api/token/refresh/ Refresh JWT access token

Signup payload:

{
  "userRole": "artisan",
  "firstName": "Rahul",
  "lastName": "Sharma",
  "email": "rahul@example.com",
  "password": "securepassword",
  "phone": "+919876543210",
  "address": "123, Craft Lane",
  "city": "Jaipur",
  "state": "Rajasthan",
  "pincode": "302001",
  "craftSpecialty": "Blue Pottery",
  "experience": 12,
  "bio": "Third-generation potter from Jaipur..."
}

Products

Method Endpoint Description Auth
GET /store/products/ List all products (with filters) Public
POST /store/products/ Create a new product Artisan
GET /store/products/{id}/ Get product details Public
PUT/PATCH /store/products/{id}/ Update product Artisan
DELETE /store/products/{id}/ Delete product Artisan
GET /store/products/titles/ Get all product titles (for search) Auth
GET /store/products/{id}/images/ Get product images Public
POST /store/products/{id}/images/ Upload product image Artisan

Query Filters:

  • ?search=blue+pottery β€” Full-text search on title & description
  • ?ordering=unit_price β€” Sort by price (or -unit_price for descending)
  • ?category_id=3 β€” Filter by category

Cart & Orders

Method Endpoint Description
POST /store/carts/ Create a new cart
GET /store/carts/{uuid}/ Get cart with items & total
POST /store/carts/{uuid}/items/ Add item to cart
PATCH /store/carts/{uuid}/items/{id}/ Update item quantity
DELETE /store/carts/{uuid}/items/{id}/ Remove item from cart
GET /store/orders/ List orders (scoped by user role)
POST /store/orders/ Place an order from cart

Dashboard & Users

Method Endpoint Description Auth
GET /store/stats/ Get artisan dashboard stats Artisan
GET /store/customers/me/ Get current customer profile Auth
PUT /store/customers/me/ Update customer profile Auth
GET /store/categories/ List all categories Public

Microservices (AI)

Method Endpoint Description
POST /process_audio Upload audio β†’ Transcription + Artisan Story
GET /story/{product_name} Generate a product history story

Audio Processing Response:

{
  "text": "Transcribed voice recording text...",
  "story": "Refined 120-word English narrative about the artisan's craft..."
}

🎨 Design System

Artify Bharat uses a warm, earthy color palette that reflects the richness of Indian craftsmanship:

Token Value Usage
Primary #c2794d Terracotta β€” CTAs, highlights
Secondary #8b6f47 Earth brown β€” accents
Background #f8f6f3 Warm cream β€” page background
Text #3d3021 Dark brown β€” body text

Typography:

  • Poppins β€” Display headings
  • Inter β€” Body copy and UI
  • Noto Sans Devanagari β€” Hindi & multilingual content

πŸ” Environment Variables

Backend (backend/.env)

ARTISAN_EMAIL=artisan@domain.com
ARTISAN_PASS=yourpassword
BUYER_EMAIL=buyer@domain.com
BUYER_PASS=yourpassword

Microservices (microservices/.env)

GOOGLE_API_KEY=your_google_gemini_api_key
ASSEMBLYAI_API_KEY=your_assemblyai_api_key

Screenshots

image image image

πŸ—ΊοΈ Key Pages

Route Page Description
/ Homepage Landing page with hero, features & stats
/signup Sign Up Role-based registration (artisan/buyer)
/login Login Email & password authentication
/buyer/marketplace Marketplace Browse & search verified products
/artisan/onboard Voice Onboarding Record story, list products
/artisan/dashboard Dashboard Analytics: sales, orders, stats
/artisan/orders Orders Track and manage incoming orders
/product/[id] Product Passport Individual product + artisan story

🀝 Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Please ensure your code follows the existing style and all tests pass before submitting.


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with ❀️ for India's artisan community

For support, open an issue or contact support@artifybharat.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 68.4%
  • Python 31.1%
  • Other 0.5%