NammaCraft is a full-stack, AI-powered artisan marketplace that bridges India's centuries-old craft traditions with the modern digital economy. Buyers discover authentic handmade goods; artisans gain a voice, a storefront, and fair pricing — powered by Gemini AI.
A premium artisan goods marketplace with cultural discovery, live auctions, AI-assisted pricing, and regional craft maps — built for India's 7 million+ craft artisans.
Explore crafts by region using an interactive D3.js cultural map of India. Filter by state, craft type, and artisan story. Every product is tied to its origin — not just a SKU.
Real-time bidding interface with countdown timers, watcher counts, outbid alerts, and an animated bid stream. Supports auction creation, management, and winner resolution.
- Voice Listing (Gemini AI) — Artisans describe their product by voice; Gemini extracts structured product data (name, category, price, origin) via the
@google/genaiSDK. - AI Pricing Suggestions — Estimated price range and demand scoring based on product category and metadata.
- Sitewide Chat Assistant (Gemini AI) — A Gemini-powered floating assistant embedded across the platform to guide buyers and sellers in real time.
Full cart → checkout → order tracking flow. Personalized product recommendations, wishlist/favorites, cultural gift bundles, handwritten notes on orders, and a dedicated Buyer Dashboard for order history and account management.
| Role | Dashboard | Capabilities |
|---|---|---|
| Buyer | Buyer Dashboard | Browse, cart, wishlist, order history, account |
| Artisan/Creator | Creator Dashboard | List products, manage auctions, track sales & earnings |
| Admin | Admin Dashboard | Monitor bids, manage users, revenue analytics |
Seasonal festival homepages (Diwali, etc.), authenticity certificates, traditional food marketplace, artisan story spotlights, and regional artisan profiles.
Built with Capacitor 8 — the web app is wrapped into a native Android APK. A pre-built APK (namma-craft.apk) is included for direct installation.
Installable on desktop and mobile browsers via vite-plugin-pwa. Works offline with service worker caching.
Live selling sessions where artisans can showcase their craft in real-time, directly from the Creator Dashboard.
Blockchain-ready certificate generation for handmade goods, verifying artisan origin, craft type, and product authenticity.
namma_craft/
├── 📁 src/
│ ├── App.tsx # Route definitions (React Router v7)
│ ├── AuthContext.tsx # Firebase Auth + MongoDB user sync
│ ├── db.ts # Frontend API service (REST → Express)
│ ├── firebase.ts # Firebase app init (Auth + Firestore)
│ ├── index.css # Global styles + Tailwind v4 theme
│ └── components/ # 37 components total
│ ├── AdminDashboard.tsx # Analytics, user/auction management
│ ├── BuyerDashboard.tsx # Buyer order history & account
│ ├── CreatorDashboard.tsx # Artisan storefront & earnings
│ ├── LiveAuction.tsx # Real-time bidding UI
│ ├── AuctionListing.tsx # Auction browse/filter
│ ├── CreateAuction.tsx # Auction creation wizard
│ ├── Marketplace.tsx # Product browse + filters
│ ├── ProductDetail.tsx # PDP with authenticity cert
│ ├── ArtisanProfile.tsx # Public artisan page
│ ├── ArtisanStory.tsx # Individual artisan story page
│ ├── ArtisanSpotlight.tsx # Featured artisan highlight widget
│ ├── Checkout.tsx # Shipping + payment + tracking
│ ├── CulturalMap.tsx # D3.js India regional map
│ ├── CulturalDiscovery.tsx# Cultural exploration page
│ ├── TraditionalFoods.tsx # Traditional food section
│ ├── FoodDetail.tsx # Traditional food product detail
│ ├── AddFoodItem.tsx # Add traditional food listing
│ ├── FestivalHome.tsx # Seasonal festival pages
│ ├── VoiceAssistant.tsx # Gemini voice → product form
│ ├── AIPricingPanel.tsx # AI price suggestion widget
│ ├── HumanAssistant.tsx # Sitewide Gemini chat widget
│ ├── LiveStudio.tsx # Live selling session UI
│ ├── GiftBundles.tsx # Curated gift sets
│ ├── SellProduct.tsx # Artisan product listing form
│ ├── CartSidebar.tsx # Slide-out cart
│ ├── AuthenticityCertificate.tsx # Artisan cert generator
│ ├── FeaturedProducts.tsx # Homepage featured items
│ ├── CategoryGrid.tsx # Category browse grid
│ ├── Recommendations.tsx # AI product recommendations
│ ├── Hero.tsx # Homepage hero section
│ ├── Navbar.tsx # Responsive navigation
│ ├── Footer.tsx # Global footer
│ ├── Login.tsx # Sign in / Sign up
│ ├── FuturePlans.tsx # Roadmap section
│ ├── HandwrittenNote.tsx # Personalized order note UI
│ ├── Toast.tsx # Notification toast system
│ └── NotFound.tsx # 404 page
│
├── 📁 server/
│ ├── index.ts # Express app + all API routes
│ └── models/
│ ├── User.ts # Mongoose User schema
│ ├── Product.ts # Mongoose Product schema
│ ├── Order.ts # Mongoose Order schema
│ ├── Cart.ts # Mongoose Cart schema
│ └── Favorite.ts # Mongoose Favorites schema
│
├── 📁 android/ # Capacitor Android project
├── 📁 public/images/ # Static craft photography assets
├── namma-craft.apk # Pre-built Android APK
├── capacitor.config.ts # Capacitor mobile config
├── vite.config.ts # Vite + Tailwind v4 + PWA config
├── firebase.json # Firebase Hosting config
├── netlify.toml # Netlify deploy config
├── start_all.bat # Windows: run frontend + backend together
└── package.json
| Technology | Version | Purpose |
|---|---|---|
| React | 19.0 | UI framework |
| TypeScript | 5.8 | Type safety |
| Vite | 6.2 | Build tool & dev server |
| Tailwind CSS | v4.1 | Utility-first styling |
| React Router | v7 | Client-side routing |
| Motion (Framer) | 12 | Animations & transitions |
| Recharts | 3.7 | Dashboard charts & analytics |
| D3.js | 7.9 | Cultural map visualization |
| Lucide React | 0.546 | Icon system |
| clsx | 2.1 | Conditional class management |
| tailwind-merge | 3.5 | Tailwind class conflict resolution |
| Technology | Version | Purpose |
|---|---|---|
| Express | 4.21 | REST API server |
| Mongoose | 9.2 | MongoDB ODM |
| MongoDB Atlas | — | Primary database |
| tsx | 4.21 | TypeScript execution for Node |
| Zod | 4.3 | Schema validation & type inference |
| express-validator | 7.3 | Request body validation |
| express-rate-limit | 8.3 | API rate limiting |
| better-sqlite3 | 12.4 | Local SQLite (dev/cache) |
| dotenv | 17.2 | Environment variable management |
| Technology | Purpose |
|---|---|
| Firebase Auth | Google OAuth sign-in |
| Firebase Firestore | Realtime data (supplemental) |
| Firebase Admin SDK | Server-side token verification |
| Firebase Hosting | Static hosting option |
| Google Gemini AI | Voice-to-product listing & sitewide chat |
| Technology | Version | Purpose |
|---|---|---|
| Capacitor | 8.2 | Native Android wrapper |
| @capacitor/android | 8.2 | Android platform |
| @capacitor/assets | 3.0 | App icon & splash assets |
| vite-plugin-pwa | 1.2 | Progressive Web App support |
- Node.js v18+
- MongoDB Atlas account
- Firebase project
- Google Gemini API key
git clone https://github.com/mahi-2-ron/namma_craft.git
cd namma_craft
npm installCreate a .env file in the root:
# Gemini AI
GEMINI_API_KEY=your_gemini_api_key_here
# MongoDB
MONGO_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/nammacraft
# Server
PORT=5000
⚠️ Never commit.envto version control. See Security Notes below.
Update src/firebase.ts with your own Firebase project credentials from the Firebase Console.
Option A — Run both together (Windows)
start_all.batOption B — Run separately
# Terminal 1: Frontend
npm run dev
# Terminal 2: Backend API
npm run serverFrontend runs on → http://localhost:3000
Backend API runs on → http://localhost:5000
npm run buildDeploy the dist/ folder to Firebase Hosting or Netlify (configs included).
NammaCraft ships as a native Android app using Capacitor 8.
Download and install namma-craft.apk directly on any Android device (enable "Install from unknown sources").
# Sync web build with Capacitor
npm run mobile:sync
# Open in Android Studio
npm run mobile:openNammaCraft is installable as a PWA on desktop and mobile browsers.
- Visit nammacraft.netlify.app
- Click "Install" in your browser's address bar
- App launches offline with service worker caching
Base URL: http://localhost:5000/api
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Server + DB status |
POST |
/users |
Create/update user after sign-in |
GET |
/users/:uid |
Get user profile |
GET |
/products |
List all products |
GET |
/products/:id |
Get single product |
POST |
/products |
Add a new product |
PUT |
/products/:id |
Update product |
DELETE |
/products/:id |
Delete product |
POST |
/orders |
Place an order |
GET |
/orders/user/:userId |
Get user's orders |
PATCH |
/orders/:id/status |
Update order status |
POST |
/cart |
Add/update cart item |
GET |
/cart/:userId |
Get cart items |
DELETE |
/cart/:userId/:productId |
Remove cart item |
DELETE |
/cart/:userId |
Clear cart |
POST |
/favorites |
Add to favorites |
DELETE |
/favorites/:userId/:productId |
Remove favorite |
GET |
/favorites/:userId |
Get user favorites |
These are important considerations for production deployment.
- Environment Variables: Firebase config and Gemini API key must be stored in
.env— never hardcoded in source files. - CORS: The backend should be configured with an explicit allowed-origin list rather than a wildcard in production.
- Rate Limiting:
express-rate-limitis configured to protect API endpoints from abuse. - Input Validation:
express-validatorandZodschemas validate and sanitize all incoming request bodies. - Route Protection: Admin and Creator routes should be wrapped with role-based authentication guards before going live.
- API Security: All write endpoints (
POST,PUT,DELETE) should validate Firebase JWT tokens server-side before processing requests (Firebase Admin SDK is included).
- Real-time WebSocket auction bidding (Socket.io)
- Payment gateway integration (Razorpay)
- iOS app (Capacitor)
- Artisan video stories
- Multi-language support (Hindi, Kannada, Tamil, Bengali)
- Blockchain-backed authenticity certificates
- AR product preview
- Artisan co-operative group stores
- International shipping integrations
- Push notifications (Firebase Cloud Messaging)
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create your feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'feat: add your feature' - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
