How laakmus/parking-warszawa works
parking-warszawa is a FastAPI marketplace API where owners publish parking offers, renters search and book them, and both parties complete a contract confirmation flow. The main request path enters through the registered routers, which validate payloads, authorize users, and read or update PostgreSQL-backed domain records. Authentication also supports profile management and password resets; offer search adds geocoding and distance calculations. The graph reflects the README’s documented capabilities and sampled runtime source; unsampled route details are represented only where the README supports them.
Main entry points: reservations.py Reservation routes · offers.py Offer routes and search · main.py FastAPI app · auth.py Account routes
Components 17
API entry
- FastAPI app
src/main.py - Health check
src/main.py
Accounts and access
- Account routes
src/routers/auth.py - Token and password auth
src/auth.py
Parking marketplace
- Offer routes and search
src/routers/offers.py - Geocoding and distance
src/geocoding.py - Reservation routes
src/routers/reservations.py - Contract routes
src/routers/contracts.py
Domain and persistence
- User records
src/models.py - Offer records
src/models.py - Reservation records
src/models.py - Contract records
src/models.py - Request and response schemas
src/schemas.py - Database sessions
src/database.py
Other components
- API client
- OpenStreetMap Nominatim
- PostgreSQL
Connections 27
- API client → FastAPI app: sends requests
- FastAPI app → Account routes: registers router
- FastAPI app → Offer routes and search: registers router
- FastAPI app → Reservation routes: registers router
- FastAPI app → Contract routes: registers router
- API client → Health check: checks uptime
- Account routes → Token and password auth: uses auth helpers
- Account routes → Database sessions: requests session
- Account routes → User records: queries and updates
- Account routes → Request and response schemas: validates and returns
- Offer routes and search → Token and password auth: authorizes owner actions
- Offer routes and search → Database sessions: requests session
- Offer routes and search → Offer records: queries and updates
- Offer routes and search → Geocoding and distance: geocodes and measures
- Geocoding and distance → OpenStreetMap Nominatim: requests coordinates
- Offer routes and search → Request and response schemas: validates and returns
- Reservation routes → Token and password auth: authorizes requests
- Reservation routes → Database sessions: requests session
- Reservation routes → Offer records: checks offer
- Reservation routes → Reservation records: checks and creates
- Reservation routes → Contract records: creates contract
- Reservation routes → Request and response schemas: validates and returns
- Contract routes → Token and password auth: authorizes requests
- Contract routes → Database sessions: requests session
- Contract routes → Contract records: reads and confirms
- Contract routes → Request and response schemas: returns contract data
- Database sessions → PostgreSQL: opens sessions