How luisalbertoq/sistema-movil-de-deteccion-automatica-de-lotes-en-planos-imagenes--mediante-opencv works
Project Type and Purpose
• This is a full-stack real-estate lot management and sales application.
• Backend: Django REST API (Python) handling data models (“lotes”), authentication, image processing (OpenCV/NumPy/Shapely), and MySQL persistence.
• Frontend: Flutter mobile/web/desktop app providing UI screens, model classes, and service-layer wrappers around the REST API.
File Structure Analysis
• Top-level:
• gestion_lotes/ → Django project
• gestion_lotes_frontend/ → Flutter project
• Backend (gestion_lotes):
• gestion_lotes/settings.py, urls.py, wsgi.py/asgi.py → core config & routing
• lotes/ → Django app: models.py, serializers.py, views.py, permissions.py, urls.py, migrations
• manage.py → Django CLI
• Frontend (gestion_lotes_frontend/lib):
• components/ → reusable UI widgets
• screens/ → page layouts and routes
• models/ → data classes matching backend DTOs
• services/ → HTTP clients for auth, lotes, ventas, planos, uploads
• config/api_config.dart → base URLs, endpoints
Key Architectural Patterns
• Backend:
• MVC / MVT (Views = APIView/ViewSet, Models, Templates unused)
• RESTful API layer → URLs → Views → Serializers → Models → Database
• Image processing pipeline invoked in views or model methods
• Frontend:
• Component-based UI (Flutter widgets)
• Service layer abstracts HTTP calls
• State management implicit in screens (could be enhanced with Provider/Bloc)
Main Components and Their Relationships
• Frontend App
→ UI Widgets & Screens
→ Service Layer (AuthService, LotesService, UploadService…)
↔ HTTP/HTTPS
• Backend API
→ Django REST endpoints (/api/auth/, /api/lotes/, /api/planos/, /api/ventas/)
→ Image Processing Module (OpenCV, NumPy, Shapely)
→ Business Logic (permissions, serializers, validations)
→ MySQL Database (gestion_lotes schema)
• External/Infrastructure
→ MySQL server (could be local or cloud RDBMS)
→ File storage (media folder or object storage for plan images)