How priyayids/mybogamidfastapi works
Nuveq Access Control Middle Service is an asynchronous BFF between meeting-room booking clients and Nuveq Cloud. A client authenticates and manages rooms or bookings; booking creation validates room availability, provisions visitor access with Nuveq, persists the booking, and can return a QR credential. Nuveq tap webhooks drive booking state and room-status updates, which the service can push to client webhooks. A background scheduler handles no-show revocation, auto-checkout, and optional event reconciliation. The graph follows documented capabilities and indexed references; unsampled route and service internals are not treated as inspected evidence.
Main entry points: deps.py API Dependencies · booking_service.py Booking Lifecycle · webhook_service.py Tap Processing · router.py V1 Router
Components 24
HTTP API
- FastAPI App
app/main.py - V1 Router
app/api/v1/router.py - Booking Routes
app/api/v1/bookings.py - Room Routes
app/api/v1/rooms.py - Nuveq Discovery
app/api/v1/nuveq.py - Tap Receiver
app/api/v1/webhooks.py - Health Route
app/api/v1/health.py
Booking & Rooms
- Booking Lifecycle
app/services/booking_service.py - Room Status & Mapping
app/services/room_service.py - QR Generation
app/services/qr_service.py
Access Integrations
- Tap Processing
app/services/webhook_service.py - Background Jobs
app/services/scheduler_service.py - Nuveq API Client
app/services/nuveq_client.py
Runtime & State
- API Dependencies
app/api/deps.py - API Security
app/core/security.py - API Schemas
app/schemas - Async Database
app/core/database.py - Domain Records
app/models/__init__.py - Configuration
app/core/config.py - Domain Errors
app/core/exceptions.py - Structured Logging
app/core/logging.py
Other components
- Booking Client
- Nuveq Cloud
- Client Webhook
Connections 48
- Booking Client → FastAPI App: calls API
README.md - FastAPI App → V1 Router: mounts routes
app/main.py - V1 Router → Booking Routes: registers
app/api/v1/router.py - V1 Router → Room Routes: registers
app/api/v1/router.py - V1 Router → Nuveq Discovery: registers
app/api/v1/router.py - V1 Router → Tap Receiver: registers
app/api/v1/router.py - V1 Router → Health Route: registers
app/api/v1/router.py - Booking Routes → Booking Lifecycle: delegates to
app/api/v1/bookings.py - Room Routes → Room Status & Mapping: delegates to
app/api/v1/rooms.py - Nuveq Discovery → Nuveq API Client: proxies discovery
app/api/v1/nuveq.py - Tap Receiver → Tap Processing: processes tap
app/api/v1/webhooks.py - Booking Routes → API Security: authenticates
app/api/v1/bookings.py - Room Routes → API Security: authenticates
app/api/v1/rooms.py - Tap Receiver → API Security: checks secret
app/api/v1/webhooks.py - Booking Routes → API Dependencies: resolves services
app/api/v1/bookings.py - Room Routes → API Dependencies: resolves services
app/api/v1/rooms.py - Tap Receiver → API Dependencies: resolves service
app/api/v1/webhooks.py - Booking Lifecycle → Nuveq API Client: provisions access
app/services/booking_service.py - Booking Lifecycle → QR Generation: generates QR
app/services/booking_service.py - Booking Lifecycle → Async Database: reads and writes
app/services/booking_service.py - Room Status & Mapping → Async Database: reads and writes
app/services/room_service.py - Tap Processing → Async Database: records events
app/services/webhook_service.py - Tap Processing → Room Status & Mapping: derives status
app/services/webhook_service.py - Tap Processing → Client Webhook: posts updates
app/services/webhook_service.py - Nuveq Cloud → Tap Receiver: delivers taps
README.md - Nuveq API Client → Nuveq Cloud: calls REST API
app/services/nuveq_client.py - Background Jobs → Nuveq API Client: revokes access
app/services/scheduler_service.py - Background Jobs → Room Status & Mapping: checks status
app/services/scheduler_service.py - Background Jobs → Tap Processing: dispatches updates
app/services/scheduler_service.py - FastAPI App → Background Jobs: starts jobs
app/main.py - API Dependencies → Async Database: opens sessions
app/api/deps.py - API Dependencies → Booking Lifecycle: constructs
app/api/deps.py - API Dependencies → Nuveq API Client: constructs
app/api/deps.py - API Dependencies → Room Status & Mapping: constructs
app/api/deps.py - API Dependencies → Tap Processing: constructs
app/api/deps.py - Async Database → Configuration: loads URL
app/core/database.py - Domain Records → Async Database: uses declarative base
app/models/__init__.py - API Security → Configuration: checks keys
app/core/security.py - Booking Lifecycle → Domain Records: queries bookings
app/services/booking_service.py - Room Status & Mapping → Domain Records: derives room state
app/services/room_service.py - Tap Processing → Domain Records: records tap state
app/services/webhook_service.py - Booking Routes → API Schemas: uses DTOs
app/api/v1/bookings.py - Room Routes → API Schemas: uses DTOs
app/api/v1/rooms.py - Nuveq Discovery → API Schemas: uses DTOs
app/api/v1/nuveq.py - Tap Receiver → API Schemas: uses payloads
app/api/v1/webhooks.py - Booking Lifecycle → Domain Errors: raises domain errors
app/services/booking_service.py - Nuveq API Client → Domain Errors: raises API errors
app/services/nuveq_client.py - FastAPI App → Structured Logging: configures logging
app/main.py