How asguizar/maintenanceapp works
Project type and purpose
• From the README and file tree, this is a hybrid mobile application (Ionic Framework + Angular) wrapped via Capacitor.
• Purpose: a fully offline maintenance-tracking app for home, vehicles, health, pets, with reminders, reports, and local backups.
File structure
• Root: config files for Ionic (ionic.config.json), Angular (angular.json, tsconfig.json), Capacitor (capacitor.config.ts), plus package manifests.
• android/: the native Android project generated by Capacitor (Gradle scripts, Java entry point, resources, tests).
• src/app/: the Angular/Ionic frontend code, organized into:
• core/guards & services (authentication, maintenance logic, notifications)
• features/ (login, home, maintenance form, report, settings)
• home/ (Ionic page module)
• src/assets, src/environments, src/theme: static assets, environment configs, SCSS variables.
• Plugins and tooling: @capacitor/local-notifications, @capacitor/filesystem, RxJS, Ionicons.
Key architectural patterns
• Angular’s module-component-service structure (MVVM-ish):
• Components handle presentation & user events
• Services encapsulate business logic & data persistence
• Dependency injection for services (AuthService, MaintenanceService, NotificationService).
• Capacitor as a bridge between web code (WebView) and native mobile APIs (notifications, filesystem).
• LocalStorage for data persistence + Capacitor Filesystem for backup.
Main components and interactions
a. Presentation Layer (Ionic/Angular)
• Feature modules & components (Login, Home Page, Maintenance, Report, Settings)
• Routing (app-routing.module.ts)
b. Business Logic Layer (Angular services)
• AuthService: handles local auth checks
• MaintenanceService: CRUD tasks in localStorage
• NotificationService: schedules local notifications via Capacitor
c. Persistence Layer
• localStorage (primary data store)
• Capacitor Filesystem (backup / export)
d. Native Layer (Capacitor + Android/iOS)
• WebView host (Ionic run)
• Capacitor bridge/plugins for Notifications & Filesystem
• Android native project (Gradle, MainActivity.java, resources)
e. External & Tools
• UI Component → Service → localStorage / Filesystem
• NotificationService → Capacitor LocalNotifications Plugin → Native OS Scheduler
• Capacitor Bridge ←→ Android/iOS runtime