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
| 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 |
- π 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
- π¨βπ« 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
- π§ 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
- πͺ Parent portal β progress feed, privacy controls, screen-time visibility
- π 4 privacy tiers β Full transparency / Summary only / Restricted / Blocked
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 enginecentral_platform/tutor/orchestrator.pyβ 16-step GenericTutorOrchestratorcentral_platform/ai/β AI gateway, model router, adapters, policy enginecentral_platform/rag/β Scoped RAG, hybrid retrieval, version-pinned knowledgeapp/β PySide6 desktop shell, portal controllers, WebEngine bridgelocal_runtime/β Standalone offline runtime (course cache, RAG cache, sync outbox)migrations/β 8 SQL DDL migrations (001β008) with reversible down-scriptsdata/β Bundled NCERT curriculum and RAG seed datascripts/β Database migration, seeding, inspection, and ops utilities
- Python 3.12+
- Git
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.txtCreate 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=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).
# Recommended β 400MB, runs on any CPU with 1GB RAM
python install_llama.pyOr manually download from HuggingFace and place in models/.
Without a model, the platform uses MockAIAdapter β fully functional for development and testing.
# 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.pyOnce running:
- π Swagger UI:
http://localhost:8000/docs - π ReDoc:
http://localhost:8000/redoc - β
Liveness:
GET /healthz - β
Readiness:
GET /readyz
Gayatri is curriculum-free by design. To add a new course for your institution:
- Prepare your material β PDF, DOCX, or structured JSON
- Upload via Admin Portal β the platform chunks, embeds, and indexes it into the RAG pipeline
- Publish a course version β goes through an approval workflow before students see it
- 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.
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- 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_ONLYprivacy mode) - HMAC payment verification β Razorpay webhook signatures verified with constant-time comparison
- Audit trail β All AI executions logged with telemetry in
ai_execution_logstable
See docs/SECURITY_MODEL.md Β· docs/security/RBAC_POLICY_V4.md
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
| 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 |
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature - Ensure all tests pass:
python -m pytest -q -m "not gui" - Open a Pull Request to
mainβ CI must be green
See CONTRIBUTING.md for code style, tool guidelines, and cooperative cancellation requirements.
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.
- π dbert.online
- π Startup Portfolio
- π DBERT Fellowship Program
- πΌ Internship Portal
MIT License β see LICENSE.md for details.
DBERT Internship Program Β· Batch AugβOct 2026
