# sebastiangranobles/pitlanecars architecture

> Architecture diagram of the GitHub repository sebastiangranobles/pitlanecars, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sebastiangranobles/pitlanecars
- Repository: https://github.com/sebastiangranobles/pitlanecars

## Overview

1. **Repository shape**
   - This is a **single-module Android app** (`app/`) written in **Kotlin**.
   - The code is organized more by **UI feature and responsibility** than by backend/domain layers, which is typical for a Jetpack Compose-style app.

2. **Product purpose**
   - The app is for **car workshops and maintenance management**.
   - The README indicates it is a university project and mentions **Firebase integration** as the next major external dependency.
   - The feature set suggests a **multi-role mobile workflow**: end users, mechanics, and administrators.

3. **Entry point and app bootstrap**
   - `MainActivity.kt` is the Android entry host.
   - `SplashScreen.kt` suggests the app starts with a short boot/loading gate before routing into the main flow.
   - `AndroidManifest.xml` and the Firebase config file `google-services.json` define runtime setup and external service wiring.

4. **Navigation as the central UI boundary**
   - `presentation/AppNavigation.kt` is the main screen-routing layer.
   - The app appears to use a **screen-based navigation model** connecting authentication, dashboard, and role-specific areas.
   - `MainScreen.kt` likely acts as the post-login shell that decides which feature screens are available.

5. **Presentation layer / feature screens**
   - The `presentation/` package contains the main user-facing surfaces:
     - Authentication: `LoginScreen`, `RegisterScreen`, `RecuperarContraseñaScreen`
     - User/profile: `ProfileScreen`, `UserScreen`
     - Operational flows: `AppointmentScreen`, `HistoryScreen`
     - Administration: `AdminDashboardScreen`, `AdminAppointmentsScreen`, `MechanicsManagementScreen`
     - Password auditing: `PasswordHistoryScreen`
   - This indicates the app is split into **auth, self-service, and admin operations**.

6. **Role-based app structure**
   - The presence of admin screens and management screens implies **different user roles** rather than a single generic UI.
   - A likely architectural boundary is between:
     - **Regular user experience**: register, login, request/track appointments, view history, manage profile.
     - **Admin experience**: dashboards, appointment oversight, mechanic management, password history.

7. **State and business logic**
   - `viewmodel/UserViewModel.kt` and `viewmodel/RecuperarContrasenaViewModel.kt` hold the app’s stateful logic.
   - This suggests an MVVM-style separation where screens consume view-model state and trigger actions through the view models.
   - The recovery password flow is isolated, which is useful for diagramming it as a separate subflow from general user auth.

8. **Domain model**
   - `model/User.kt` is the core identity/account entity.
   - `model/PasswordChangeLog.kt` indicates the app tracks security events or password changes, likely to support admin review or recovery auditing.
   - The domain layer is small and focused, reinforcing that most complexity lives in the UI and cloud integration rather than in a large local domain model.

9. **Firebase and messaging integration**
   - `utils/MyFirebaseMessagingService.kt` is the clearest sign of **Firebase Cloud Messaging (FCM)** support.
   - This means the app is prepared for **push notifications**, likely for appointment updates, admin alerts, or service status changes.
   - `google-services.json` confirms Firebase is a material external dependency in the architecture.

10. **UI system and theming**
    - `ui/theme/Color.kt`, `Theme.kt`, and `Type.kt` define the shared visual system.
    - This indicates the app uses a centralized theme across multiple screens, which is important for a Compose-based architecture diagram because the theme sits under all presentation screens.

11. **Android resources and platform configuration**
    - Standard Android resource folders are present: drawables, mipmaps, colors, strings, themes, and XML backup/file-path configs.
    - These are supporting infrastructure, not core business logic, but they matter because they feed the app shell, branding, permissions, and install/runtime behavior.

12. **Testing boundaries**
    - The repo includes both unit and instrumented test scaffolding under `src/test` and `src/androidTest`.
    - The test tree is minimal, so the architecture is still mostly app/runtime driven rather than test-driven.

13. **Build and dependency management**
    - The project uses **Gradle Kotlin DSL** (`build.gradle.kts`, `settings.gradle.kts`) and the Gradle wrapper.
    - `gradle/libs.versions.toml` suggests centralized version management for Android/Kotlin dependencies.
    - This matters because Firebase, Compose, and Android libraries are likely resolved through Gradle rather than custom infrastructure.

