How brunomygueldotcom/automatize-python-nailflows works
NailFlows is a FastAPI backend for nail designers to manage clients, services, appointments, invitation-based client registration, and calendar synchronization. The main workflow enters through API routes, delegates domain operations to services, and persists records through either in-memory or Supabase adapters; appointment operations also synchronize with the configured calendar. The README documents admin-protected routes and optional Google OAuth. Relationships are limited to excerpted code, SOURCE INDEX references, and README statements; unsampled subsystem internals are not assumed.
Main entry points: main.py Application wiring · appointment_service.py Appointment lifecycle · client_service.py Client management · service_service.py Service management
Components 21
API and setup
- Application wiring
main.py - Client routes
app/api/client_endpoints.py - Appointment and service routes
app/api/endpoints.py - Registration routes
app/api/registration_endpoints.py - Google OAuth routes
app/api/google_endpoints.py - Admin security
app/api/security.py
Domain services
- Domain models
app/domain/models.py - Client management
app/services/client_service.py - Service management
app/services/service_service.py - Appointment lifecycle
app/services/appointment_service.py - Invitation registration
app/services/registration_service.py
Persistence
- Database contracts
app/infrastructure/database/base.py - Memory storage
app/infrastructure/database/memory.py - Supabase adapters
app/infrastructure/database/supabase.py - Invitation repository
app/infrastructure/database/registration_repository.py
Calendar integration
- Calendar contract
app/infrastructure/calendar/base.py - Mock calendar
app/infrastructure/calendar/google_mock.py - Google Calendar adapter
app/infrastructure/calendar/google.py
Other components
- API caller
- Supabase platform
- Google services
Connections 45
- API caller → Client routes: calls routes
README.md - API caller → Appointment and service routes: calls routes
README.md - API caller → Registration routes: calls routes
README.md - Application wiring → Client routes: registers routes
main.py - Application wiring → Appointment and service routes: registers routes
main.py - Application wiring → Registration routes: registers routes
main.py - Application wiring → Client management: configures
main.py - Application wiring → Appointment lifecycle: configures
main.py - Application wiring → Invitation registration: configures
main.py - Application wiring → Service management: configures
main.py - Application wiring → Memory storage: selects backend
main.py - Application wiring → Supabase adapters: selects backend
main.py - Application wiring → Mock calendar: selects backend
main.py - Application wiring → Google Calendar adapter: selects backend
main.py - Application wiring → Google OAuth routes: registers routes
main.py - Client routes → Client management: delegates to
app/api/client_endpoints.py - Appointment and service routes → Appointment lifecycle: delegates to
app/api/endpoints.py - Appointment and service routes → Service management: delegates to
app/api/endpoints.py - Registration routes → Invitation registration: delegates to
app/api/registration_endpoints.py - Google OAuth routes → Google Calendar adapter: uses OAuth
app/api/google_endpoints.py - Google OAuth routes → Admin security: uses security
app/api/google_endpoints.py - Client management → Memory storage: reads and writes
app/services/client_service.py - Client management → Supabase adapters: reads and writes
app/services/client_service.py - Service management → Memory storage: reads and writes
- Service management → Supabase adapters: reads and writes
app/services/service_service.py - Appointment lifecycle → Memory storage: reads and writes
app/services/appointment_service.py - Appointment lifecycle → Supabase adapters: reads and writes
app/services/appointment_service.py - Appointment lifecycle → Calendar contract: syncs events
app/services/appointment_service.py - Appointment lifecycle → Service management: resolves service
- Invitation registration → Invitation repository: stores invitations
app/services/registration_service.py - Invitation registration → Client management: registers client
app/services/registration_service.py - Invitation repository → Supabase platform: uses REST and RPC
app/infrastructure/database/registration_repository.py - Supabase adapters → Supabase platform: accesses tables
- Memory storage → Database contracts: implements contracts
app/infrastructure/database/memory.py - Supabase adapters → Database contracts: implements contracts
app/infrastructure/database/supabase.py - Google Calendar adapter → Calendar contract: implements contract
app/infrastructure/calendar/google.py - Mock calendar → Calendar contract: implements contract
app/infrastructure/calendar/google_mock.py - Google Calendar adapter → Google services: syncs events
- Google services → Google OAuth routes: returns OAuth callback
README.md - Client routes → Domain models: validates data
app/api/client_endpoints.py - Appointment and service routes → Domain models: validates data
app/api/endpoints.py - Registration routes → Domain models: validates data
app/api/registration_endpoints.py - Appointment lifecycle → Domain models: builds appointments
app/services/appointment_service.py - Client management → Domain models: builds clients
app/services/client_service.py - Service management → Domain models: builds services
app/services/service_service.py