Skip to content
Gayatri-EducationPublic

About

Gayatri is an AI-powered educational platform that works both online and offline, providing personalized learning, AI tutoring, progress tracking, and intelligent educational assistance with support for multiple AI models and knowledge sources.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

359 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gayatri AI

Gayatri AI Platform

Curriculum-Free Adaptive AI Tutor Β· CBSE/NCERT Classes 9–12

CI Python License: MIT Version DBERT


Gayatri is an open, curriculum-free AI tutoring platform β€” any school, institute, or teacher can upload their own course material and the platform turns it into an intelligent, personalized, and trackable tutoring experience. It runs entirely on-device via local SLMs (no cloud required, no student data leaves the device), and optionally syncs with a central server for teacher oversight, analytics, and institution-level reporting.

Built at DBERT Β· Internship Program Β· Batch Aug–Oct 2026
Digital Blinc Education Research & Technology β€” India's AI Venture Studio, Delhi


🎯 What Makes It Different

Gayatri Typical EdTech
Curriculum Any subject, any institution uploads their own Fixed content only
AI runs on Your device (llama-cpp-python, no internet) Cloud APIs
Student data Never leaves the device Sent to cloud
Works offline Fully, with sync when online No
Per-student tracking Mastery, spaced review, learning events Basic progress
Teacher control 5-tier instruction cascade Limited
Deployment Desktop, local server, or cloud Cloud only

✨ Features

For Institutions

  • πŸ“‚ Plug-in any curriculum β€” upload PDF, DOCX, or JSON; the platform chunks, indexes, and activates it for RAG-based tutoring automatically
  • 🏫 Multi-tenant β€” multiple schools and orgs on one platform, fully isolated
  • πŸ“Š Institution-level analytics β€” mastery distribution, cohort health, intervention queue
  • πŸ’Έ Fee management β€” Razorpay/UPI with HMAC webhook verification

For Teachers

  • πŸ‘¨β€πŸ« 5-tier instruction cascade β€” Org β†’ Course β†’ Class β†’ Student β†’ Session (highest to lowest priority)
  • πŸ“‹ Teacher Copilot β€” AI-generated diagnostic briefings, lesson plan suggestions, class analytics
  • πŸ”” Notification system β€” alerts for struggling students, mastery milestones, intervention flags

For Students

  • 🧠 Adaptive tutoring β€” Socratic questioning, not answers. 16-step pedagogical turn lifecycle
  • πŸ“š Multi-subject β€” Classes 9–12, any subject added by the institution (NCERT/CBSE or custom)
  • πŸ”„ Spaced review scheduler β€” Ebbinghaus-decay-based review reminders
  • 🌐 8-language UI β€” English, Hindi, and 6 regional Indian languages

For Parents

  • πŸ‘ͺ Parent portal β€” progress feed, privacy controls, screen-time visibility
  • πŸ”’ 4 privacy tiers β€” Full transparency / Summary only / Restricted / Blocked

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Desktop App (PySide6)                      β”‚
β”‚  Student Portal β”‚ Teacher Portal β”‚ Parent Portal β”‚ Fee Admin β”‚
β”‚                     Admin Portal                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚  QWebChannel Bridge
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Central Platform (FastAPI)                      β”‚
β”‚  /api/v1 β€” 21 routers Β· Auth Β· Students Β· Teachers          β”‚
β”‚  Courses Β· Sessions Β· RAG Β· Assessment Β· Analytics           β”‚
β”‚  Notifications Β· Sync Β· Fees Β· Payments Β· i18n              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   SQLite (WAL mode)    β”‚  β”‚   Local SLM (llama-cpp-python)  β”‚
β”‚   50 tables, 8 migs    β”‚  β”‚   Qwen2.5-0.5B Β· no Ollama     β”‚
β”‚   offline-first        β”‚  β”‚   runs on CPU, 1GB RAM           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            Offline Sync (when online)                      β”‚
β”‚   LocalSyncOutbox β†’ SyncService β†’ Central DB               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core modules:

  • central_platform/ β€” FastAPI server, 21 API routers, auth, db, sync engine
  • central_platform/tutor/orchestrator.py β€” 16-step GenericTutorOrchestrator
  • central_platform/ai/ β€” AI gateway, model router, adapters, policy engine
  • central_platform/rag/ β€” Scoped RAG, hybrid retrieval, version-pinned knowledge
  • app/ β€” PySide6 desktop shell, portal controllers, WebEngine bridge
  • local_runtime/ β€” Standalone offline runtime (course cache, RAG cache, sync outbox)
  • migrations/ β€” 8 SQL DDL migrations (001–008) with reversible down-scripts
  • data/ β€” Bundled NCERT curriculum and RAG seed data
  • scripts/ β€” Database migration, seeding, inspection, and ops utilities

