# su92-bscsm-f25-196-droid/innoviast- architecture

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

- Interactive diagram: https://gitdiagram.com/su92-bscsm-f25-196-droid/innoviast-
- Repository: https://github.com/su92-bscsm-f25-196-droid/innoviast-

## Overview

1. This repository is an Android app in Kotlin, not a Flutter app as the README text suggests. The code tree shows a single `app` module built with Gradle, using Android UI, local persistence, and one explicit external API integration.

2. The app’s entry point is `MainActivity`, which likely hosts the top-level Compose UI and screen navigation. `AndroidManifest.xml` defines the Android app wiring, while `build.gradle.kts` and the version catalog control dependencies and build setup.

3. The presentation layer is organized under `ui/` and is split into reusable UI pieces, screens, view models, and theme. `ui/components` contains shared widgets, `ui/screens` contains feature pages, and `ui/theme` defines the Material styling, colors, and typography.

4. The screen set reflects the product’s LMS/ERP shape: login, dashboards, academic modules, chat modules, and report modules. These are the user-facing boundaries that would map to architecture diagram boxes for role-based areas and functional modules.

5. State management is handled by ViewModels in `ui/viewmodel`: `AuthViewModel`, `LmsViewModel`, and `AiAssistantViewModel`. This creates the main UI-to-data boundary: screens observe view-model state and invoke actions, rather than talking directly to data sources.

6. The data layer centers on `LmsRepository`, which is the main orchestration point for app data access. This repository likely abstracts remote calls, local persistence, and business-oriented data shaping so the UI layer stays thin.

7. Local storage is present through `data/local/AppDatabase` and the entity definitions in `data/model/Entities.kt`. That indicates an offline-capable or cache-backed architecture, where structured app data is persisted locally rather than relying only on live network access.

8. Remote/external integration is explicit in `data/api/GeminiApi.kt`. This is the clearest non-UI external dependency in the tree and likely powers the AI assistant feature described in the README. The `assets/.aistudio` and `.env.example` files suggest configuration or credential handling for that integration.

9. The main data flow is: user action in a screen -> ViewModel state/event handling -> repository logic -> local database and/or Gemini API -> updated state back to the UI. That flow is repeated across login, LMS screens, and AI assistant interactions.

10. The README describes a much broader enterprise LMS with admin, HOD, teacher, and student roles, but the current code tree only shows the mobile client structure for those experiences. There is no visible backend service in this repo, so any server, authentication provider, or file/storage infrastructure should be drawn only if sourced from external systems not present here.

11. Testing is split between unit tests and Android instrumentation tests under `app/src/test` and `app/src/androidTest`. That suggests standard Android verification around UI and logic, but not a separate test service or backend pipeline.

12. Overall, the architecture is a layered mobile client: Android/Compose UI at the top, ViewModels in the middle, a repository/data layer beneath, and local Room-like persistence plus a Gemini-powered AI endpoint as the main technical integrations.

Main entry points: [`app/src/main/java/com/example/data/repository/LmsRepository.kt`](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/repository/LmsRepository.kt) (LMS repository), [`app/src/main/java/com/example/ui/screens`](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui/screens) (Screens), [`app/src/main/java/com/example/ui`](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui) (UI layer), [`app/build.gradle.kts`](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/build.gradle.kts) (App build)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_build["Build & Config"]
  node_build_root["Root build<br/>Gradle root<br/>[build.gradle.kts]"]
  node_build_app["App build<br/>Android module build<br/>[build.gradle.kts]"]
  node_versions["Versions<br/>catalog<br/>[libs.versions.toml]"]
  node_manifest["Manifest<br/>android wiring"]
end

subgraph group_group_app["Android App"]
  node_main_activity["MainActivity<br/>entry activity<br/>[MainActivity.kt]"]
  node_ui_root["UI layer<br/>Compose presentation"]
  node_components["Components<br/>shared widgets"]
  node_screens["Screens<br/>feature pages"]
  node_theme["Theme<br/>Material styling"]
  node_auth_vm["Auth VM<br/>state holder<br/>[AuthViewModel.kt]"]
  node_lms_vm["LMS VM<br/>state holder<br/>[LmsViewModel.kt]"]
  node_ai_vm["AI VM<br/>state holder"]
  node_repository["LMS repository<br/>data orchestration<br/>[LmsRepository.kt]"]
  node_database[("App database<br/>local storage<br/>[AppDatabase.kt]")]
  node_entities["Entities<br/>data model<br/>[Entities.kt]"]
  node_gemini_api["Gemini API<br/>external API<br/>[GeminiApi.kt]"]
  node_assets_cfg["AI config<br/>secret/config<br/>[.aistudio]"]
