Skip to content

binit2-1/munshi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Munshi

Munshi Logo

demo.mp4

Aapke dukaan ka Munshi

FeaturesTech StackGet StartedAPI


Munshi is an AI-powered mobile assistant designed specifically for small Indian local shops — kirana stores, chai stalls, cafes, and neighborhood vendors. It speaks to you in Hindi (Roman script), understands your voice, and helps you manage your entire shop from inventory to insights — without needing to be a tech expert.

Whether you want to know your top-selling products, check what stock is running low, or simply ask "Aaj kitna paisa gaya?" — Munshi has your back.


Features

Feature Description
Voice & Text Chat Talk to Munshi in Hindi — voice input gets Hindi responses spoken back to you
Stock Management Add, update, and track products with purchase price, selling price, and expiry dates
Analytics Dashboard Visual sales charts, revenue tracking, top/worst selling products
Transactions Record sales with Cash, UPI, or Credit payment tracking
Quick Scan Barcode scanning for instant product lookup
AI Conversations Ask anything about your business — "Kis product se sabse zyada profit ho raha hai?"

Tech Stack

Server

  • Runtime: Node.js + Express
  • Database: PostgreSQL + Prisma ORM
  • Auth: Better-Auth
  • AI: OpenAI Agents SDK + Ollama (local LLM)
  • Voice: Sarvam AI (Hindi STT/TTS)

Client

  • Framework: Expo (React Native)
  • Styling: NativeWind + Tailwind CSS
  • Animations: Moti
  • UI Components: Radix UI Primitives
  • Icons: Phosphor Icons + Lucide

Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL
  • npm
  • Ollama (for local AI)
  • Sarvam AI API key (for voice features)

Clone & Install

# Clone the repository
git clone https://github.com/binit2-1/munshi.git
cd munshi

# Install server dependencies
cd server
npm install

# Install client dependencies
cd ../client
npm install

Environment Setup

Create .env files in both server/ and client/ directories:

Server .env:

DATABASE_URL="postgresql://user:password@localhost:5432/munshi"
BETTER_AUTH_SECRET="your-secret-key"
OLLAMA_BASE_URL="http://localhost:11434"
SARVAM_API_KEY="your-sarvam-key"
PORT=3000

Client .env:

EXPO_PUBLIC_BASE_URL="http://localhost:3000"

Run the App

# Terminal 1: Start the server
cd server
npm dev

# Terminal 2: Start the Expo app
cd client
npm dev

Database Setup

cd server
npx prisma migrate dev
npx prisma db seed  # Optional: seed sample data

API Overview

Authentication

Endpoint Method Description
/api/auth/signup POST Register new user
/api/auth/signin POST Login user
/api/auth/signout POST Logout user

Products

Endpoint Method Description
/products GET List all products
/products POST Create new product
/products/:id PUT Update product
/products/:id DELETE Delete product

Stock

Endpoint Method Description
/stock GET Get all stock levels
/stock POST Update stock quantity

Transactions

Endpoint Method Description
/transactions GET List transactions
/transactions POST Create new transaction

AI Assistant

Endpoint Method Description
/ai/response GET Text chat with AI
/ai/audio/response POST Voice chat with AI
/ai/history GET Get chat history

📱 Screenshots

Dashboard AI Chat Products

How the AI Works

Munshi's AI agent uses the OpenAI Agents SDK with tools that execute database commands:

  1. User asks in Hindi → "Mujhe batao konsa product kam becha?"
  2. Agent parses intent → Calls appropriate CLI tool
  3. Tool queries PostgreSQL → Returns JSON data
  4. Agent responds in Hindi → "Aapka sabse kam bechne wala product Parle-G hai..."

All conversations are stored in chat history with Redis-powered sessions for context.


License

MIT License — feel free to use and modify for your shop!


Acknowledgments


Made with ❤️ for local shop owners across India

About

AI as a manager for small scale businesses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors