How lemon-2-ade/trove-backend works
SoloMate is a FastAPI backend for gamified solo travel: users authenticate, explore cities, take on quests, and manage trip, safety, and community features. The route tree documents these product areas; sampled source confirms application startup, database initialization, email/Google authentication, AI recommendations, and safety reporting. Other route capabilities are represented from their names, but their internal wiring is not established by the available excerpts.
Main entry points: main.py FastAPI app · auth.py Authentication · database.py Prisma database · ai_recommendations.py AI recommendations
Components 24
API entry and identity
- FastAPI app
main.py - Authentication
app/api/routes/auth.py - User profiles
app/api/routes/users.py - Preferences
app/api/routes/preferences.py
Travel and exploration
- Cities
app/api/routes/cities.py - Place exploration
app/api/routes/exploration.py - Itineraries
app/api/routes/itinerary.py - AI recommendations
app/api/routes/ai_recommendations.py - Travel journal
app/api/routes/journal.py
Gamification and community
- Quests
app/api/routes/quests.py - Badges
app/api/routes/badges.py - Leaderboards
app/api/routes/leaderboards.py
Safety and assistance
- Safety reports
app/api/routes/safety.py - Emergency contacts
app/api/routes/emergency_contacts.py - News analysis
app/services/news_analysis_ai.py - News collection
app/services/news_scraping_agent.py
Core services
- Token and passwords
app/core/auth.py - Google OAuth
app/services/google_oauth.py - Travel AI agent
app/services/ai_agent.py - Maps integration
app/services/google_maps.py - Prisma database
app/core/database.py
Other components
- Traveler
- Google identity
- OpenAI
Connections 23
- Traveler → FastAPI app: calls API
- FastAPI app → Authentication: routes requests
- FastAPI app → User profiles: routes requests
- FastAPI app → Preferences: routes requests
- FastAPI app → Cities: routes requests
- FastAPI app → Place exploration: routes requests
- FastAPI app → Itineraries: routes requests
- FastAPI app → Quests: routes requests
- FastAPI app → Badges: routes requests
- FastAPI app → Leaderboards: routes requests
- FastAPI app → AI recommendations: routes requests
- FastAPI app → Travel journal: routes requests
- FastAPI app → Safety reports: routes requests
- FastAPI app → Emergency contacts: routes requests
- FastAPI app → Prisma database: initializes
- Authentication → Prisma database: reads and writes
- Authentication → Token and passwords: creates tokens
- Authentication → Google OAuth: verifies Google token
- Google OAuth → Google identity: verifies identity
- Safety reports → Prisma database: reads and writes
- AI recommendations → Prisma database: reads and writes
- Travel AI agent → OpenAI: requests completions
- News analysis → OpenAI: requests analysis