end

subgraph group_group_tests["Tests"]
  node_unit_tests["Unit tests<br/>JVM tests"]
  node_android_tests["Android tests<br/>instrumentation tests"]
end

node_repo{{"Repository<br/>Android app"}}

node_repo -->|"configured by"| node_build_root
node_repo -->|"contains"| node_build_app
node_repo -->|"wired by"| node_manifest
node_build_root -->|"uses"| node_versions
node_build_app -->|"uses"| node_versions
node_manifest -->|"launches"| node_main_activity
node_main_activity -->|"hosts"| node_ui_root
node_ui_root -->|"reuses"| node_components
node_ui_root -->|"contains"| node_screens
node_ui_root -->|"styles"| node_theme
node_screens -->|"observes"| node_auth_vm
node_screens -->|"observes"| node_lms_vm
node_screens -->|"observes"| node_ai_vm
node_auth_vm -->|"calls"| node_repository
node_lms_vm -->|"calls"| node_repository
node_ai_vm -->|"calls"| node_repository
node_repository -->|"reads/writes"| node_database
node_repository -->|"maps"| node_entities
node_repository -->|"integrates"| node_gemini_api
node_gemini_api -->|"configured by"| node_assets_cfg
node_repository -.->|"feeds"| node_screens
node_unit_tests -.->|"verifies"| node_build_app
node_android_tests -.->|"verifies"| node_main_activity

