How xbaank/madridtransporte-front works
Main Components
• Frontend Web Application – The core user interface and business logic implemented with React/TypeScript.
• Native Mobile Wrapper – The “android” folder hosts an Android project configured with Gradle and Capacitor to package the web app for mobile devices.
• Build & Deployment Pipeline – Tools and configuration files (Vite config, environment files, GitHub workflows, npm scripts) that manage building, testing, and deploying the application.
• External Service Integrations – Components such as Firebase (see firebase-messaging-sw.js), Maps, and any backend API endpoints (linked in the README pointing to the backend repository).
Relationships and Interactions
• UI Components (e.g., MobileNavBar, StopMap, AbonoNFC, etc.)
• That UI Components interact with an API layer—the “api” directories inside “components” (for stops, abono, etc.)—which in turn communicates with the external backend service (linked in the README) via HTTP or WebSocket calls.
• Connections to external services:
• Firebase for push notifications or messaging.
• Google Maps or other mapping APIs (as seen in “public/maps” and the mapping components).
• Incorporate the Mobile/Capacitor component:
Architectural Patterns
• Clearly separate the application layers – the presentation (UI), the business logic (React components, contexts, hooks), and the integration/API layer.
• Modular design. The project groups related functionality in directories (for abono, stops, etc.) implying component-based architecture.
• Use of environment configurations (.env.development, .env.production) to manage different deployment scenarios.
• Mention the build/deployment pipeline with GitHub workflows as part of the overall ecosystem.
Technologies and Frameworks
• Vite for build and development.
• React/TypeScript for the application logic.
• Tailwind CSS for styling (tailwind.config.js).
• Capacitor for enabling a native Android experience.
• Gradle for Android build configuration.
• Firebase (for messaging) and Google services (google-services.json in Android).
• GitHub Actions for CI/CD as seen in the “.github/workflows” directory.