How sebastiangranobles/pitlanecars works
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: AppNavigation.kt App Navigation · UserScreen.kt User Area · AdminDashboardScreen.kt Admin Dashboard · Theme.kt Theme
Components 26
Android app
Android application module and runtime entry points.
- MainActivity · Android host activity that launches the Compose UI.
app/src/main/java/com/example/parcial_sebastiangranoblesardila/MainActivity.kt - Manifest · Android runtime declaration and app wiring.
app/src/main/AndroidManifest.xml
Presentation
Navigation and user-facing screens.
- Splash Screen · Initial loading gate before main routing.
app/src/main/java/presentation/SplashScreen.kt - App Navigation · Central screen-routing boundary for the app.
app/src/main/java/presentation/AppNavigation.kt - Main Screen · Post-login shell that branches into feature areas.
app/src/main/java/presentation/MainScreen.kt - Login · Sign-in flow for existing users.
app/src/main/java/presentation/LoginScreen.kt - Register · Account creation flow.
app/src/main/java/presentation/RegisterScreen.kt - Password Recovery · Password reset and recovery flow.
app/src/main/java/presentation/RecuperarContraseñaScreen.kt - Appointments · Appointment creation and tracking surface.
app/src/main/java/presentation/AppointmentScreen.kt - History · Service or appointment history view.
app/src/main/java/presentation/HistoryScreen.kt - Profile · User profile and account details surface.
app/src/main/java/presentation/ProfileScreen.kt - User Area · Regular user workspace and entry surface.
app/src/main/java/presentation/UserScreen.kt - Admin Dashboard · Administrative overview and control center.
app/src/main/java/presentation/AdminDashboardScreen.kt - Admin Appointments · Administrative appointment management view.
app/src/main/java/presentation/AdminAppointmentsScreen.kt - Mechanics · Mechanic management and assignment surface.
app/src/main/java/presentation/MechanicsManagementScreen.kt - Password History · Password change audit and review view.
app/src/main/java/presentation/PasswordHistoryScreen.kt
State
View-model layer and flow logic.
- UserViewModel · Main state and actions for auth and user flows.
app/src/main/java/viewmodel/UserViewModel.kt - RecoveryViewModel · State and actions for password recovery.
app/src/main/java/viewmodel/RecuperarContrasenaViewModel.kt
Domain
Core data entities used across screens.
- User · Core account and identity model.
app/src/main/java/model/User.kt - Password Log · Records password change history events.
app/src/main/java/model/PasswordChangeLog.kt
Integration
Firebase and messaging boundary.
- FCM Service · Firebase Cloud Messaging handler for push notifications.
app/src/main/java/com/example/parcial_sebastiangranoblesardila/utils/MyFirebaseMessagingService.kt - Firebase Config · Firebase project configuration for the Android app.
app/google-services.json
Support
Theme, resources, and build infrastructure.
- Theme · Shared Compose theme entry point.
app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Theme.kt - Colors · Application color palette.
app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Color.kt - Type · Typography definitions.
app/src/main/java/com/example/parcial_sebastiangranoblesardila/ui/theme/Type.kt - Gradle Build · Module build and dependency configuration.
app/build.gradle.kts
Connections 28
- 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.