Reverie is an immersive cultural storytelling companion that brings India's heritage to life through AI-powered narration, interactive guides, and curated collections.
- Features
- Tech Stack
- System Architecture
- Workflow Diagram
- Getting Started
- Environment Variables
- Future Plans: OAuth Integration
- Contributing
- License
- AI-Powered Narration: Sarvam AI's Bulbul TTS for natural, immersive storytelling
- Interactive AI Guide: Chat with our AI guide to learn more about specific places
- Curated Collections: Explore places by theme (Spiritual, Historical, Mythological, Coastal)
- Theming: Light/Dark mode with smooth transitions
- Localization: Multi-language support (English + Indic languages coming soon)
- Responsive Design: Optimized for desktop, tablet, and mobile
- React 18
- Vite (build tool)
- Tailwind CSS (styling)
- Framer Motion (animations)
- React Router (navigation)
- Lucide React (icons)
- i18next (localization)
- Node.js
- Express.js
- Vercel Serverless Functions (for deployment)
- Axios (API requests)
- Sarvam AI:
- Text-to-Speech (Bulbul v3)
- Chat Completions
- Supabase (for future OAuth and user data)
Reverie is a full-stack web application with a clear separation between frontend and backend:
┌───────────────────────────────────────────────────────────────────┐
│ Frontend │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ React App (Vite) │ │
│ │ ┌──────────────────────────────────────────────────────────┐│ │
│ │ │ Pages & Components (Home, Collections, Place Detail, ││ │
│ │ │ AI Guide, Stories, About) ││ │
│ │ ├──────────────────────────────────────────────────────────┤│ │
│ │ │ Context Providers (Theme, Language) ││ │
│ │ ├──────────────────────────────────────────────────────────┤│ │
│ │ │ React Router (Client-Side Navigation) ││ │
│ │ └──────────────────────────────────────────────────────────┘│ │
│ │ ┌──────────────────────────────────────────────────────────┐│ │
│ │ │ Styling (Tailwind CSS, Animations via Framer Motion) ││ │
│ │ └──────────────────────────────────────────────────────────┘│ │
│ └─────────────────────────────────────────────────────────────┘ │
│ ↓↑ HTTP Requests │
└───────────────────────────────────────────────────────────────────┘
↓↑
┌───────────────────────────────────────────────────────────────────┐
│ Vercel Serverless Functions │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ /api/chat → Sarvam AI Chat Completions │ │
│ │ /api/tts → Sarvam AI Text-to-Speech (Bulbul v3) │ │
│ │ /api/places → Returns curated list of places │ │
│ │ /api/places/[placeId] → Returns detailed place info │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ ↓↑ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Sarvam AI API (External) │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Supabase (Coming Soon: OAuth & User Data) │ │
│ └─────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────┘
Here's a step-by-step breakdown of how Reverie works:
- User navigates to Reverie (Vercel deployment or local dev server)
- Frontend loads React app
- Theme/Language is loaded from localStorage
- User browses collections or trending stories
- Frontend fetches place data (for future: from
/api/places, currently from local data) - User clicks a place to view details
- User clicks "Begin Narration" or the play button
- Frontend calls
/api/ttswith the place's story text - Backend (Vercel serverless function) sends request to Sarvam AI's Text-to-Speech API
- Sarvam AI returns base64-encoded audio
- Backend sends audio back to frontend
- Frontend converts audio to playable format and starts playback
- User asks a question to the AI Guide
- Frontend calls
/api/chatwith question and (optionally) current place ID - Backend sends request to Sarvam AI's Chat Completions API with curated place context
- Sarvam AI returns storytelling-focused response
- Response is displayed in the chat interface
Follow these instructions to get a local copy of the project up and running!
Make sure you have these installed:
- Node.js (v18 or higher)
- npm, yarn, or pnpm
-
Clone the repository
git clone https://github.com/ShrutiPawar8055/Designathon.git cd Designathon -
Install dependencies
npm install
-
Set up environment variables
- Copy
.env.exampleto.envand.env.local - Fill in your
SARVAM_API_KEYand other configs (see Environment Variables)
- Copy
-
Run the app
- Frontend:
npm run dev - Backend (local):
npm run dev:backend - For Vercel deployment, just push to your repo!
- Frontend:
- Frontend runs on
http://localhost:5173 - Backend runs on
http://localhost:5000
Create a .env file (for backend) and .env.local (for frontend) in your project root:
# Backend Port (local only)
PORT=5000
# Frontend API Base (local only - uses relative path on Vercel)
VITE_API_BASE_URL=http://localhost:5000
# Supabase Configuration (for future OAuth)
SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Sarvam AI Configuration (MANDATORY)
SARVAM_API_KEY=your_sarvam_api_key
SARVAM_BASE_URL=https://api.sarvam.ai
# CORS Origin (local only)
CORS_ORIGIN=http://localhost:5173In our next phase, we'll be adding OAuth integration using Supabase Auth! Here's what we're planning:
- User Accounts: Users can sign up/login with Google, Email, or other providers
- Saved Stories: Save favorite stories and places to your account
- Personalized Recommendations: AI suggests places based on your saved stories
- Sync Across Devices: Access your saved content from anywhere
- User clicks "Sign In" button
- Frontend uses Supabase Auth UI to present login options
- User authenticates with chosen provider
- Supabase creates user session and returns JWT
- Frontend stores session securely
- Future API requests include JWT for authentication
- Backend verifies JWT with Supabase and fetches user-specific data
Stay tuned for updates!
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details (you should create one!).
Made with ❤️ for India's heritage