πŸš€ Quick Start

Prerequisites

  • Python 3.12+
  • Git

1. Clone & Install

git clone https://github.com/Gayatri-Education/Gayatri.git
cd Gayatri

# Windows (recommended)
setup.bat          # creates .venv, installs deps, runs migrations, launches app

# Or manually:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

2. Configure Environment

Create a .env file in the repo root:

# Database
GAYATRI_DB_PATH=gayatri_local.db
GAYATRI_ENV=development          # or 'production'

# AI (optional β€” omit to run in mock/dev mode)
GAYATRI_LOCAL_MODEL_PATH=models/qwen2.5-0.5b-instruct-q4_k_m.gguf

# Cloud fallback keys (all optional)
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GEMINI_API_KEY=

# Security β€” CHANGE THIS IN PRODUCTION
JWT_SECRET_KEY=dev-secret-key-change-in-production-32-bytes-min
GAYATRI_ENCRYPTION_KEY=

3. Initialize Database

python -m python scripts/migrate_db.py up --db-path gayatri_local.db
# Or via Python:
python -c "from central_platform.db import PlatformDatabase; db = PlatformDatabase(); print('Ready. Tables:', len(db.get_table_names()))"

Runs all 8 migrations automatically (001–008).

4. Download a Local Model (Optional)

# Recommended β€” 400MB, runs on any CPU with 1GB RAM
python install_llama.py

Or manually download from HuggingFace and place in models/.

Without a model, the platform uses MockAIAdapter β€” fully functional for development and testing.

5. Start the Platform

# Desktop application (Windows)
run.bat
# or
python -m app.main

# REST API server only
python -m uvicorn central_platform.api.server:app --host 0.0.0.0 --port 8000

# Local dev environment (API + seed data)
python scripts/launch_local_environment.py

Once running:

  • πŸ“– Swagger UI: http://localhost:8000/docs
  • πŸ“‹ ReDoc: http://localhost:8000/redoc
  • βœ… Liveness: GET /healthz
  • βœ… Readiness: GET /readyz

🏫 Adding a Curriculum

Gayatri is curriculum-free by design. To add a new course for your institution:

  1. Prepare your material β€” PDF, DOCX, or structured JSON
  2. Upload via Admin Portal β€” the platform chunks, embeds, and indexes it into the RAG pipeline
  3. Publish a course version β€” goes through an approval workflow before students see it
  4. Students enroll β€” and the tutor immediately works with your content

The same Socratic tutoring engine, mastery tracking, and teacher controls work for any subject added this way.

See docs/operations/deployment-guide.md for institution setup.


πŸ§ͺ Running Tests

1,252 tests, all must pass. CI enforces this on every push.

# Full suite (~90 seconds)
python -m pytest -q -m "not gui"

# Key areas
python -m pytest tests/test_phase01_auth_identity_remediation.py -v      # Auth & security
python -m pytest tests/test_phase06_scoped_rag_authorization.py -v       # RAG & curriculum
python -m pytest tests/test_phase22_security_privacy_isolation_audit.py -v  # Privacy
python -m pytest tests/test_phase25_performance_capacity_verification.py -v  # Performance
python -m pytest tests/test_phase43_production_readiness_gate.py -v      # Release gate

πŸ” Security

  • Zero-trust auth β€” JWT with JTI revocation list. Every API route requires a valid bearer token
  • Tenant isolation β€” Cross-organisation requests blocked at both API and DB query levels
  • Answer leakage prevention β€” AI responses scanned for exact solution strings before delivery to students
  • Prompt injection defense β€” Multi-stage sanitization at QWebChannel bridge and API ingress
  • Local-only by default β€” Student data never transmitted to cloud providers (LOCAL_ONLY privacy mode)
  • HMAC payment verification β€” Razorpay webhook signatures verified with constant-time comparison
  • Audit trail β€” All AI executions logged with telemetry in ai_execution_logs table

See docs/SECURITY_MODEL.md Β· docs/security/RBAC_POLICY_V4.md


πŸ“ Project Structure

