Convierte el repositorio de Anexo76 en una plantilla limpia y reutilizable
para nuevos proyectos del ecosistema Workspace de Aduanasoft.
Cambios principales:
- Elimina módulos específicos de Anexo76: a76, a24, sitar, public
- Agrega módulo example/ con patrón CRUD de referencia (models/dto/service/routes)
- Limpia migraciones Alembic: solo quedan las 6 de core (users, tenants, permissions)
- Reemplaza todas las rutas del dashboard con stubs genéricos
- Elimina lógica de negocio aduanera: shortcuts, CSV imports, permisos, catálogos
- Simplifica variables de entorno: una sola WORKSPACE_URL deriva Hub y Keycloak
- Agrega scripts/auth-mode.sh para alternar entre auth local y workspace
- Configura docker-compose con nombres genéricos (app-*)
- Corrige flujo SSO: elimina system-gate SCAF/SCAII que bloqueaba el login
- Modo DEV_LOCAL_AUTH para desarrollo sin Keycloak ni Hub
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Updated `TimestampMixin` to use `server_default` for `created_at` and `updated_at` fields.
- Modified various models in the `fa_classes`, `doc_types_dig`, `ports`, `units_of_measure`, `invoices`, `parts`, `trailers`, `licenses`, `tenants`, and `user_tenant` modules to set `server_default` for boolean fields and other relevant fields.
- Adjusted the `trailer_types` model to change the schema from `a76` to `public`.
- Implemented database migration execution during application startup in `main.py`.
- Removed old Alembic migration execution logic from the entrypoint script.
- Updated seed data for units of measure and removed unused seed files.
- Added endpoints for license management including creation, retrieval, update, validation, and usage tracking.
- Developed service layer for business logic related to licenses.
- Introduced tenant management APIs for creating, updating, listing, and deleting tenants.
- Implemented user-tenant relationship management with endpoints for adding, removing, and updating user roles in tenants.
- Created DTOs for data transfer between layers and models for ORM mapping.
- Enhanced logging and error handling across services.
- Added models, DTOs, services, and routes for ports, including CRUD operations.
- Introduced unit conversions with corresponding models, DTOs, services, and routes.
- Developed units of measure with detailed models, DTOs, services, and routes for various types.
- Ensured all new features are integrated with FastAPI and SQLAlchemy for seamless database interactions.
- Rearranged imports in multiple files for consistency and clarity.
- Updated logging middleware to exclude specific paths from logging.
- Enhanced security module by cleaning up token handling and improving tenant validation.
- Added tenant and company scoped mixins for better database model management.
- Implemented generic CRUD routes for tenant-scoped resources.
- Improved error handling and response management in API routes.
- Cleaned up login and logout processes to ensure proper session management.
- Introduced mechanisms to clear local storage and cookies on tenant change.
- Enhanced company store to detect tenant changes and clear data accordingly.
- Added new DTO mixins for currency and value affect flags.