Add FastAPI backend with PostGIS-backed nearby search

FastAPI service backed by PostgreSQL+PostGIS: cities/places/place_content
schema (normalized per-language, per-length content for easy future
re-ingestion), Alembic migration, an iterative-radius-expansion nearby
search endpoint, a name-search fallback for denied-location flows, and
a YAML seed loader CLI. Verified end-to-end against a live Docker
Postgres+PostGIS instance (migration, city seed, place/content CRUD,
and nearby radius expansion all confirmed working via curl).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-07-09 18:31:29 +00:00
parent 2acc5dfa2e
commit d2ab424e7e
43 changed files with 1058 additions and 0 deletions

11
backend/app/main.py Normal file
View file

@ -0,0 +1,11 @@
from fastapi import FastAPI
from app.api.routes import cities, health, nearby, places
from app.config import settings
app = FastAPI(title="guideCity API", version="0.1.0")
app.include_router(health.router, prefix=settings.api_v1_prefix)
app.include_router(cities.router, prefix=settings.api_v1_prefix)
app.include_router(places.router, prefix=settings.api_v1_prefix)
app.include_router(nearby.router, prefix=settings.api_v1_prefix)