Skip to content

ayushcodes13/Ask-Krishna

Repository files navigation

🦚 Ask Krishna

Seek Divine Guidance Through the Wisdom of the Bhagavad Gita

Status Python 3.9+ FastAPI Supabase Groq
Ask Krishna Interface Preview


✨ Features & Capabilities

Ask Krishna has been built from the ground up as a fully-fledged SaaS portfolio project. It demonstrates full-stack engineering, complete with authentication, real-time streaming, database integration, and a beautiful UI adhering to a Sacred Minimalism aesthetic.

  • 🔐 Secure Authentication: Email/Password and Google OAuth login flows powered by Supabase GoTrue.
  • 📖 "Your Journey" History: Persistent chat sessions stored in PostgreSQL. Revisit past dialogues via a beautiful, journal-style sidebar.
  • 💎 Freemium Tiering: Intelligent rate-limiting and usage tracking. Free users receive 5 divine answers per day before triggering a "Pro" upgrade modal.
  • 🖼️ Viral Share Cards: Generates gorgeous, downloadable image cards of verses using html2canvas, optimized for Instagram, Twitter, and WhatsApp.
  • Saved Wisdom: Users can bookmark verses that resonate with them, storing them in a dedicated Supabase table for later reflection.
  • 👋 Personalized Onboarding: A welcoming modal for new souls with "Suggestion Chips" to instantly jumpstart their journey.
  • 👍 Feedback Loop: Users can thumbs-up or thumbs-down responses to help curate the AI's instruction set over time.
  • 📊 Admin Dashboard: A secure control panel (admin.html) to monitor total users, active subscriptions, and daily platform usage metrics.
  • 📨 Notification Worker: A background Python script (worker.py) built to simulate the dispatch of "Daily Verses" and re-engagement emails.

🛠 Tech Stack & Architecture

Component Technology Description
Backend FastAPI High-performance Python async framework handling APIs and SSE streaming.
Database & Auth Supabase Managed PostgreSQL with Row-Level Security (RLS) and JWT auth.
AI Engine Groq Cloud Utilizing Llama 3 for blazing-fast inference and conversational persona.
RAG/Embeddings SentenceTransformers Local all-MiniLM-L6-v2 model for semantic retrieval of Gita verses.
Frontend HTML/CSS/JS Pure vanilla implementation. Zero bloat, ensuring maximum performance.

🚀 Getting Started (Local Development)

1. Prerequisites

You will need Python 3.9+ and a Supabase project.

2. Environment Variables

Create a .env file in the root directory and securely populate your keys:

GROQ_API_KEY=your_groq_api_key_here
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your_supabase_anon_key_here

3. Database Migration

Run the provided SQL script supabase_setup_usage.sql in your Supabase SQL Editor. This initializes the chat_sessions, chat_messages, user_usage, and saved_verses tables along with their RLS policies.

4. Installation

Create a virtual environment and install the dependencies to keep your system clean:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

5. Running the Application

Start the FastAPI server:

uvicorn app:app --host 0.0.0.0 --port 8000 --reload

The divine experience will be available at http://localhost:8000.


🎨 Design Philosophy: Sacred Minimalism

The UI ditches the generic "SaaS look" for an ancient, premium, temple-like atmosphere.

  • Midnight (#1A1200) and Warm Parchment (#FDF3DC) contrasts.
  • Marigold Gold (#E8A020) and Peacock Teal (#1A6B72) accents.
  • Typography relies on Yeseva One and Crimson Pro for a readable, classic-feeling body text.

Built with reverence as a portfolio project.

About

Your personal guide through the timeless wisdom of the Bhagavad Gita. Ask. Listen. Live wiser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors