How tanish-2603/locallens works
LocalLens is a local-discovery and trip-planning product: travelers explore ranked places, inspect them on a map, and build budget- and time-aware itineraries. The web app also exposes a grounded place guide, community submissions, host experiences, reviews, and account access. FastAPI routers own these domain operations over SQLAlchemy-backed data; ranking and itinerary services provide discovery and planning logic. The source excerpts show the main wiring and several service calls; connections for read-but-unsampled capabilities follow the source index, while frontend-to-backend routing is documented only at a high level.
Main entry points: main.py FastAPI app · database.py Relational database · schemas.py Request and response schemas · places.py Place discovery
Components 19
Traveler web app
- Discovery interface
frontend/src/app/page.tsx - Interactive map
frontend/src/components/MapView.tsx - API client
frontend/src/lib/api.ts
API and accounts
- FastAPI app
backend/app/main.py - Authentication
backend/app/api/auth.py
Discovery and planning
- Place discovery
backend/app/api/places.py - Gem ranking
backend/app/services/ranking_service.py - Itinerary API
backend/app/api/itinerary.py - Itinerary planner
backend/app/services/itinerary_service.py - Local guide
backend/app/api/guide.py - Grounded answers
backend/app/services/guide_service.py
Community offerings
- Place submissions
backend/app/api/submissions.py - Host experiences
backend/app/api/experiences.py
Persistence and domain
- Relational database
backend/app/db/database.py - Domain records
backend/app/db/models.py - Request and response schemas
backend/app/schemas/schemas.py - Schema and seed setup
backend/app/db/init_db.py - Curated place catalog
backend/app/db/seed_data.py
Other components
- Traveler
Connections 30
- Traveler → Discovery interface: uses
README.md - Discovery interface → API client: requests data
frontend/src/app/page.tsx - Discovery interface → Interactive map: renders
frontend/src/app/page.tsx - Interactive map → API client: requests data
frontend/src/components/MapView.tsx - API client → FastAPI app: calls API
- FastAPI app → Authentication: registers routes
backend/app/main.py - FastAPI app → Place discovery: registers routes
backend/app/main.py - FastAPI app → Itinerary API: registers routes
backend/app/main.py - FastAPI app → Local guide: registers routes
backend/app/main.py - FastAPI app → Place submissions: registers routes
backend/app/main.py - FastAPI app → Host experiences: registers routes
backend/app/main.py - FastAPI app → Schema and seed setup: initializes
backend/app/main.py - Place discovery → Gem ranking: ranks places
backend/app/api/places.py - Itinerary API → Itinerary planner: generates plans
backend/app/api/itinerary.py - Local guide → Grounded answers: requests answers
backend/app/api/guide.py - Place discovery → Relational database: queries
backend/app/api/places.py - Itinerary API → Relational database: queries
backend/app/api/itinerary.py - Local guide → Relational database: loads place
backend/app/api/guide.py - Place submissions → Relational database: persists submissions
backend/app/api/submissions.py - Host experiences → Relational database: queries experiences
backend/app/api/experiences.py - Authentication → Relational database: reads and writes
backend/app/api/auth.py - Authentication → Request and response schemas: validates payloads
backend/app/api/auth.py - Place discovery → Request and response schemas: uses schemas
backend/app/api/places.py - Itinerary API → Request and response schemas: uses schemas
backend/app/api/itinerary.py - Local guide → Request and response schemas: uses schemas
backend/app/api/guide.py - Place submissions → Request and response schemas: uses schemas
backend/app/api/submissions.py - Host experiences → Request and response schemas: uses schemas
backend/app/api/experiences.py - Relational database → Domain records: maps records
backend/app/db/models.py - Schema and seed setup → Relational database: initializes schema
backend/app/db/init_db.py - Schema and seed setup → Curated place catalog: loads catalog
backend/app/db/init_db.py