Skip to content

ItsAakif/Sahayak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ Sahayak - AI Teaching Assistant for Rural Education

Sahayak Logo

An AI-powered teaching assistant designed specifically for rural education

React Vite Google Gemini License: MIT

๐Ÿš€ Live Demo โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿค Contributing

๐ŸŒŸ Overview

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.

โœจ Features

๐ŸŽจ Content Creation Tools

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

๐Ÿ”ฌ Advanced AI Tools

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

๐ŸŒ Rural Education Focus

  • ๐ŸŒ 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

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16+ installed
  • Google Gemini API key (Get free key)

Installation

# 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 dev

๐Ÿ”ง Environment Setup

Create a .env file in the root directory:

# Google Gemini API Key
VITE_GEMINI_API_KEY=your_actual_gemini_api_key_here

๐ŸŽฏ Key Capabilities

๐Ÿ“ธ Textbook Photo Analysis

Transform any textbook into interactive content:

  1. Upload textbook photos via camera or file upload
  2. AI analyzes the content using Google Gemini Vision
  3. Generates educational materials:
    • ๐Ÿ“ Comprehension questions
    • ๐Ÿ“‹ Practice worksheets
    • ๐Ÿ“š Story adaptations
    • ๐ŸŽฏ Lesson plans

๐Ÿค– AI Model Selection

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

๐Ÿ› ๏ธ Technology Stack

Frontend AI/ML Development Deployment
React Google Gemini Vite Firebase
Framer Motion AI Vision ESLint Vercel

Core Technologies

  • 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

๐Ÿ“ฑ Responsive Design

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

๐Ÿ—๏ธ Project Structure

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

๐Ÿš€ Deployment

Firebase Hosting (Recommended)

  1. Build the project

    npm run build
  2. Deploy to Firebase

    • Go to Firebase Console
    • Create new project: "sahayak-app"
    • Enable Hosting
    • Upload files from dist folder
  3. Your app is live!

    • URL: https://sahayak-app.web.app

Alternative Deployments

๐Ÿ”น Vercel Deployment
npm i -g vercel
vercel
๐Ÿ”น Netlify Deployment
  1. Run npm run build
  2. Upload dist folder to Netlify
  3. Configure environment variables

๐ŸŽฏ Usage Examples

For Teachers

// 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'
});

For Developers

// Custom hook usage
const { callGeminiOptimized, loading } = useGeminiAI(genAI, selectedModel);

// Generate content with image
const result = await callGeminiOptimized(prompt, imageData);

๐Ÿ”ง Configuration

API Models Available

๐Ÿ”น 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

Environment Variables

# Required
VITE_GEMINI_API_KEY=your_api_key_here

# Optional (for advanced configuration)
VITE_APP_NAME=Sahayak
VITE_APP_VERSION=1.0.0

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

Development Setup

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly
    npm run dev
    npm run build
  5. Submit a pull request

Contribution Guidelines

  • ๐Ÿ“ Follow existing code style
  • โœ… Add tests for new features
  • ๐Ÿ“– Update documentation
  • ๐Ÿ› Fix bugs with test cases
  • ๐ŸŽจ Maintain responsive design

๐Ÿ“Š Performance

  • โšก Fast Loading: Optimized bundle with code splitting
  • ๐Ÿ“ฑ Mobile Optimized: 90+ Lighthouse score
  • ๐ŸŒ Offline Ready: Service worker for caching
  • ๐Ÿ”„ Real-time: Instant AI responses

๐Ÿ”’ Security

  • ๐Ÿ” API Key Protection: Client-side validation
  • ๐Ÿ›ก๏ธ Input Sanitization: XSS prevention
  • ๐Ÿ”’ HTTPS Only: Secure connections
  • ๐Ÿšซ No Data Storage: Privacy-first approach

๐Ÿ“ˆ Roadmap

  • ๐ŸŒ 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

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • ๐ŸŽ“ 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

๐Ÿ” Back to Top

About

https://sahayak-0.web.app/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors