Smart India Hackathon 2025 (SIH25104)
An intelligent multilingual chatbot platform designed to democratize access to educational information across language barriers in India.
- Multilingual Support: English, Hindi, Marathi, and Marwari
- RAG-Powered Responses: Document-based question answering using FAISS vector search
- AI-Powered Chat: Google Gemini API for intelligent responses
- Admin Dashboard: Document management and system analytics
- Voice Input: Speech-to-text support (Google Cloud Speech)
- Handoff System: Escalate complex queries to human administrators
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- shadcn/ui components
- FastAPI (Python)
- Google Gemini API
- FAISS vector store
- Sentence Transformers
- Google Cloud Speech-to-Text
- Node.js 18+
- Python 3.9+
- Google Gemini API key
-
Clone repository
git clone <repository-url> cd vidya-vaani-v0
-
Install frontend dependencies
npm install
-
Install backend dependencies
cd backend pip install -r requirements.txt cd ..
-
Configure environment
Create
.env.localin project root:NEXT_PUBLIC_DEV_MODE=false NEXT_PUBLIC_BACKEND_URL=http://localhost:8000 GEMINI_API_KEY=your_gemini_api_key_here
Create
backend/.env:DEMO_MODE=false GEMINI_API_KEY=your_gemini_api_key_here
-
Start backend
cd backend python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload -
Start frontend (in a new terminal)
npm run dev
-
Access the application
- Chat Interface: http://localhost:3000
- Admin Dashboard: http://localhost:3000/admin
- Navigate to Admin Dashboard
- Go to "Documents" tab
- Upload educational documents (PDF, DOCX, TXT, MD)
- Documents are automatically indexed using FAISS
- Select preferred language
- Ask questions about uploaded documents
- AI responds with context from the knowledge base
- Statistics: View system metrics and document counts
- Documents: Manage uploaded files
- Handoffs: Review queries escalated to human administrators
vidya-vaani-v0/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── admin/ # Admin dashboard pages
│ └── ...
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── core/ # Configuration
│ └── requirements.txt
├── components/ # React components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── retriever/ # RAG system (FAISS, embeddings)
├── public/ # Static assets
└── styles/ # Global styles
POST /api/v1/chat/text- Send text messagePOST /api/v1/chat/audio- Send voice message
POST /api/v1/documents/upload- Upload documentGET /api/v1/documents/list- List all documents
GET /api/v1/admin/stats- System statisticsGET /api/v1/handoffs/list- List handoff requests
npm test # Frontend tests
cd backend && pytest # Backend testsnpm run lint # ESLintFrontend (.env.local)
NEXT_PUBLIC_DEV_MODE- Enable/disable dev mode (true/false)NEXT_PUBLIC_BACKEND_URL- Backend API URLGEMINI_API_KEY- Google Gemini API key
Backend (backend/.env)
DEMO_MODE- Use mock services (true/false)GEMINI_API_KEY- Google Gemini API keySUPABASE_URL- Supabase URL (optional)SUPABASE_ANON_KEY- Supabase anon key (optional)
The system uses a modular service architecture with dependency injection:
- Frontend - Next.js handles UI and API routing
- Backend API - FastAPI orchestrates services
- RAG Service - FAISS vector store for document retrieval
- LLM Service - Google Gemini for response generation
- Storage Service - Local file storage for documents
This project was developed for Smart India Hackathon 2025.
MIT License
- Google Gemini API for AI capabilities
- FAISS for efficient vector search
- Smart India Hackathon 2025 for the opportunity
Built with ❤️ for Smart India Hackathon 2025