An AI-powered teaching assistant designed specifically for rural education
Sahayak empowers rural teachers with AI-driven educational tools to create engaging content, worksheets, lesson plans, and interactive learning materials with minimal resources. Built with cultural sensitivity and designed for low-resource environments.
| Feature | Description | Status |
|---|---|---|
| ๐ Story Generator | Create culturally relevant educational stories | โ Ready |
| ๐ Worksheet Generator | Multi-level practice exercises for different grades | โ Ready |
| ๐ง Q&A Assistant | Answer student questions with local examples | โ Ready |
| ๐จ Drawing Guide | Step-by-step blackboard drawing instructions | โ Ready |
| Feature | Description | Status |
|---|---|---|
| ๐ท Visual Analysis | Upload textbook photos โ Generate worksheets | โ Ready |
| ๐ค Audio Tools | Text-to-speech and voice input capabilities | โ Ready |
| ๐ Lesson Planner | Comprehensive lesson planning with curriculum alignment | โ Ready |
| ๐ฎ Interactive Games | Educational games for math, language, and science | โ Ready |
- ๐ Offline-Ready: Works with limited internet connectivity
- ๐ฑ Mobile-First: Optimized for smartphones and tablets
- ๐ซ Multi-Grade Support: Content for different grade levels
- ๐ฎ๐ณ Cultural Context: Hindi & English with local examples
- ๐ก Resource-Conscious: Designed for minimal resource environments
- Node.js 16+ installed
- Google Gemini API key (Get free key)
# Clone the repository
git clone https://github.com/yourusername/sahayak-app.git
cd sahayak-app
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Edit .env and add your Gemini API key
# Start development server
npm run devCreate a .env file in the root directory:
# Google Gemini API Key
VITE_GEMINI_API_KEY=your_actual_gemini_api_key_hereTransform any textbook into interactive content:
- Upload textbook photos via camera or file upload
- AI analyzes the content using Google Gemini Vision
- Generates educational materials:
- ๐ Comprehension questions
- ๐ Practice worksheets
- ๐ Story adaptations
- ๐ฏ Lesson plans
Choose from 25+ Gemini models including:
- ๐ Gemini 2.5 Flash (FREE - Newest & Fastest)
- ๐ง Gemini 2.5 Pro (PAID - Most Advanced)
- โก Gemini 2.0 Flash Experimental (FREE - Latest Features)
- ๐ฌ Multiple specialized models for different use cases
- Frontend: React 19 + Vite for fast development
- Styling: CSS-in-JS with responsive design system
- Animations: Framer Motion for smooth interactions
- AI Integration: Google Gemini API with vision capabilities
- Icons: Lucide React for consistent iconography
- PDF Generation: jsPDF for downloadable content
| Device | Breakpoint | Features |
|---|---|---|
| ๐ฑ Mobile | < 480px | Single column, large touch targets |
| ๐ Tablet | 481px - 768px | Two-column grid, balanced layout |
| ๐ป Desktop | > 768px | Multi-column, full feature set |
sahayak-app/
โโโ ๐ public/ # Static assets
โ โโโ ๐จ sahayak-icon.svg # App icon
โ โโโ ๐ favicon.ico # Browser favicon
โโโ ๐ src/
โ โโโ ๐ components/ # React components
โ โ โโโ ๐จ CameraTools.jsx # Image analysis
โ โ โโโ ๐ ContentGenerator.jsx # Story creation
โ โ โโโ ๐ WorksheetGenerator.jsx # Worksheet tools
โ โ โโโ ๐ง KnowledgeBase.jsx # Q&A assistant
โ โ โโโ ๐จ VisualAidGenerator.jsx # Drawing guide
โ โ โโโ ๐ค AudioTools.jsx # Voice features
โ โ โโโ ๐
LessonPlanner.jsx # Lesson planning
โ โ โโโ ๐ฎ InteractiveGames.jsx # Educational games
โ โ โโโ โ๏ธ ApiKeyModal.jsx # Configuration
โ โโโ ๐ hooks/ # Custom React hooks
โ โ โโโ ๐ useApiKey.js # API key management
โ โ โโโ ๐ค useGeminiAI.js # AI integration
โ โโโ ๐ utils/ # Utility functions
โ โ โโโ ๐ pdfGenerator.js # PDF creation
โ โ โโโ โ ๏ธ errorHandler.js # Error management
โ โ โโโ โก performance.js # Optimization
โ โโโ ๐จ App.jsx # Main application
โ โโโ ๐จ index.css # Global styles
โ โโโ โก main.jsx # Entry point
โโโ ๐ง package.json # Dependencies
โโโ โ๏ธ vite.config.js # Build configuration
โโโ ๐ .env # Environment variables
โโโ ๐ README.md # This file
-
Build the project
npm run build
-
Deploy to Firebase
- Go to Firebase Console
- Create new project: "sahayak-app"
- Enable Hosting
- Upload files from
distfolder
-
Your app is live!
- URL:
https://sahayak-app.web.app
- URL:
๐น Vercel Deployment
npm i -g vercel
vercel๐น Netlify Deployment
- Run
npm run build - Upload
distfolder to Netlify - Configure environment variables
// 1. Generate educational story
const story = await generateContent('content', {
topic: 'Friendship',
gradeLevel: '5',
language: 'Hindi'
});
// 2. Create worksheet from textbook photo
const worksheet = await analyzeImage(textbookPhoto, 'questions');
// 3. Plan comprehensive lesson
const lessonPlan = await createLesson({
subject: 'Mathematics',
topic: 'Fractions',
duration: '45 minutes'
});// Custom hook usage
const { callGeminiOptimized, loading } = useGeminiAI(genAI, selectedModel);
// Generate content with image
const result = await callGeminiOptimized(prompt, imageData);๐น View All 25+ Models
| Model | Type | Cost | Best For |
|---|---|---|---|
| Gemini 2.5 Flash | Latest | FREE | General use, fastest |
| Gemini 2.5 Pro | Latest | PAID | Advanced reasoning |
| Gemini 2.0 Flash Exp | Experimental | FREE | Latest features |
| Gemini 1.5 Flash | Stable | FREE | Reliable performance |
| Gemini 1.5 Pro | Stable | PAID | Complex tasks |
| ... and 20+ more models |
# Required
VITE_GEMINI_API_KEY=your_api_key_here
# Optional (for advanced configuration)
VITE_APP_NAME=Sahayak
VITE_APP_VERSION=1.0.0We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Test thoroughly
npm run dev npm run build
- Submit a pull request
- ๐ Follow existing code style
- โ Add tests for new features
- ๐ Update documentation
- ๐ Fix bugs with test cases
- ๐จ Maintain responsive design
- โก Fast Loading: Optimized bundle with code splitting
- ๐ฑ Mobile Optimized: 90+ Lighthouse score
- ๐ Offline Ready: Service worker for caching
- ๐ Real-time: Instant AI responses
- ๐ API Key Protection: Client-side validation
- ๐ก๏ธ Input Sanitization: XSS prevention
- ๐ HTTPS Only: Secure connections
- ๐ซ No Data Storage: Privacy-first approach
- ๐ Offline Mode: Complete offline functionality
- ๐ฏ Assessment Tools: Student progress tracking
- ๐ค Collaboration: Teacher-to-teacher sharing
- ๐ Analytics: Usage insights and reporting
- ๐จ Themes: Customizable UI themes
- ๐ More Languages: Regional language support
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ Built for rural teachers and students
- ๐ค Powered by Google Gemini AI
- ๐ Designed with accessibility and inclusivity
- โค๏ธ Made with love for education
โญ Star this repository if it helped you!
Made with โค๏ธ for rural education in India