A modern web application that brings ancient Indian wisdom from the Bhagavad Gita to the digital age, featuring AI-powered insights and an interactive user interface.
- Wisdom Cards: Browse through verses from the Bhagavad Gita with original Sanskrit text and English translations
- AI Insights: Get modern interpretations and insights for each verse powered by Google's Gemini AI
- Like System: Save your favorite verses for future reference
- Infinite Scroll: Seamlessly discover new verses as you scroll
- Frontend: React.js with Vite
- Styling: Bootstrap 5 + Custom CSS
- Database: Supabase (with CSV fallback)
- AI Integration: Google Gemini API
- Backend: Node.js with Express
The backend supports toggling between Supabase and CSV file as the data source. This is useful when Supabase free tier is disabled or unavailable.
Set the USE_CSV environment variable to true:
USE_CSV=trueWhen enabled, the server will read from wisdom_posts_rows.csv in the root directory instead of Supabase.
Leave USE_CSV unset or set to false:
USE_CSV=false
# or simply don't set itIf Supabase is configured but fails (e.g., free tier disabled), the server will automatically fall back to the CSV file if available.
# Data source toggle (optional, defaults to Supabase)
USE_CSV=true # or false
# Supabase configuration (required if USE_CSV=false)
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_KEY=your_supabase_key
# Gemini API (required for AI insights)
GEMINI_API_KEY=your_gemini_api_key
# Server port (optional, defaults to 5000)
PORT=5000- Node.js (v16 or higher)
- npm or yarn
- Google Gemini API key (for AI insights feature)
npm installCreate a .env file in the root directory:
# Backend API URL (for frontend to connect to backend)
VITE_API_URL=http://localhost:5000
# Data source toggle (optional, defaults to Supabase)
USE_CSV=true # Set to true to use CSV file, false for Supabase
# Supabase configuration (required if USE_CSV=false)
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_KEY=your_supabase_key
# Gemini API (required for AI insights)
GEMINI_API_KEY=your_gemini_api_key
# Backend server port (optional, defaults to 5000)
PORT=5000Note: For local development with CSV, you only need:
VITE_API_URL=http://localhost:5000USE_CSV=trueGEMINI_API_KEY=your_key(if you want AI insights)
Open a terminal and run:
# Run backend server (with auto-reload on changes)
npm run server:dev
# Or run without auto-reload
npm run serverThe backend will start on http://localhost:5000 (or the port specified in your .env file).
Open a new terminal and run:
npm run devThe frontend will start on http://localhost:5173 (Vite's default port).
Open your browser and navigate to:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- Health Check: http://localhost:5000/health
For the quickest local setup without Supabase:
- Create
.envfile:
VITE_API_URL=http://localhost:5000
USE_CSV=true
GEMINI_API_KEY=your_gemini_api_key- Run backend:
npm run server:dev- Run frontend (in another terminal):
npm run dev- Backend not starting: Make sure port 5000 (or your configured port) is not already in use
- Frontend can't connect to backend: Verify
VITE_API_URLin.envmatches your backend URL - CSV file not found: Ensure
wisdom_posts_rows.csvis in the root directory - AI insights not working: Check that
GEMINI_API_KEYis set correctly
- Frontend: https://indic-wisdom.vercel.app
- Backend: https://indic-wisdom-backend.onrender.com