Introduction & Project Goals
Relevant source files
The following files were used as context for generating this wiki page:
ElmecV2 is a cross-platform mobile application built with React Native and Expo designed for efficient request management. Its primary purpose is to bridge the gap between users reporting technical issues and administrators/agents managing resolution workflows. The system leverages a robust backend-as-a-service (BaaS) architecture via Supabase to provide real-time updates and secure data persistence.
The project aims to solve problems related to fragmented communication, loss of requests, and lack of visibility in industrial maintenance or service contexts. By providing specialized tools such as integrated calculators and real-time chat, ElmecV2 streamlines the lifecycle of a service request from creation to resolution.
Sources: README.md:9-12, DEMO-READY.md:73-80, VALIDACION-COMPLETA.md:9-13
## Core Project Objectives
The project is structured around three primary stakeholder goals:
- User Empowerment: Providing an intuitive interface for creating, editing, and tracking service requests with attachment support.
- Administrative Oversight: Enabling a comprehensive dashboard for monitoring system performance, user management, and detailed reporting.
- Technical Excellence: Maintaining a high-performance, "Offline First" capable application with robust security and logging.
Sources: README.md:16-37, VALIDACION-COMPLETA.md:85-93
### Functional Requirements Matrix
| Feature | Description | Stakeholder |
|---|---|---|
| Secure Authentication | JWT-based login/register with RLS security | All Users |
| Request Management | Full CRUD operations for service requests | Users/Agents |
| Real-time Chat | Instant messaging for request clarification | Users/Agents |
| Admin Dashboard | Statistical visualization and user management | Administrators |
| Integrated Calculator | Milling and drilling calculation tools | Field Users |
Sources: README.md:16-32, VALIDACION-COMPLETA.md:65-115
## System Architecture & Data Flow
The ElmecV2 architecture follows a modern frontend-heavy pattern where the mobile client interacts directly with Supabase for authentication, database operations, and real-time subscriptions.
The diagram above illustrates the high-level relationship between the mobile application and the Supabase backend services.
Sources: README.md:41-52, STATUS-DEPLOY.md:12-25, RESUMEN_FINAL.md:118-125
### Component Organization
The project is organized into modular directories to maintain a separation of concerns:
screens/: Divided by role (auth, admin, user) to ensure proper navigation flows.store/: Utilizes Zustand for global state management.services/: Centralizes API and Supabase interactions (e.g.,SupabaseService).utils/: Contains cross-cutting concerns likeerrorHandler.tsandlogger.ts.
Sources: README.md:115-128, VALIDACION-COMPLETA.md:125-131
## Technical Infrastructure
ElmecV2 utilizes a modern technology stack to ensure performance and scalability.
### Technology Stack
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React Native 0.74 / Expo 51 | Cross-platform framework |
| Language | TypeScript 5.3 | Static typing and code quality |
| Backend | Supabase (PostgreSQL) | Data persistence and Auth |
| State | Zustand / TanStack Query | Global and server state management |
| Logging | Custom Logger Class | Multi-level diagnostic logging |
Sources: README.md:41-51, utils/logger.ts:25-33
### Logging and Diagnostic Flow
The system includes a sophisticated logging mechanism to monitor application health and user actions, which is critical for the "Project Goals" of reliability and system monitoring.
The sequence above details the logic flow within utils/logger.ts, showing how logs are filtered and distributed based on severity and environment.
Sources: utils/logger.ts:57-95, README.md:167-173
## Deployment and Validation Goals
A major goal of the project is ensuring a "Demo Ready" state with 100% operational core functionality. This is achieved through a rigorous validation process and automated testing of backend modules.
### Validation Metrics
The project maintains high quality standards, as evidenced by recent validation reports:
- Core Functionality: 100% Operational.
- Critical Errors: 0.
- Backend Test Pass Rate: 100% (26/26 backend tests passed).
- Data Consistency: Enforced via Database Check Constraints.
Sources: VALIDACION-COMPLETA.md:17-25, REPORTE-EJECUCION-PRUEBAS.md:12-20
### Request Lifecycle Flow
The following diagram represents the standard flow of a request from creation to resolution, which is the central business logic goal of the project.
## Conclusion
The ElmecV2 project successfully integrates a React Native frontend with a Supabase backend to meet its primary goal of professional request management. With a 100% functional core, robust real-time communication, and a clear architectural separation of roles (User, Agent, Admin), the system is positioned as a scalable solution for industrial service tracking. The inclusion of extensive logging and validation reports confirms that the project goals of technical stability and operational readiness have been met.
Sources: VALIDACION-COMPLETA.md:183-185, REPORTE-EJECUCION-PRUEBAS.md:195-200