Empowering local shop owners with AI-powered digital commerce tools β from voice-based inventory to UPI billing and offline buyer discovery.
SthaniyaVendor is a production-ready, full-stack hyperlocal commerce platform that bridges the gap between local brick-and-mortar vendors and the digital economy. It gives small shop owners an easy-to-use web dashboard with AI tools, instant UPI billing, and a companion mobile app for buyers to discover nearby stores β even offline.
- Overview
- Key Features
- Tech Stack
- Project Structure
- Getting Started
- Environment Variables
- Feature Deep Dive
- Testing UPI Payments
- Roadmap
- Contributing
- License
India has millions of local kirana stores, vegetable vendors, and small shop owners who lack the digital infrastructure to compete with large e-commerce platforms. SthaniyaVendor solves this by providing:
- A web dashboard for vendors to manage their store, inventory, and billing β in English or Hinglish
- AI tools that let non-tech-savvy vendors use voice, camera, or barcode to manage stock
- An Expo mobile app for buyers to find local stores on a map β even without internet
The name Sthaniya (ΰ€Έΰ₯ΰ€₯ΰ€Ύΰ€¨ΰ₯ΰ€―) means "local" in Hindi β a reflection of the platform's core mission.
| Feature | Description |
|---|---|
| Phone-based Auth | JWT authentication via phone number β no email verification friction |
| Store Configuration | Manage store name, category, location, and UPI ID from the Settings tab |
| Instant POS & Billing | Generate itemized digital receipts in seconds |
| Dynamic UPI QR | Auto-generates a UPI QR code tied to the vendor's registered bank ID (GPay, PhonePe, Paytm) |
| WhatsApp Receipt Sharing | Send digital bills directly to customers via WhatsApp with one tap |
| Inventory Dashboard | Full inventory view with add, edit, and delete support |
Vendors can add items to inventory just by speaking naturally in Hindi or English:
"Ek kilo chawal 50 rupay" β Adds Rice, 1 kg, βΉ50 to inventory
Powered by the Gemini AI API, the system understands mixed-language input and parses it into structured product data automatically.
Point the camera at any product and the app identifies it instantly β no upload, no server round trip. Uses a TensorFlow.js MobileNet model running entirely in the browser, optimized for low-end devices.
Scan any product barcode to automatically retrieve the product name, brand, and category via the Open Food Facts API β ideal for packaged goods and FMCG products.
| Feature | Description |
|---|---|
| Store Map | Interactive map showing nearby registered vendors |
| Offline-First | Store locations cached via AsyncStorage β works in low-connectivity areas |
| Category Filter | Filter stores by category (grocery, vegetables, pharmacy, etc.) |
| Navigation Ready | Tap a store pin to get directions |
| Technology | Purpose |
|---|---|
| Python 3.9+ | Core backend language |
| FastAPI | REST API framework with auto-generated docs |
| PostgreSQL | Primary relational database |
| PyJWT | Stateless JWT authentication |
| Uvicorn | ASGI server |
| Technology | Purpose |
|---|---|
| React 18 + Vite | Fast SPA with hot module replacement |
| TypeScript | Type-safe codebase |
| TensorFlow.js | In-browser AI for image recognition |
| Lucide React | Icon library |
| Vanilla CSS | Glassmorphism-inspired modern UI |
| Technology | Purpose |
|---|---|
| React Native (Expo) | Cross-platform mobile app |
| Expo Router | File-based navigation |
| React Native Maps | Interactive store discovery map |
| AsyncStorage | Offline-first data caching |
| Service | Purpose |
|---|---|
| Gemini AI API | Voice/text inventory parsing (Hinglish) |
| Open Food Facts API | Barcode product lookup |
| UPI Deep Link | Dynamic QR code generation for payments |
SthaniyaVendor/
βββ backend/ # Python FastAPI server
β βββ main.py # App entry point + DB init
β βββ routers/ # Route handlers (auth, vendors, inventory)
β βββ models/ # SQLAlchemy models
β βββ schemas/ # Pydantic request/response schemas
β βββ auth.py # JWT logic
β βββ requirements.txt
β
βββ web/ # React + Vite vendor dashboard
β βββ src/
β β βββ pages/ # Dashboard, POS, Inventory, Settings
β β βββ components/ # Reusable UI (QR modal, receipt, scanner)
β β βββ hooks/ # Custom React hooks
β β βββ utils/ # API helpers, formatters
β β βββ main.tsx
β βββ index.html
β βββ vite.config.ts
β
βββ app/ # React Native / Expo buyer app
β βββ (tabs)/ # Tab-based navigation screens
β βββ components/ # Map, store card, filter bar
β βββ utils/ # Offline cache helpers
β
βββ components/ # Shared component library
βββ constants/ # App-wide constants
βββ hooks/ # Shared hooks
βββ assets/images/ # App icons and images
βββ scripts/ # Utility scripts
βββ .env # Environment variables
βββ app.json # Expo config
βββ README.md
Make sure you have the following installed:
- Node.js v18+ β Download
- Python 3.9+ β Download
- PostgreSQL (local or cloud like Neon/Supabase) β Download
- Expo CLI β
npm install -g expo-cli
# Navigate to the backend directory
cd backend
# Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your database URL and JWT secret (see Environment Variables section)
# Start the FastAPI development server
uvicorn main:app --reload --port 8000β The database schema auto-initializes on first startup. No manual migrations needed.
The API will be running at http://127.0.0.1:8000
Interactive API docs available at http://127.0.0.1:8000/docs
# Navigate to the web frontend directory
cd web
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Add your VITE_API_URL and VITE_GEMINI_API_KEY (see below)
# Start the development server
npm run dev
β οΈ Windows users: UseVITE_API_URL=http://127.0.0.1:8000(notlocalhost) to avoid IPv6 resolution issues.
The dashboard will be available at http://localhost:5173
# From the project root
npm install
# Start the Expo development server
npx expo startThen scan the QR code with the Expo Go app on your phone, or press:
ato open on Android emulatorito open on iOS simulator
# PostgreSQL connection string
DATABASE_URL=postgresql://user:password@localhost:5432/sthaniyavendor
# JWT secret key β use a long, random string in production
SECRET_KEY=your_super_secret_jwt_key_here# Backend API URL
VITE_API_URL=http://127.0.0.1:8000
# Gemini AI API key (for voice inventory input)
VITE_GEMINI_API_KEY=your_gemini_api_key_hereπ Never commit
.envfiles to version control. Both are already listed in.gitignore.
- Vendor taps the microphone button on the Inventory page
- Speaks naturally: "Panch kilo aata, ek sau rupay"
- Audio is sent to Gemini AI, which parses it as:
{ name: "Aata", quantity: 5, unit: "kg", price: 100 } - A pre-filled form appears for the vendor to confirm or edit
- Item is saved to the database on confirmation
- Vendor adds items to a bill in the POS screen
- On clicking "Generate Bill", a UPI deep link is constructed using the vendor's registered UPI ID
- A QR code is rendered in real time β customers can scan it directly with any UPI app
- Receipt can be shared to the customer's WhatsApp via a pre-formatted message link
- On first load, the app fetches all registered store locations from the backend
- Stores are saved to
AsyncStoragewith a timestamp - On subsequent loads (or when offline), the cached data is served from local storage
- Map renders normally β buyers can still find and navigate to stores without internet
When testing the POS Bill Generator, make sure you:
- Go to the Settings tab in the Vendor Dashboard
- Enter a valid UPI ID in the format:
yournumber@paytmname@okiciciphonenumber@ybl(PhonePe)phonenumber@oksbi
β οΈ Plain phone numbers (without the@banksuffix) will be rejected by UPI apps like Google Pay when the QR is scanned.
- Vendor analytics dashboard (daily/weekly sales charts)
- Multi-language support (Tamil, Telugu, Marathi)
- Customer-facing product catalog page per store
- Push notifications for low stock alerts
- Integration with India Post / delivery partners
- Admin panel for platform management
Contributions, bug reports, and feature suggestions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Commit your changes:
git commit -m "feat: add your feature" - Push to the branch:
git push origin feature/your-feature-name - Open a Pull Request
Please follow Conventional Commits for commit messages.
This project is open-source and available under the MIT License.
Built with β€οΈ for India's local vendors β Apna dukaan, digital bano.