How jairoimm/campuscircular works
Purpose and Entry Points
This is a Django backend for a waste-management domain: collection points (puntos), waste records/types (residuos), sensors (sensores), and users (usuarios). Runtime entry points are Django management and deployment interfaces: backend/manage.py, backend/config/wsgi.py, and backend/config/asgi.py.
Application Composition
The project-level Django configuration and HTTP route aggregation are under backend/config/settings.py and backend/config/urls.py. Domain behavior is partitioned into four Django apps, each owning models, serializers, views, routes, migrations, and admin integration.
Collection-Point Domain
puntos defines the collection-point persistence model and its API boundary. Requests routed through backend/puntos/urls.py reach view logic in backend/puntos/views.py, which serializes model data through backend/puntos/serializers.py and persists it via backend/puntos/models.py.
Waste Domain
residuos represents waste-related entities and exposes them as a separate API resource family. Its core flow is backend/residuos/urls.py → backend/residuos/views.py → backend/residuos/serializers.py → backend/residuos/models.py. Its migrations establish schema dependencies, including the two initial migration stages in backend/residuos/migrations/.
Sensor Domain
sensores models sensor data independently from collection points and waste records, providing a distinct persistence and API boundary. The primary path is backend/sensores/urls.py, backend/sensores/views.py, backend/sensores/serializers.py, and backend/sensores/models.py. backend/sensores/migrations/0001_initial.py is the schema bootstrap for this domain.
User Domain
usuarios owns application user modeling and user-facing API serialization/views rather than relying solely on an unrepresented external identity service. Core paths are backend/usuarios/models.py, backend/usuarios/serializers.py, and backend/usuarios/views.py; routing is in backend/usuarios/urls.py.
Data, Infrastructure, and Operational Boundaries
Django ORM models and migrations are the database contract: each app’s models.py defines entities while migrations/ versions schema changes. Django REST-style serializers separate database objects from API representations, and views form the request/control boundary. Django admin registration files such as backend/puntos/admin.py provide an internal administration surface. No frontend, database vendor, message broker, sensor-ingestion protocol, or external service integration is evidenced by the supplied tree.
Main entry points: urls.py Root routes · views.py Collection-point views · settings.py Project settings · models.py Collection-point models
Components 24
Django Runtime
- Management CLI
backend/manage.py - WSGI deployment
backend/config/wsgi.py - ASGI deployment
backend/config/asgi.py - Project settings
backend/config/settings.py - Root routes
backend/config/urls.py
Collection Points
- Collection-point API
backend/puntos/urls.py - Collection-point views
backend/puntos/views.py - Collection-point serializers
backend/puntos/serializers.py - Collection-point models
backend/puntos/models.py - Collection-point admin
backend/puntos/admin.py
Waste
- Waste API
backend/residuos/urls.py - Waste views
backend/residuos/views.py - Waste serializers
backend/residuos/serializers.py - Waste models
backend/residuos/models.py - Waste migrations · Includes two initial migration stages.
Sensors
- Sensor API
backend/sensores/urls.py - Sensor views
backend/sensores/views.py - Sensor serializers
backend/sensores/serializers.py - Sensor models
backend/sensores/models.py - Sensor initial schema
backend/sensores/migrations/0001_initial.py
Users
- User API
backend/usuarios/urls.py - User views
backend/usuarios/views.py - User serializers
backend/usuarios/serializers.py - User models
backend/usuarios/models.py
Connections 25
- Management CLI → Project settings: loads
- WSGI deployment → Project settings: loads
- ASGI deployment → Project settings: loads
- WSGI deployment → Root routes: serves
- ASGI deployment → Root routes: serves
- Root routes → Collection-point API: includes
- Root routes → Waste API: includes
- Root routes → Sensor API: includes
- Root routes → User API: includes
- Collection-point API → Collection-point views: routes to
- Collection-point views → Collection-point serializers: uses
- Collection-point serializers → Collection-point models: maps
- Collection-point views → Collection-point models: persists
- Collection-point admin → Collection-point models: registers
- Waste API → Waste views: routes to
- Waste views → Waste serializers: uses
- Waste serializers → Waste models: maps
- Waste migrations → Waste models: versions schema
- Sensor API → Sensor views: routes to
- Sensor views → Sensor serializers: uses
- Sensor serializers → Sensor models: maps
- Sensor initial schema → Sensor models: bootstraps schema
- User API → User views: routes to
- User views → User serializers: uses
- User serializers → User models: maps