14. **How to draw the architecture**
    - A useful diagram would place:
      - **Android app shell** at the top,
      - **Navigation + screens** as the presentation layer,
      - **ViewModels** as state/business logic,
      - **Models** as shared data structures,
      - **Firebase/FCM** as the external backend/notification boundary,
      - and **resources/theme** as supporting app infrastructure.
    - The key data flows are: **login/recovery/auth state → navigation → role-specific screens → notifications/history/admin actions**.

Main entry points: [`app/src/main/java/presentation/AppNavigation.kt`](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AppNavigation.kt) (App Navigation), [`app/src/main/java/presentation/UserScreen.kt`](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/UserScreen.kt) (User Area), [`app/src/main/java/presentation/AdminDashboardScreen.kt`](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AdminDashboardScreen.kt) (Admin Dashboard), [`app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Theme.kt`](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Theme.kt) (Theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Android app"]
  node_main_activity["MainActivity<br/>android entry<br/>[MainActivity.kt]"]
  node_android_manifest["Manifest<br/>platform config"]
end

subgraph group_presentation["Presentation"]
  node_splash_screen(("Splash Screen<br/>boot screen<br/>[SplashScreen.kt]"))
  node_app_navigation["App Navigation<br/>router<br/>[AppNavigation.kt]"]
  node_main_screen["Main Screen<br/>app shell<br/>[MainScreen.kt]"]
  node_login_screen["Login<br/>auth screen<br/>[LoginScreen.kt]"]
  node_register_screen["Register<br/>auth screen<br/>[RegisterScreen.kt]"]
  node_recover_screen["Password Recovery<br/>auth screen"]
  node_appointment_screen["Appointments<br/>user screen"]
  node_history_screen["History<br/>user screen<br/>[HistoryScreen.kt]"]
  node_profile_screen["Profile<br/>user screen<br/>[ProfileScreen.kt]"]
  node_user_screen["User Area<br/>user screen<br/>[UserScreen.kt]"]
  node_admin_dashboard["Admin Dashboard<br/>admin screen"]
  node_admin_appointments["Admin Appointments<br/>admin screen"]
  node_mechanics_mgmt["Mechanics<br/>admin screen"]
  node_password_history["Password History<br/>audit screen"]
end

subgraph group_state["State"]
  node_user_viewmodel["UserViewModel<br/>state holder<br/>[UserViewModel.kt]"]
  node_recover_viewmodel["RecoveryViewModel<br/>state holder"]
end

subgraph group_domain["Domain"]
  node_user_model["User<br/>entity<br/>[User.kt]"]
  node_password_log["Password Log<br/>audit entity"]
end

subgraph group_integration["Integration"]
  node_fcm_service["FCM Service<br/>firebase messaging"]
  node_firebase_config["Firebase Config<br/>service config"]
end

subgraph group_support["Support"]
  node_theme["Theme<br/>[Theme.kt]"]
  node_colors["Colors<br/>ui tokens<br/>[Color.kt]"]
  node_type["Type<br/>ui tokens<br/>[Type.kt]"]
  node_gradle_build["Gradle Build<br/>build config<br/>[build.gradle.kts]"]
end

node_main_activity -->|"starts"| node_splash_screen
node_splash_screen -->|"routes to"| node_app_navigation
node_app_navigation -->|"shows"| node_login_screen
node_app_navigation -->|"shows"| node_register_screen
node_app_navigation -->|"shows"| node_recover_screen
node_app_navigation -->|"enters"| node_main_screen
node_main_screen -->|"branches to"| node_user_screen
node_main_screen -->|"branches to"| node_admin_dashboard
node_user_screen -->|"opens"| node_appointment_screen
node_user_screen -->|"opens"| node_history_screen
node_user_screen -->|"opens"| node_profile_screen
node_admin_dashboard -->|"opens"| node_admin_appointments
node_admin_dashboard -->|"opens"| node_mechanics_mgmt
node_admin_dashboard -->|"opens"| node_password_history
node_login_screen -->|"uses"| node_user_viewmodel
node_register_screen -->|"uses"| node_user_viewmodel
node_recover_screen -->|"uses"| node_recover_viewmodel
node_user_viewmodel -->|"manages"| node_user_model
node_recover_viewmodel -->|"records"| node_password_log
node_password_history -->|"displays"| node_password_log
node_fcm_service -->|"depends on"| node_firebase_config
node_app_navigation -->|"styles"| node_theme
node_theme -->|"uses"| node_colors
node_theme -->|"uses"| node_type
node_android_manifest -->|"declares"| node_main_activity
node_android_manifest -->|"declares"| node_fcm_service
node_gradle_build -->|"enables"| node_firebase_config
node_gradle_build -->|"builds"| node_theme

click node_main_activity "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/MainActivity.kt"
click node_splash_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/SplashScreen.kt"
click node_app_navigation "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AppNavigation.kt"
click node_main_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/MainScreen.kt"
click node_login_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/LoginScreen.kt"
click node_register_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/RegisterScreen.kt"
click node_recover_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/RecuperarContraseñaScreen.kt"
click node_appointment_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AppointmentScreen.kt"
click node_history_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/HistoryScreen.kt"
click node_profile_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/ProfileScreen.kt"
click node_user_screen "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/UserScreen.kt"
click node_admin_dashboard "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AdminDashboardScreen.kt"
click node_admin_appointments "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AdminAppointmentsScreen.kt"
click node_mechanics_mgmt "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/MechanicsManagementScreen.kt"
click node_password_history "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/PasswordHistoryScreen.kt"
click node_user_viewmodel "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/viewmodel/UserViewModel.kt"
click node_recover_viewmodel "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/viewmodel/RecuperarContrasenaViewModel.kt"
click node_user_model "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/model/User.kt"
click node_password_log "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/model/PasswordChangeLog.kt"
click node_fcm_service "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/utils/MyFirebaseMessagingService.kt"
click node_firebase_config "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/google-services.json"
click node_theme "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Theme.kt"
click node_colors "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Color.kt"
click node_type "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Type.kt"
click node_android_manifest "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/AndroidManifest.xml"
click node_gradle_build "https://github.com/sebastiangranobles/pitlanecars/blob/master/app/build.gradle.kts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_activity,node_android_manifest toneBlue
class node_splash_screen,node_app_navigation,node_main_screen,node_login_screen,node_register_screen,node_recover_screen,node_appointment_screen,node_history_screen,node_profile_screen,node_user_screen,node_admin_dashboard,node_admin_appointments,node_mechanics_mgmt,node_password_history toneAmber
class node_user_viewmodel,node_recover_viewmodel toneMint
class node_user_model,node_password_log toneRose
class node_fcm_service,node_firebase_config toneIndigo
class node_theme,node_colors,node_type,node_gradle_build toneTeal
```

## Components

### Android app

Android application module and runtime entry points.

- [MainActivity](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/MainActivity.kt): android entry · Android host activity that launches the Compose UI. · `app/src/main/java/com/example/parcial_sebastiangranoblesardila/MainActivity.kt`
- [Manifest](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/AndroidManifest.xml): platform config · Android runtime declaration and app wiring. · `app/src/main/AndroidManifest.xml`

### Presentation

Navigation and user-facing screens.

- [Splash Screen](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/SplashScreen.kt): boot screen · Initial loading gate before main routing. · `app/src/main/java/presentation/SplashScreen.kt`
- [App Navigation](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AppNavigation.kt): router · Central screen-routing boundary for the app. · `app/src/main/java/presentation/AppNavigation.kt`
- [Main Screen](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/MainScreen.kt): app shell · Post-login shell that branches into feature areas. · `app/src/main/java/presentation/MainScreen.kt`
- [Login](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/LoginScreen.kt): auth screen · Sign-in flow for existing users. · `app/src/main/java/presentation/LoginScreen.kt`
- [Register](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/RegisterScreen.kt): auth screen · Account creation flow. · `app/src/main/java/presentation/RegisterScreen.kt`
- [Password Recovery](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/RecuperarContraseñaScreen.kt): auth screen · Password reset and recovery flow. · `app/src/main/java/presentation/RecuperarContraseñaScreen.kt`
- [Appointments](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AppointmentScreen.kt): user screen · Appointment creation and tracking surface. · `app/src/main/java/presentation/AppointmentScreen.kt`
- [History](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/HistoryScreen.kt): user screen · Service or appointment history view. · `app/src/main/java/presentation/HistoryScreen.kt`
- [Profile](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/ProfileScreen.kt): user screen · User profile and account details surface. · `app/src/main/java/presentation/ProfileScreen.kt`
- [User Area](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/UserScreen.kt): user screen · Regular user workspace and entry surface. · `app/src/main/java/presentation/UserScreen.kt`
- [Admin Dashboard](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AdminDashboardScreen.kt): admin screen · Administrative overview and control center. · `app/src/main/java/presentation/AdminDashboardScreen.kt`
- [Admin Appointments](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/AdminAppointmentsScreen.kt): admin screen · Administrative appointment management view. · `app/src/main/java/presentation/AdminAppointmentsScreen.kt`
- [Mechanics](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/MechanicsManagementScreen.kt): admin screen · Mechanic management and assignment surface. · `app/src/main/java/presentation/MechanicsManagementScreen.kt`
- [Password History](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/presentation/PasswordHistoryScreen.kt): audit screen · Password change audit and review view. · `app/src/main/java/presentation/PasswordHistoryScreen.kt`

### State

View-model layer and flow logic.

- [UserViewModel](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/viewmodel/UserViewModel.kt): state holder · Main state and actions for auth and user flows. · `app/src/main/java/viewmodel/UserViewModel.kt`
- [RecoveryViewModel](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/viewmodel/RecuperarContrasenaViewModel.kt): state holder · State and actions for password recovery. · `app/src/main/java/viewmodel/RecuperarContrasenaViewModel.kt`

### Domain

Core data entities used across screens.

- [User](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/model/User.kt): entity · Core account and identity model. · `app/src/main/java/model/User.kt`
- [Password Log](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/model/PasswordChangeLog.kt): audit entity · Records password change history events. · `app/src/main/java/model/PasswordChangeLog.kt`

### Integration

Firebase and messaging boundary.

- [FCM Service](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/utils/MyFirebaseMessagingService.kt): firebase messaging · Firebase Cloud Messaging handler for push notifications. · `app/src/main/java/com/example/parcial_sebastiangranoblesardila/utils/MyFirebaseMessagingService.kt`
- [Firebase Config](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/google-services.json): service config · Firebase project configuration for the Android app. · `app/google-services.json`

### Support

Theme, resources, and build infrastructure.

- [Theme](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Theme.kt): ui theme · Shared Compose theme entry point. · `app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Theme.kt`
- [Colors](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Color.kt): ui tokens · Application color palette. · `app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Color.kt`
- [Type](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Type.kt): ui tokens · Typography definitions. · `app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Type.kt`
- [Gradle Build](https://github.com/sebastiangranobles/pitlanecars/blob/master/app/build.gradle.kts): build config · Module build and dependency configuration. · `app/build.gradle.kts`

## Connections

- MainActivity → Splash Screen: starts · Launches the initial splash gate.
- Splash Screen → App Navigation: routes to · Hands control to the main navigation layer.
- App Navigation → Login: shows · Routes unauthenticated users to login.
- App Navigation → Register: shows · Routes to account creation.
- App Navigation → Password Recovery: shows · Routes to password recovery.
- App Navigation → Main Screen: enters · Transitions into the main app shell after auth.
- Main Screen → User Area: branches to · Exposes the regular user workspace.
- Main Screen → Admin Dashboard: branches to · Exposes the administrative workspace.
- User Area → Appointments: opens · Accesses appointment workflows.
- User Area → History: opens · Accesses service history.
- User Area → Profile: opens · Accesses profile management.
- Admin Dashboard → Admin Appointments: opens · Accesses appointment oversight.
- Admin Dashboard → Mechanics: opens · Accesses mechanic management.
- Admin Dashboard → Password History: opens · Accesses audit history.
- Login → UserViewModel: uses · Reads and updates auth state through the view model.
- Register → UserViewModel: uses · Uses shared user/account state.
- Password Recovery → RecoveryViewModel: uses · Uses dedicated recovery state.
- UserViewModel → User: manages · Creates and manipulates user account data.
- RecoveryViewModel → Password Log: records · Tracks password recovery or change events.
- Password History → Password Log: displays · Surfaces password audit entries.
- FCM Service → Firebase Config: depends on · Uses Firebase project setup.
- App Navigation → Theme: styles · Navigation and screens share the app theme.
- Theme → Colors: uses · Builds the visual palette.
- Theme → Type: uses · Builds typography.
- Manifest → MainActivity: declares · Registers the launch activity.
- Manifest → FCM Service: declares · Registers messaging integration.
- Gradle Build → Firebase Config: enables · Build setup enables Google services/Firebase wiring.
- Gradle Build → Theme: builds · Compiles the Compose UI layer and shared design system.
