How juantaborda27/servia_backend works
ServIA is a FastAPI backend for matching customers who publish service requests with available providers. The main workflow moves from publication creation through provider applications and acceptance to service completion or cancellation, with reviews and notifications as supporting outcomes. Chat provides persistent conversations and cross-task WebSocket delivery. The graph combines documented capabilities with relationships visible in sampled source and the SOURCE INDEX; several unsampled feature implementations are represented by their existing router or service paths, without inferring internal calls.
Main entry points: main.py FastAPI application · post_repository.py Publication persistence · chat.py WebSocket chat · post_service.py Publication lifecycle
Components 28
API and identity
- FastAPI application
app/main.py - Authentication routes
app/routers/auth.py - Authentication service
app/services/auth_service.py - Account repository
app/repositories/auth_repository.py - JWT authentication
app/dependencies/auth.py
Service marketplace
- Publication routes
app/routers/post.py - Publication lifecycle
app/services/post_service.py - Publication persistence
app/repositories/post_repository.py - Publication model
app/models/publicacion.py - Application routes
app/routers/postulacion.py - Application workflow
app/services/postulacion_service.py - Application persistence
app/repositories/postulacion_repository.py - Provider routes
app/routers/prestador.py - Provider persistence
app/repositories/prestador_repository.py
Engagement features
- Review routes
app/routers/resenas.py - Review workflow
app/services/resena_service.py - Notification routes
app/routers/notificacion.py - Notification service
app/services/notificacion_service.py - WebSocket chat
app/routers/chat.py - Message service
app/services/mensaje_service.py - Conversation service
app/services/conversacion_service.py - Socket connection manager
app/core/connectionManager.py
Runtime and persistence
- Async database setup
app/core/database.py - PostgreSQL
- Image storage
app/core/storage.py - Amazon S3
- Redis Pub/Sub
Other components
- Customer or provider
Connections 32
- Customer or provider → FastAPI application: uses API
- FastAPI application → Authentication routes: registers routes
app/main.py - FastAPI application → Publication routes: registers routes
app/main.py - FastAPI application → Application routes: registers routes
app/main.py - FastAPI application → Provider routes: registers routes
app/main.py - FastAPI application → Review routes: registers routes
app/main.py - FastAPI application → Notification routes: registers routes
app/main.py - FastAPI application → WebSocket chat: registers routes
app/main.py - Authentication routes → Authentication service: calls
app/routers/auth.py - Authentication service → Account repository: uses
app/services/auth_service.py - JWT authentication → Account repository: looks up user
app/dependencies/auth.py - Publication routes → Publication lifecycle: calls
app/routers/post.py - Publication lifecycle → Publication persistence: uses
app/services/post_service.py - Publication lifecycle → Image storage: uploads images
app/services/post_service.py - Publication persistence → Publication model: queries
app/repositories/post_repository.py - Application routes → Application workflow: calls
app/routers/postulacion.py - Application workflow → Application persistence: uses
app/services/postulacion_service.py - Application workflow → Publication persistence: reads publications
app/services/postulacion_service.py - Application persistence → Publication model: queries
app/repositories/postulacion_repository.py - Provider routes → Provider persistence: uses
- Review routes → Review workflow: calls
- Review workflow → Publication persistence: uses
app/services/resena_service.py - Notification routes → Notification service: calls
app/routers/notificacion.py - WebSocket chat → Message service: calls
app/routers/chat.py - WebSocket chat → Socket connection manager: manages sockets
app/routers/chat.py - WebSocket chat → Redis Pub/Sub: publishes events
- Message service → Conversation service: checks conversations
app/services/mensaje_service.py - Publication persistence → PostgreSQL: persists records
- Application persistence → PostgreSQL: persists records
- Account repository → PostgreSQL: persists accounts
- Image storage → Amazon S3: uploads objects
app/core/storage.py - FastAPI application → Async database setup: initializes
app/main.py