Gayatri/
β”œβ”€β”€ app/                        # PySide6 desktop shell
β”‚   β”œβ”€β”€ bridge/                 # QWebChannel facade bridge
β”‚   β”œβ”€β”€ portals/                # Portal controllers (student, teacher, parent, admin)
β”‚   └── main.py                 # Desktop entry point
β”œβ”€β”€ central_platform/           # FastAPI server + all platform logic
β”‚   β”œβ”€β”€ ai/                     # AI gateway, model router, adapters, policy engine
β”‚   β”œβ”€β”€ api/routes/             # 21 REST routers (students, courses, RAG, sessions…)
β”‚   β”œβ”€β”€ auth/                   # JWT auth, RBAC, dependency injection
β”‚   β”œβ”€β”€ tutor/orchestrator.py   # 16-step GenericTutorOrchestrator ← primary engine
β”‚   β”œβ”€β”€ rag/                    # Scoped RAG, hybrid vector+BM25 retrieval
β”‚   β”œβ”€β”€ courses/                # Course domain model, versioning, enrollment
β”‚   β”œβ”€β”€ learning/               # Mastery engine, canonical state, DAG graph
β”‚   β”œβ”€β”€ assessment/             # EvaluatorRegistry, rubrics, anti-leakage
β”‚   β”œβ”€β”€ teacher/                # 5-tier instruction cascade
β”‚   β”œβ”€β”€ sync/                   # Bi-directional sync + conflict resolution
β”‚   β”œβ”€β”€ fees/                   # Fee accounts, invoicing
β”‚   β”œβ”€β”€ payments/               # Razorpay, UPI, mock adapters
β”‚   β”œβ”€β”€ i18n/                   # 8-language internationalisation
β”‚   β”œβ”€β”€ recovery/               # FailureRecoveryManager, resilience contracts
β”‚   └── db.py                   # PlatformDatabase (SQLite WAL, 50 tables, 8 migrations)
β”œβ”€β”€ core/                       # Legacy tutor engine + provider base
β”‚   β”œβ”€β”€ providers/              # LLM provider base classes and registry
β”‚   └── orchestrator.py         # Original single-subject tutor (legacy)
β”œβ”€β”€ local_runtime/              # Offline-first engine (cache, sync outbox, session)
β”œβ”€β”€ migrations/                 # SQL DDL 001–008 + down-scripts
β”œβ”€β”€ data/                       # Bundled NCERT curriculum and RAG seed data
β”œβ”€β”€ scripts/                    # Ops scripts: migrate, seed, inspect, benchmark, verify
β”œβ”€β”€ hooks/                      # PyInstaller hooks for llama_cpp
β”œβ”€β”€ packaging/                  # Windows installer (PyInstaller + Inno Setup)
β”œβ”€β”€ training/                   # SLM prompt contracts, fine-tuning scripts, and alignment data
β”œβ”€β”€ docs/                       # Architecture, security, and operations docs
β”œβ”€β”€ tests/                      # 1,252 tests across 43 verification phases
β”œβ”€β”€ model_manifest.json         # Local SLM registry (Qwen2.5-0.5B, GGUF Q4_K_M)
β”œβ”€β”€ setup.bat                   # One-click Windows setup & launch
β”œβ”€β”€ run.bat                     # Silent desktop launch
└── pyproject.toml              # Project config, pytest settings, linting

πŸ“š Documentation

Document Description
ARCHITECTURE.md System design, 16-step orchestrator, data flows
DATA_MODEL.md 50 database tables, relations, dataclasses
SECURITY_MODEL.md Security invariants, threat model
RBAC Policy Role permissions, audit findings
LEARNING_GRAPH.md Mastery model, Ebbinghaus decay, prerequisites
DEPLOYMENT.md Production and institution deployment guide
PRIVACY_CONTRACT.md Student data privacy guarantees
TESTING_STRATEGY.md Test architecture and coverage strategy
API Contract OpenAPI route specification
Deployment Guide Institution onboarding and curriculum setup

🀝 Contributing

  1. Fork the repository
  2. Create a branch: git checkout -b feature/your-feature
  3. Ensure all tests pass: python -m pytest -q -m "not gui"
  4. Open a Pull Request to main β€” CI must be green

See CONTRIBUTING.md for code style, tool guidelines, and cooperative cancellation requirements.


🏒 Built at DBERT

Gayatri AI was designed, built, and shipped by the engineering squad at DBERT β€” India's AI Venture Studio based in Delhi.

DBERT (Digital Blinc Education Research & Technology) incubates AI startups for equity, ships enterprise SaaS, and trains engineers through a production-grade fellowship program. Gayatri is one of the ventures built under the DBERT Internship Program, Batch Aug–Oct 2026.


πŸ“„ License

MIT License β€” see LICENSE.md for details.


Built with ❀️ for Indian students Β· Classes 9–12 Β· Curriculum-free Β· Privacy-first
DBERT Internship Program Β· Batch Aug–Oct 2026

About

Gayatri is an AI-powered educational platform that works both online and offline, providing personalized learning, AI tutoring, progress tracking, and intelligent educational assistance with support for multiple AI models and knowledge sources.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages