Your AI-powered guide to the Vedas — learn, explore, and understand Vedic wisdom at your own pace, in your own language.

🕉

Architecture Overview

High-level design

┌─────────────────────────────────────────────────┐
│                   User                           │
│         (Vercel — chat UI)                       │
└──────────────────┬──────────────────────────────┘
                   │  POST /api/chat
                   ▼
┌─────────────────────────────────────────────────┐
│          API Layer (Render — free tier)          │
│   ┌─────────────────────────────────────────┐   │
│   │         FastAPI (Python)                │   │
│   │  - Rate limiter (30/min/IP)             │   │
│   │  - CORS locked to frontend domain       │   │
│   │  - Request validation                   │   │
│   └────────────────┬────────────────────────┘   │
│   ┌────────────────┴────────────────────────┐   │
│   │      Web Search (DDG → Google)          │   │
│   │  Retrieves public info from the web     │   │
│   └────────────────┬────────────────────────┘   │
│   ┌────────────────┴────────────────────────┐   │
│   │    Context + Prompt + Question           │   │
│   │    sent to Sarvam AI for synthesis       │   │
│   └────────────────┬────────────────────────┘   │
└──────────────────┬──────────────────────────────┘
                   │  Sarvam AI API
                   ▼
┌─────────────────────────────────────────────────┐
│            Sarvam AI (sarvam-105b)               │
│        64K context, hosted by Sarvam AI          │
└─────────────────────────────────────────────────┘

Key components

1. Frontend (veda-guru-ai-ui)

2. API Service (veda-guru-ai-api)

4. LLM — Sarvam AI

Data flow (query)

User: "What does Rig Veda say about truth?"

  1. POST /api/chat { message: "..." }
  2. Check rate limit → reject if over quota
  3. Search web (DuckDuckGo → Google fallback)
  4. Format results + question into prompt
  5. Send prompt to Sarvam AI /v1/chat/completions
  6. Parse response, attach source URLs
  7. Return { reply, sources } to frontend
  8. Frontend renders markdown + source toggle

Security

Repositories

Repo Purpose URL
veda-guru-ai-docs Documentation site GitHub
veda-guru-ai-api FastAPI chatbot backend GitHub
veda-guru-ai-ui Chat frontend GitHub