Travel anywhere in the world, across any time period. See yourself in history!
๐ Live Demo โข โญ GitHub โข ๐ Docs
![]() Complete UI |
![]() Authentication |
![]() AI Generation |
![]() Location Intelligence |
![]() Nearby Places |
![]() Terminal Mode |
![]() Motia Workbench |
![]() Motia Cloud |
![]() Request Tracing |
| Feature | Description |
|---|---|
| ๐ค AI Image Generation | 2K photorealistic images via Gemini 3 Pro (Nano Banana) |
| ๐บ๏ธ Street View Integration | Real Google Maps imagery as AI context |
| ๐ฆ๏ธ Location Intelligence | Weather, air quality, nearby places |
| ๐ Secure Auth | Google/GitHub OAuth via Supabase |
| ๐ Private History | Your travel history is only visible to you |
| ๐ค Traveler Insertion | Insert yourself into any scene |
| ๐จ 5 Art Styles | Photorealistic, Cyberpunk, Renaissance, Impressionist, Baroque |
| ๐ฐ๏ธ Any Era | Ancient Rome to 2150+ |
| โก Real-time Streaming | Live progress via Motia Streams |
| ๐๏ธ Audio Narration | AI-generated voice descriptions |
- Node.js 18+
- Gemini API Key
- Google Maps API Key
- Supabase Project (for auth & storage)
git clone https://github.com/rohitg00/time-traveller.git
cd time-traveller
npm installCreate .env in project root:
# AI & Maps
GEMINI_API_KEY=your_gemini_key
GOOGLE_API_KEY=your_google_maps_key
VITE_GOOGLE_API_KEY=your_google_maps_key
# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
# JWT
JWT_SECRET=your_secret
JWT_EXPIRATION=24h# Terminal 1: Backend
npm run backend
# Terminal 2: Frontend
npm run dev| Service | URL |
|---|---|
| App | http://localhost:5173 |
| API + Workbench | http://localhost:3000 |
| Mode | How It Works |
|---|---|
| ๐ Manual | Enter destination, era, style, upload photo |
| ๐ป Terminal | Natural language: "Take me to Paris in 1889" |
| ๐ Orbital | Click map, search address/pincode, see weather & places |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ React Frontend (Vite) โ
โ localhost:5173 โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ โ
REST API WebSocket Streams
โ โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโ
โ Motia Backend Framework โ
โ localhost:3000 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ API Steps โ Event Steps โ
โ โข /teleport โ โข GenerateImage โ
โ โข /auth โ โข GenerateLocationDetails โ
โ โข /history โ โข SynthesizeSpeech โ
โ โข /location/info โ โข CompleteTeleport โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
Gemini AI Google Maps API
| Endpoint | Method | Description |
|---|---|---|
/teleport |
POST | Start time travel |
/teleport/:id |
GET | Get progress/results |
/teleport/:id/audio |
GET | Get narration |
/history |
GET | User's travel history |
/auth |
POST | Exchange Supabase token |
/user |
GET | Get authenticated user |
/location/info |
GET | Weather, AQI, places |
/parse-command |
POST | Parse natural language |
| Backend | Frontend |
|---|---|
| Motia Framework | React 19 + Vite |
| TypeScript + Zod | Tailwind CSS |
| Redis | Google Maps API |
| Gemini 3 Pro | Supabase Auth |
| Supabase Storage | WebSocket Streams |
Automatic deployment on every push to main:
-
Add GitHub Secrets (Settings โ Secrets โ Actions):
Secret Description Where to Get MOTIA_API_KEYMotia Cloud API key Motia Cloud โ Settings โ API Keys MOTIA_ENV_IDEnvironment ID Motia Cloud โ Your Project โ Settings GEMINI_API_KEYGoogle Gemini API key aistudio.google.com GOOGLE_API_KEYGoogle Maps API key Google Cloud Console SUPABASE_URLSupabase project URL supabase.com โ Project Settings SUPABASE_KEYSupabase anon key Supabase โ Project Settings โ API SUPABASE_SERVICE_ROLE_KEYSupabase service role key Supabase โ Project Settings โ API JWT_SECRETSecret for signing JWTs Generate: openssl rand -base64 32GOOGLE_MAPS_MAP_IDMap ID for Advanced Markers Google Cloud Console -
Push to main - Deployment triggers automatically!
-
Manual Deploy - Go to Actions โ "Deploy to Motia Cloud" โ "Run workflow"
# .github/workflows/deploy.yml - Already configured!
# Auto-generates version: v1.0.X based on commit count- Start local backend:
npm run backend - Go to cloud.motia.dev
- Import from Workbench โ Add env vars โ Deploy
npx motia cloud deploy \
--api-key <MOTIA_API_KEY> \
--project-name time-traveller \
--environment-id <MOTIA_ENV_ID> \
--version-name v1.0.0 \
--env-file .env- Fork repo on GitHub
- Import to vercel.com/new
- Add environment variables:
VITE_API_URL= your Motia Cloud URLVITE_WS_URL= your Motia Cloud WebSocket URLVITE_GOOGLE_API_KEYVITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
| Issue | Solution |
|---|---|
| API key errors | Check .env exists, restart backend |
| Street View unavailable | Normal! AI generates without it |
| WebSocket failed | Falls back to polling automatically |
| Frontend not loading | Ensure both servers running |
| "Failed to authorize stream" errors | Expected - Motia Workbench trying to connect before auth. Harmless, can be ignored. Only affects dev Workbench at :3000, not the app at :5173 |
time-traveller/
โโโ frontend/ # React app
โ โโโ components/ # UI components
โ โโโ contexts/ # Auth context
โ โโโ assets/ # Static files
โโโ steps/ # Motia backend
โ โโโ api/ # REST endpoints
โ โโโ events/ # Background handlers
โ โโโ middlewares/ # Auth middleware
โ โโโ streams/ # Real-time updates
โโโ services/ # Business logic
โ โโโ gemini/ # AI services
โ โโโ google/ # Maps APIs
โ โโโ supabase/ # Auth & storage
โโโ docs/img/ # Screenshots
Your data is private and secure. Here's how we handle it:
| Data Type | Storage | Access |
|---|---|---|
| Travel History | Supabase Database | Only you (authenticated) |
| Generated Images | Supabase Storage | Only you (via your history) |
| Audio Narrations | Supabase Storage | Only you (via your history) |
| Reference Photos | Supabase Storage | Only you (linked to your teleport) |
- User Isolation: Each user's history is stored with their unique
userId - Authenticated Access: History API requires valid JWT token
- No Cross-User Access: You cannot see other users' travels, and they cannot see yours
- Secure Storage: All images and audio are stored in private Supabase buckets
- No Data Sharing: Your uploaded photos and generated content are never shared
๐ก Note: When not logged in, history is stored locally in your browser's localStorage and is completely private to your device.
- ๐ Supabase Auth - Google/GitHub OAuth with user isolation
- ๐ Private History - Each user only sees their own travels
- ๐ฆ๏ธ Location Intelligence - Weather, AQI, nearby places
- ๐ Address Search - Search by pincode/address
- ๐ค Traveler Insertion - Insert yourself into scenes
- โ๏ธ Cloud Storage - Images stored securely in Supabase
- ๐ Weather Animations - Dynamic background effects
- ๐๏ธ Audio Playback - Play/abort audio narration controls
Fork, experiment, and share your coolest time travels!









