# javier-abraham/appuntes architecture

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

- Interactive diagram: https://gitdiagram.com/javier-abraham/appuntes
- Repository: https://github.com/javier-abraham/appuntes

## Overview

AppUntes is a single Android app module built in Kotlin with Jetpack Compose, Material 3, Room, Navigation Compose, WorkManager, Retrofit/Gson, and a likely DataStore-backed onboarding flow. The architecture is classic MVVM with a repository boundary between UI and data sources.

The app entry points are `AppUntesApplication` and `MainActivity`. `MainActivity` is the Compose host, while `core/navigation/NavGraph.kt` and `Screen.kt` centralize route definitions and screen wiring. This is the main structural boundary for how users move through the app.

The presentation layer lives under `presentation/` and is split by feature: `home`, `materias`, `tareas`, `calendario`, `perfil`, and `onboarding`. Each feature screen is a Compose UI, and the stateful screens rely on dedicated ViewModels such as `HomeViewModel`, `MateriasViewModel`, and `TareasViewModel`.

Domain objects are kept separate from persistence entities in `domain/model/`. `Materia` and `Tarea` represent the app’s core business data at the UI/domain boundary, while the data layer uses Room entities under `data/local/entity/`. This separation suggests mapping between “clean” models and database schema.

Local storage is handled by Room in `data/local/`. `AppDatabase` is the database container, and `MateriaDao` / `TareaDao` are the access points for CRUD and query operations. This is the primary source of truth for academic data on-device.

The repository layer in `data/repository/` (`MateriaRepository`, `TareaRepository`) sits between ViewModels and the data sources. In practice, this is where the app likely decides whether to read/write local Room data and, if needed, coordinate synchronization or business rules before state reaches the UI.

There is also a remote/data-sync side under `data/remote/`. `RetrofitInstance`, `ApiService`, `SupabaseConfig`, and `SupabaseRepository` indicate a network integration path built around Retrofit and a Supabase backend. This is the repo’s external service boundary, even though the exact endpoints aren’t shown in the tree.

The app’s feature set implies two important data flows: first, user interactions in Compose screens update ViewModels, which call repositories, which then persist through Room; second, remote-backed operations go through Retrofit/Supabase classes before being reflected back into the local/UI state.

Cross-cutting app behavior is isolated in `core/util/NotificationHelper.kt`, which likely supports the automatic reminders described in the README and is the main hook for user-facing notifications. This is the most visible non-UI background service in the codebase.

The onboarding experience is a separate presentation module, and the README mentions DataStore for first-run state. Even though the DataStore files are not visible in the tree, onboarding is clearly treated as a distinct startup concern rather than a normal feature screen.

Theme support exists in two places: `presentation/theme/` and `ui/theme/`. That duplication suggests either a migration path or legacy packaging, and it matters for architecture diagrams because theming is not centralized in a single package.

Resource-wise, the app is a standard Android application with launcher assets, values, and XML support files. The presence of `file_paths.xml` and backup/data extraction XML hints at platform features around file sharing and Android backup behavior, but these are supporting concerns rather than primary subsystems.

Testing is split into JVM unit tests and Android instrumented tests under `src/test` and `src/androidTest`. The repo includes `ViewModelTests.kt`, which aligns with the MVVM boundary by testing presentation logic separately from the Android runtime.

Main entry points: [`app/src/main/java/com/appuntes/core/navigation/NavGraph.kt`](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/navigation/NavGraph.kt) (Nav graph), [`app/src/main/java/com/appuntes/data/repository/TareaRepository.kt`](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/repository/TareaRepository.kt) (Tarea repo), [`app/src/main/java/com/appuntes/data/repository/MateriaRepository.kt`](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/repository/MateriaRepository.kt) (Materia repo), [`app/src/main/java/com/appuntes/data/local/AppDatabase.kt`](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/local/AppDatabase.kt) (Room DB)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_application["App class<br/>Android Application"]
  node_main_activity["Main activity<br/>Compose host<br/>[MainActivity.kt]"]
end

subgraph group_core["Core"]
  node_nav_graph["Nav graph<br/>Navigation Compose<br/>[NavGraph.kt]"]
  node_screen_routes["Screen routes<br/>Route definitions<br/>[Screen.kt]"]
  node_notification_helper["Notifications"]
end

subgraph group_presentation["Presentation"]
  node_home_vm["Home VM<br/>ViewModel<br/>[HomeViewModel.kt]"]
  node_home_screen["Home screen<br/>Compose screen<br/>[HomeScreen.kt]"]
  node_materias_vm["Materias VM<br/>ViewModel"]
  node_materias_screens["Materias UI<br/>Compose feature<br/>[MateriasScreen.kt]"]
  node_tareas_vm["Tareas VM<br/>ViewModel<br/>[TareasViewModel.kt]"]
  node_tareas_screens["Tareas UI<br/>Compose feature<br/>[TareasScreen.kt]"]
  node_calendario_screen["Calendar<br/>Compose screen"]
  node_perfil_screen["Profile<br/>Compose screen<br/>[PerfilScreen.kt]"]
  node_onboarding_screen["Onboarding<br/>Startup flow"]
end

subgraph group_data["Data"]
  node_materia_repo["Materia repo"]
  node_tarea_repo["Tarea repo<br/>[TareaRepository.kt]"]
  node_local_db[("Room DB<br/>Room database<br/>[AppDatabase.kt]")]
  node_remote_api["Remote API<br/>Retrofit/Supabase<br/>[ApiService.kt]"]
end

subgraph group_domain["Domain"]
  node_materia_model["Materia<br/>Domain model<br/>[Materia.kt]"]
  node_tarea_model["Tarea<br/>Domain model<br/>[Tarea.kt]"]
end

node_application -->|"launches"| node_main_activity
node_main_activity -->|"hosts"| node_nav_graph
node_nav_graph -->|"uses"| node_screen_routes
node_nav_graph -->|"navigates to"| node_home_screen
node_nav_graph -->|"navigates to"| node_materias_screens
node_nav_graph -->|"navigates to"| node_tareas_screens
node_nav_graph -->|"navigates to"| node_calendario_screen
node_nav_graph -->|"navigates to"| node_perfil_screen
node_nav_graph -->|"navigates to"| node_onboarding_screen
node_home_screen -->|"binds"| node_home_vm
node_materias_screens -->|"binds"| node_materias_vm
node_tareas_screens -->|"binds"| node_tareas_vm
node_home_vm -->|"reads"| node_materia_repo
node_home_vm -->|"reads"| node_tarea_repo
node_materias_vm -->|"manages"| node_materia_repo
node_tareas_vm -->|"manages"| node_tarea_repo
node_materia_repo -->|"persists"| node_local_db
node_tarea_repo -->|"persists"| node_local_db
node_materia_repo -.->|"syncs"| node_remote_api
node_tarea_repo -.->|"syncs"| node_remote_api
node_local_db -->|"maps to"| node_materia_model
node_local_db -->|"maps to"| node_tarea_model
node_notification_helper -.->|"uses"| node_tarea_repo

