How matiaspallero/sistema-web-instalar works
1. Type of system
- This is a single-page frontend application for A/C maintenance operations, built with React + Vite and styled with Tailwind CSS.
- The repository is primarily the UI layer; the backend is external and accessed through the src/services/api.jsx boundary.
2. Top-level application shell
- src/main.jsx bootstraps the app.
- src/App.jsx is the composition root: it likely wires routing, global providers, and layout framing.
- src/App.css, src/index.css, and src/style/global.css define the base visual system, while src/assets holds static UI resources.
3. Authentication and access control boundary
- src/context/AuthContext.jsx manages authentication state for the whole app.
- src/components/ProtectedRoute.jsx is the main guard for role-restricted screens.
- The README indicates role-based access for at least:
- administrador
- técnico
- cliente
- This creates a clear boundary between public pages and authenticated operational dashboards.
4. Global application state
- src/context/AppContext.jsx likely holds shared business state beyond login, such as selected entities, notifications, or refreshed lists.
- This context layer is the main coordination point for cross-page state without pushing everything through props.
5. Routing and page-level modules
- The src/pages folder is the main domain map of the application.
- Core operational pages include:
- Dashboard.jsx
- Clientes.jsx
- Sedes.jsx
- Equipos.jsx
- Servicios.jsx
- Solicitudes.jsx
- Tecnicos.jsx
- Calendario.jsx
- Reportes.jsx
- Public/auth entry pages include:
- Login.jsx
- Register.jsx
- landing/Inicio.jsx
- This implies a route structure split between public entry, admin operations, and role-specific portals.
6. Role-specific subareas
- There are dedicated subfolders for user personas:
- pages/clientes-pages/ClienteDashboad.jsx and MisSedes.jsx for client-facing views
- pages/tecnico-pages/MisTrabajos.jsx for technician work queues
- pages/equipos-pages/EditarEquipo.jsx and FichaTecnicaEquipo.jsx for equipment detail workflows
- This suggests the app is not a generic CRUD shell; it has persona-based operational views with distinct navigation and data scopes.
7. Domain subsystems
- The repository centers on interconnected maintenance entities:
- Clientes: customer organizations
- Sedes: client sites/locations
- Equipos: AC equipment assets
- Servicios: service catalog or work orders
- Solicitudes: requests originating from clients or internal staff
- Técnicos: workforce and assignments
- The architecture likely flows from cliente → sede → equipo → solicitud/servicio → técnico/asignación, which is the key diagram relationship to capture.
8. Workflow and modal-driven interactions
- Most operational actions are encapsulated in modal components under src/components, such as:
- SolicitudModal.jsx
- SolicitarServicioModal.jsx
- SolicitarSedeModal.jsx
- SolicitudesSedesModal.jsx
- AdminAsignacionModal.jsx
- TecAtencionModal.jsx
- ConfirmModal.jsx
- ClienteForm.jsx
- This indicates the UI favors overlay-based workflows for creating requests, confirming actions, assigning technicians, and capturing forms without full page transitions.
9. Shared UI and operational widgets
- Reusable components like Navbar.jsx, Sidebar.jsx, Loading.jsx, Notification.jsx, Pagination.jsx, and WidgetTecnico.jsx form the common shell and utility layer.
- CalendarioMantenimiento.jsx and EquipoHistorialServicios.jsx are higher-level widgets that present schedule/history data in a domain-specific way.
- These components are reused across pages to keep the UI consistent and reduce duplication.
10. Cross-cutting hooks and interaction helpers
- src/hooks/usePagination.jsx and src/hooks/useSearch.jsx encapsulate list interaction patterns.
- src/hooks/Layout.jsx likely standardizes page framing or conditional layout behavior.
- src/utils/helpers.jsx contains shared data formatting or business helper functions.
- This layer keeps list pages like clientes/equipos/solicitudes consistent in behavior.
11. API integration boundary
- src/services/api.jsx is the only explicit service layer in the tree, and it is the likely choke point for:
- authentication calls
- CRUD operations for domain entities
- request/assignment workflows
- report and calendar data
- The README explicitly says the frontend is designed to integrate with any backend or service of preference, so the backend is a replaceable external dependency rather than a tightly coupled internal subsystem.
12. Navigation and operational UX
- The presence of Navbar, Sidebar, dashboard widgets, and dedicated landing/login pages suggests a UX split between:
- marketing/public entry
- authenticated operational console
- After login, users likely move into a layout with persistent navigation and page-level content swapping.
13. Deployment/runtime footprint
- vite.config.js, tailwind.config.js, and eslint.config.js show a standard modern frontend toolchain.
- netlify.toml and vercel.json indicate the app is prepared for static frontend deployment on common hosting platforms.
- index.html and public/ reinforce that this is a client-side rendered SPA.
14. What an architecture diagram should emphasize
- The core diagram should show:
- Users by role entering through login/landing
- Auth/context layer controlling access
- App shell + router selecting role-specific pages
- Domain pages working over shared entities
- Modal and widget components handling workflows and detail interactions
- API service boundary connecting to an external backend
- The most important data relationships are between clients, sites, equipment, service requests, assignments, and technicians.
Main entry points: App.jsx App · api.jsx API service · Equipos.jsx Equipos · SolicitudModal.jsx Workflow modals
Components 31
App shell
Bootstrapping, routing, and global UI framing.
- main · Application entry point that mounts the React app.
src/main.jsx - App · Wires routing, providers, and the overall application frame.
src/App.jsx - Global styles · Base CSS and theme styling for the SPA.
src/App.css
Access layer
Authentication and route protection.
- Auth context · Holds authentication state for the whole app.
src/context/AuthContext.jsx - Protected route · Blocks access to role-restricted screens.
src/components/ProtectedRoute.jsx
Pages
Top-level route targets and role-specific screens.
- Inicio · Public landing page for the application.
src/pages/landing/Inicio.jsx - Login · Sign-in entry point for authenticated access.
src/pages/Login.jsx - Dashboard · Main authenticated overview for operational users.
src/pages/Dashboard.jsx - Clientes · Manages customer organizations and their records.
src/pages/Clientes.jsx - Sedes · Manages client locations and site records.
src/pages/Sedes.jsx - Equipos · Manages equipment assets and technical records.
src/pages/Equipos.jsx - Servicios · Handles services and operational service records.
src/pages/Servicios.jsx - Solicitudes · Tracks service requests and request processing.
src/pages/Solicitudes.jsx - Técnicos · Manages technicians and assignment capacity.
src/pages/Tecnicos.jsx - Calendario · Operational calendar for maintenance planning.
src/pages/Calendario.jsx - Reportes · Reporting and operational summaries.
src/pages/Reportes.jsx - Cliente dashboard · Client-facing overview of their account and operations.
src/pages/clientes-pages/ClienteDashboad.jsx - Mis sedes · Client view for their sites and related actions.
src/pages/clientes-pages/MisSedes.jsx - Mis trabajos · Technician work queue and assigned jobs.
src/pages/tecnico-pages/MisTrabajos.jsx - Editar equipo · Equipment edit workflow for operational changes.
src/pages/equipos-pages/EditarEquipo.jsx - Ficha técnica · Detailed technical record for an equipment asset.
src/pages/equipos-pages/FichaTecnicaEquipo.jsx
Domain UI
Reusable domain widgets and workflow modals.
- Navbar · Top navigation used across authenticated views.
src/components/Navbar.jsx - Sidebar · Primary navigation for the operational console.
src/components/Sidebar.jsx - Domain widgets · Reusable operational widgets such as technician cards, schedules, and histories.
src/components/WidgetTecnico.jsx - Workflow modals · Modals for requests, assignments, confirmations, and forms.
src/components/SolicitudModal.jsx - Feedback UI · Loading and notification primitives for user feedback.
src/components/Loading.jsx
State and helpers
Shared context, hooks, and utilities.
- App context · Coordinates cross-page business state and refresh flows.
src/context/AppContext.jsx - List hooks · Shared search, pagination, and layout helpers for page interactions.
src/hooks/usePagination.jsx - Helpers · Shared formatting and business helper functions.
src/utils/helpers.jsx
Infrastructure
External API boundary and build/deploy setup.
- API service · Single frontend integration point for authentication and domain workflows.
src/services/api.jsx - Build & deploy · Vite, Tailwind, and static hosting configuration for the SPA.
vite.config.js
Connections 47
- main → App: bootstraps · Mounts the root application component.
- App → Auth context: provides session · Wraps the app with authentication state.
- App → App context: provides shared state · Shares cross-page operational state.
- App → Protected route: guards routes · Applies access control to restricted screens.
- App → Navbar: renders shell · Uses the top-level navigation frame.
- App → Sidebar: renders shell · Uses the primary navigation sidebar.
- App → Inicio: routes to · Public entry page.
- App → Login: routes to · Authentication entry page.
- App → Dashboard: routes to · Authenticated overview page.
- App → Clientes: routes to · Customer management page.
- App → Sedes: routes to · Site management page.
- App → Equipos: routes to · Asset management page.
- App → Servicios: routes to · Service management page.
- App → Solicitudes: routes to · Request workflow page.
- App → Técnicos: routes to · Technician management page.
- App → Calendario: routes to · Scheduling page.
- App → Reportes: routes to · Reporting page.
- App → Cliente dashboard: routes to · Client portal dashboard.
- App → Mis sedes: routes to · Client portal site view.
- App → Mis trabajos: routes to · Technician work queue.
- App → Editar equipo: routes to · Equipment edit workflow.
- App → Ficha técnica: routes to · Equipment detail workflow.
- Clientes → Workflow modals: opens · Uses overlays for create and edit actions.
- Sedes → Workflow modals: opens · Uses overlays for site-related requests.
- Equipos → Workflow modals: opens · Uses overlays for equipment workflows.
- Solicitudes → Workflow modals: opens · Uses overlays for assignment and request handling.
- Técnicos → Domain widgets: shows · Uses technician-focused widgets.
- Calendario → Domain widgets: shows · Uses schedule widgets.
- Equipos → Domain widgets: shows · Uses equipment history and detail widgets.
- Clientes → List hooks: uses · Reuses search and pagination behavior.
- Sedes → List hooks: uses · Reuses search and pagination behavior.
- Equipos → List hooks: uses · Reuses search and pagination behavior.
- Solicitudes → List hooks: uses · Reuses search and pagination behavior.
- App context → API service: syncs with · Fetches and refreshes shared business data.
- Auth context → API service: authenticates via · Delegates login/session operations to the backend boundary.
- Clientes → API service: loads data · Reads and updates customer records.
- Sedes → API service: loads data · Reads and updates site records.
- Equipos → API service: loads data · Reads and updates equipment records.
- Solicitudes → API service: loads data · Submits and processes requests.
- Técnicos → API service: loads data · Reads technician and assignment data.
- Calendario → API service: loads data · Fetches schedule information.
- Reportes → API service: loads data · Fetches reporting data.
- Feedback UI → API service: wraps requests · Surfaces async state around backend calls.
- Workflow modals → API service: submits actions · Creates, assigns, confirms, and updates operational records.
- Helpers → API service: formats payloads · Supports data transformation around API interactions.
- Build & deploy → App: builds · Build and deployment tooling package the SPA.
- Build & deploy → Global styles: serves styles · Front-end toolchain handles CSS delivery.