A spiritual wisdom application featuring the timeless verses (dohas) of Sant Kabir, with AI-powered search using local embeddings and LLM synthesis.
- 🔍 Semantic Search - Find relevant dohas using natural language queries
- 🤖 AI Synthesis - Groq LLM provides contextual interpretations
- 🏠 Local Embeddings - Runs Transformers.js locally (no external API needed)
- 📱 Mobile-First Design - Responsive, serene UI
- ⚡ Smart Caching - LRU cache for repeated queries
- Framework: Next.js 16 (Pages Router + App Router for APIs)
- Embeddings: Transformers.js (
multilingual-e5-small) - LLM: Groq (llama-3.3-70b-versatile)
- Auth: Firebase
- Styling: TailwindCSS v4
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API keys
# Run development server
npm run devGROQ_API_KEY=your_groq_api_key
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_CLIENT_EMAIL=your_client_email
FIREBASE_PRIVATE_KEY=your_private_keysrc/
├── app/api/ # API routes (App Router)
├── pages/ # Page components (Pages Router)
├── components/
│ ├── ui/ # UI Kit (Input, Card, Chip, etc.)
│ ├── Layouts/ # Page layouts
│ └── ... # Feature components
├── hooks/ # Custom React hooks
├── lib/ # Core logic (embeddings, search, config)
└── types/ # TypeScript definitions
- Google Cloud SDK installed
- A GCP project with billing enabled
.env.productionfile with your environment variables
# 1. Authenticate with GCP (if not already)
gcloud auth login
# 2. Set your project
gcloud config set project YOUR_PROJECT_ID
# 3. Create .env.production with your secrets
cp .env.example .env.production
# Edit .env.production with your API keys
# 4. Deploy using the provided script
./deploy_cloud_run.shThe script will:
- Extract environment variables from
.env.production - Build the Docker image with the embedding model pre-loaded
- Deploy to Cloud Run in
us-central1
If you prefer to deploy manually:
gcloud run deploy kabir-dohas \
--source . \
--region us-central1 \
--allow-unauthenticated \
--memory 1Gi \
--port 8080See the docs/ folder for detailed documentation:
ARCHITECTURE.md- System designDEVELOPMENT.md- Development guideDECISION_LOG.md- Technical decisionsCODEBASE_CONTEXT.md- AI-friendly codebase map
MIT