click node_application "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/AppUntesApplication.kt"
click node_main_activity "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/MainActivity.kt"
click node_nav_graph "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/navigation/NavGraph.kt"
click node_screen_routes "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/navigation/Screen.kt"
click node_notification_helper "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/util/NotificationHelper.kt"
click node_home_vm "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/home/HomeViewModel.kt"
click node_home_screen "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/home/HomeScreen.kt"
click node_materias_vm "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/materias/MateriasViewModel.kt"
click node_materias_screens "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/materias/MateriasScreen.kt"
click node_tareas_vm "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/tareas/TareasViewModel.kt"
click node_tareas_screens "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/tareas/TareasScreen.kt"
click node_calendario_screen "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/calendario/CalendarioScreen.kt"
click node_perfil_screen "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/perfil/PerfilScreen.kt"
click node_onboarding_screen "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/onboarding/OnboardingScreen.kt"
click node_materia_repo "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/repository/MateriaRepository.kt"
click node_tarea_repo "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/repository/TareaRepository.kt"
click node_local_db "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/local/AppDatabase.kt"
click node_remote_api "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/remote/ApiService.kt"
click node_materia_model "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/domain/model/Materia.kt"
click node_tarea_model "https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/domain/model/Tarea.kt"

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_application,node_main_activity toneBlue
class node_nav_graph,node_screen_routes,node_notification_helper toneAmber
class node_home_vm,node_home_screen,node_materias_vm,node_materias_screens,node_tareas_vm,node_tareas_screens,node_calendario_screen,node_perfil_screen,node_onboarding_screen toneMint
class node_materia_repo,node_tarea_repo,node_local_db,node_remote_api toneRose
class node_materia_model,node_tarea_model toneIndigo
```

## Components

### App shell

Android entry points and top-level runtime wiring.

- [App class](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/AppUntesApplication.kt): Android Application · Initializes app-wide state and services. · `app/src/main/java/com/appuntes/AppUntesApplication.kt`
- [Main activity](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/MainActivity.kt): Compose host · Launch activity that hosts the UI. · `app/src/main/java/com/appuntes/MainActivity.kt`

### Core

Shared navigation and utilities.

- [Nav graph](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/navigation/NavGraph.kt): Navigation Compose · Central route wiring for feature screens. · `app/src/main/java/com/appuntes/core/navigation/NavGraph.kt`
- [Screen routes](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/navigation/Screen.kt): Route definitions · Shared navigation destinations and labels. · `app/src/main/java/com/appuntes/core/navigation/Screen.kt`
- [Notifications](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/core/util/NotificationHelper.kt): Utility · Notification and reminder support. · `app/src/main/java/com/appuntes/core/util/NotificationHelper.kt`

### Presentation

Compose screens and feature ViewModels.

- [Home VM](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/home/HomeViewModel.kt): ViewModel · State and actions for the home screen. · `app/src/main/java/com/appuntes/presentation/home/HomeViewModel.kt`
- [Home screen](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/home/HomeScreen.kt): Compose screen · Primary landing screen. · `app/src/main/java/com/appuntes/presentation/home/HomeScreen.kt`
- [Materias VM](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/materias/MateriasViewModel.kt): ViewModel · State and actions for subjects. · `app/src/main/java/com/appuntes/presentation/materias/MateriasViewModel.kt`
- [Materias UI](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/materias/MateriasScreen.kt): Compose feature · List, create, and detail subject screens. · `app/src/main/java/com/appuntes/presentation/materias/MateriasScreen.kt`
- [Tareas VM](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/tareas/TareasViewModel.kt): ViewModel · State and actions for tasks. · `app/src/main/java/com/appuntes/presentation/tareas/TareasViewModel.kt`
- [Tareas UI](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/tareas/TareasScreen.kt): Compose feature · Task list and creation screens. · `app/src/main/java/com/appuntes/presentation/tareas/TareasScreen.kt`
- [Calendar](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/calendario/CalendarioScreen.kt): Compose screen · Calendar-focused feature screen. · `app/src/main/java/com/appuntes/presentation/calendario/CalendarioScreen.kt`
- [Profile](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/perfil/PerfilScreen.kt): Compose screen · User profile and app settings screen. · `app/src/main/java/com/appuntes/presentation/perfil/PerfilScreen.kt`
- [Onboarding](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/presentation/onboarding/OnboardingScreen.kt): Startup flow · First-run introduction and setup. · `app/src/main/java/com/appuntes/presentation/onboarding/OnboardingScreen.kt`

### Data

Local, remote, and repository boundaries.

- [Materia repo](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/repository/MateriaRepository.kt): Repository · Coordinates subject data access and rules. · `app/src/main/java/com/appuntes/data/repository/MateriaRepository.kt`
- [Tarea repo](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/repository/TareaRepository.kt): Repository · Coordinates task data access and rules. · `app/src/main/java/com/appuntes/data/repository/TareaRepository.kt`
- [Room DB](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/local/AppDatabase.kt): Room database · Local source of truth for app data. · `app/src/main/java/com/appuntes/data/local/AppDatabase.kt`
- [Remote API](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/data/remote/ApiService.kt): Retrofit/Supabase · Network boundary for backend sync. · `app/src/main/java/com/appuntes/data/remote/ApiService.kt`

### Domain

Core business models.

- [Materia](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/domain/model/Materia.kt): Domain model · Subject model used by UI and business logic. · `app/src/main/java/com/appuntes/domain/model/Materia.kt`
- [Tarea](https://github.com/javier-abraham/appuntes/blob/master/app/src/main/java/com/appuntes/domain/model/Tarea.kt): Domain model · Task model used by UI and business logic. · `app/src/main/java/com/appuntes/domain/model/Tarea.kt`

## Connections

- App class → Main activity: launches · Application boots the Compose entry activity.
- Main activity → Nav graph: hosts · Activity sets up navigation and screen content.
- Nav graph → Screen routes: uses · Navigation is driven by shared route definitions.
- Nav graph → Home screen: navigates to · Routes to the home feature.
- Nav graph → Materias UI: navigates to · Routes to subject management screens.
- Nav graph → Tareas UI: navigates to · Routes to task management screens.
- Nav graph → Calendar: navigates to · Routes to calendar screen.
- Nav graph → Profile: navigates to · Routes to profile screen.
- Nav graph → Onboarding: navigates to · Routes to first-run onboarding.
- Home screen → Home VM: binds · Home UI observes and updates ViewModel state.
- Materias UI → Materias VM: binds · Subject UI observes and updates ViewModel state.
- Tareas UI → Tareas VM: binds · Task UI observes and updates ViewModel state.
- Home VM → Materia repo: reads · Home aggregates data through repositories.
- Home VM → Tarea repo: reads · Home aggregates data through repositories.
- Materias VM → Materia repo: manages · Subject operations flow through repository boundary.
- Tareas VM → Tarea repo: manages · Task operations flow through repository boundary.
- Materia repo → Room DB: persists · Subject data is stored in Room.
- Tarea repo → Room DB: persists · Task data is stored in Room.
- Materia repo → Remote API: syncs · Subject repository can coordinate backend operations.
- Tarea repo → Remote API: syncs · Task repository can coordinate backend operations.
- Room DB → Materia: maps to · Room entities are mapped to domain models.
- Room DB → Tarea: maps to · Room entities are mapped to domain models.
- Notifications → Tarea repo: uses · Notifications are likely driven by task data.
