How aleflex/proyecto9-gestion-eventos works
This is a FastAPI event-management API backed by a single MongoDB collection. The main workflow is a client request entering the FastAPI app, reaching event or attendee endpoints, validating data with Pydantic schemas, and reading or writing event documents. The API also supports event search and filters, summary statistics, health checks, and a Vercel serverless entry point. Components sharing a source file are separated by responsibility; the route excerpts are partial, so unsampled endpoint details are represented only where the README documents them.
Main entry points: main.py FastAPI application · database.py MongoDB access · routes.py Event management · evento.py Event schemas
Components 14
API and workflows
- FastAPI application
main.py - Event management
api/routes.py - Event discovery
api/routes.py - Event statistics
api/routes.py - Attendee registration
api/routes.py - ID and serialization
utils/helpers.py - Vercel entry point
api/index.py
Domain schemas
- Event schemas
schemas/evento.py - Attendee schemas
schemas/asistente.py - Organizer schemas
schemas/organizador.py
Configuration and persistence
- Application settings
core/config.py - MongoDB access
core/database.py - MongoDB event collection
Other components
- API client
Connections 21
- API client → FastAPI application: sends requests
main.py - FastAPI application → Event management: mounts routes
main.py - FastAPI application → Event discovery: mounts routes
main.py - FastAPI application → Event statistics: mounts routes
main.py - FastAPI application → Attendee registration: mounts routes
main.py - Event management → MongoDB access: gets collection
api/routes.py - Event discovery → MongoDB access: queries collection
api/routes.py - Event statistics → MongoDB access: reads events
api/routes.py - Attendee registration → MongoDB access: gets collection
api/routes.py - Event management → Event schemas: validates events
api/routes.py - Attendee registration → Attendee schemas: validates attendees
api/routes.py - Event schemas → Organizer schemas: uses organizer model
schemas/evento.py - Event schemas → Attendee schemas: uses attendee models
schemas/evento.py - Event management → ID and serialization: validates IDs and serializes
api/routes.py - Event discovery → ID and serialization: serializes results
api/routes.py - Attendee registration → ID and serialization: validates IDs
api/routes.py - MongoDB access → Application settings: reads connection settings
core/database.py - MongoDB access → MongoDB event collection: reads and writes
- FastAPI application → Application settings: configures app
main.py - FastAPI application → MongoDB access: checks and closes connection
main.py - Vercel entry point → FastAPI application: exports app
api/index.py