click node_build_root "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/build.gradle.kts"
click node_build_app "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/build.gradle.kts"
click node_versions "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/gradle/libs.versions.toml"
click node_manifest "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/AndroidManifest.xml"
click node_main_activity "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/MainActivity.kt"
click node_ui_root "https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui"
click node_components "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/components/CommonComponents.kt"
click node_screens "https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui/screens"
click node_theme "https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui/theme"
click node_auth_vm "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/viewmodel/AuthViewModel.kt"
click node_lms_vm "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/viewmodel/LmsViewModel.kt"
click node_ai_vm "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/viewmodel/AiAssistantViewModel.kt"
click node_repository "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/repository/LmsRepository.kt"
click node_database "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/local/AppDatabase.kt"
click node_entities "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/model/Entities.kt"
click node_gemini_api "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/api/GeminiApi.kt"
click node_assets_cfg "https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/assets/.aistudio"
click node_unit_tests "https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/test/java/com/example"
click node_android_tests "https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/androidTest/java/com/example"

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_build_root,node_build_app,node_versions,node_manifest toneBlue
class node_main_activity,node_ui_root,node_components,node_screens,node_theme,node_auth_vm,node_lms_vm,node_ai_vm,node_repository,node_database,node_entities,node_gemini_api,node_assets_cfg toneAmber
class node_unit_tests,node_android_tests toneMint
class node_repo toneNeutral
```

## Components

### Build & Config

Gradle, manifest, and repo-level configuration that wire the Android app.

- [Root build](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/build.gradle.kts): Gradle root · Top-level Gradle build and project settings. · `build.gradle.kts`
- [App build](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/build.gradle.kts): Android module build · Module-level Android/Kotlin build configuration. · `app/build.gradle.kts`
- [Versions](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/gradle/libs.versions.toml): catalog · Central dependency and plugin version catalog. · `gradle/libs.versions.toml`
- [Manifest](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/AndroidManifest.xml): android wiring · Declares the Android app entry points and app-level wiring. · `app/src/main/AndroidManifest.xml`

### Android App

Main app module with UI, state, data, and resources.

- [MainActivity](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/MainActivity.kt): entry activity · Application entry point and likely Compose host/navigation root. · `app/src/main/java/com/example/MainActivity.kt`
- [UI layer](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui): Compose presentation · Reusable UI, screens, view models, and theme resources. · `app/src/main/java/com/example/ui`
- [Components](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/components/CommonComponents.kt): shared widgets · Common reusable UI building blocks. · `app/src/main/java/com/example/ui/components/CommonComponents.kt`
- [Screens](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui/screens): feature pages · User-facing LMS pages for login, dashboards, academic, chat, and reports. · `app/src/main/java/com/example/ui/screens`
- [Theme](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/main/java/com/example/ui/theme): Material styling · Colors, typography, and app theme definitions. · `app/src/main/java/com/example/ui/theme`
- [Auth VM](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/viewmodel/AuthViewModel.kt): state holder · Login and authentication-related UI state and actions. · `app/src/main/java/com/example/ui/viewmodel/AuthViewModel.kt`
- [LMS VM](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/viewmodel/LmsViewModel.kt): state holder · Core LMS screen state and user interactions. · `app/src/main/java/com/example/ui/viewmodel/LmsViewModel.kt`
- [AI VM](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/ui/viewmodel/AiAssistantViewModel.kt): state holder · Assistant feature state and request handling. · `app/src/main/java/com/example/ui/viewmodel/AiAssistantViewModel.kt`
- [LMS repository](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/repository/LmsRepository.kt): data orchestration · Primary data access and business-facing coordination layer. · `app/src/main/java/com/example/data/repository/LmsRepository.kt`
- [App database](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/local/AppDatabase.kt): local storage · Local persistence boundary for cached/offline app data. · `app/src/main/java/com/example/data/local/AppDatabase.kt`
- [Entities](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/model/Entities.kt): data model · Structured local records used by persistence and app logic. · `app/src/main/java/com/example/data/model/Entities.kt`
- [Gemini API](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/app/src/main/java/com/example/data/api/GeminiApi.kt): external API · External AI integration used by the assistant feature. · `app/src/main/java/com/example/data/api/GeminiApi.kt`
- [AI config](https://github.com/su92-bscsm-f25-196-droid/innoviast-/blob/main/assets/.aistudio): secret/config · Local AI Studio and environment configuration hints. · `assets/.aistudio`

### Tests

Unit and instrumentation verification for the mobile client.

- [Unit tests](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/test/java/com/example): JVM tests · Local logic verification for app code. · `app/src/test/java/com/example`
- [Android tests](https://github.com/su92-bscsm-f25-196-droid/innoviast-/tree/main/app/src/androidTest/java/com/example): instrumentation tests · On-device/instrumented UI and integration verification. · `app/src/androidTest/java/com/example`

### Other components

- **Repository**: Android app · Kotlin Android client for LMS/ERP-style workflows with AI integration.

## Connections

- Repository → Root build: configured by · Repository-level Gradle setup governs the project.
- Repository → App build: contains · Android app module is the core deliverable.
- Repository → Manifest: wired by · Android entry wiring is declared in the manifest.
- Root build → Versions: uses · Root build consumes the version catalog.
- App build → Versions: uses · Module dependencies and plugins are versioned centrally.
- Manifest → MainActivity: launches · Manifest points to the app entry activity.
- MainActivity → UI layer: hosts · Activity likely hosts the top-level Compose UI and navigation.
- UI layer → Components: reuses · Shared widgets support multiple screens.
- UI layer → Screens: contains · Feature screens make up the visible product surface.
- UI layer → Theme: styles · Theme defines the visual system for the UI.
- Screens → Auth VM: observes · Login flow binds to authentication state.
- Screens → LMS VM: observes · Core LMS pages bind to LMS state.
- Screens → AI VM: observes · Chat/assistant screens bind to assistant state.
- Auth VM → LMS repository: calls · Authentication actions flow through the repository boundary.
- LMS VM → LMS repository: calls · LMS data and actions are coordinated through the repository.
- AI VM → LMS repository: calls · Assistant workflows route through the repository as needed.
- LMS repository → App database: reads/writes · Repository manages local persistence.
- LMS repository → Entities: maps · Repository operates on local structured models.
- LMS repository → Gemini API: integrates · Repository reaches the external AI endpoint for assistant features.
- Gemini API → AI config: configured by · AI access is guided by local configuration/credential files.
- LMS repository → Screens: feeds · Data updates propagate back to UI state through view models.
- Unit tests → App build: verifies · JVM tests validate application logic.
- Android tests → MainActivity: verifies · Instrumentation tests cover the Android entry/UI path.
