# sachinthax/todo architecture

> Architecture diagram of the GitHub repository sachinthax/todo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sachinthax/todo
- Repository: https://github.com/sachinthax/todo

## Overview

##### Project type and purpose
- This is a native Android mobile application (written in Kotlin) called “ToDo” – a simple task manager.
- The user can add, view, edit, and delete task cards, which are persisted locally in a SQLite database (via Room-like DAO/Entity abstractions).

##### File structure
- Top-level Gradle scripts (build.gradle, settings.gradle, gradle-wrapper) configure the Android build.
- The `app/` module contains everything for the Android APK:
- `app/src/main/java/com/example/todo/…` – Kotlin code for Activities, data layer, and helper classes.
- `app/src/androidTest` and `app/src/test` – instrumentation and unit tests.
- Data layer files: `Entity.kt`, `DAO.kt`, `myDatabase.kt`, `DataObject.kt`.
- UI layer files: `MainActivity.kt`, `SplashScreen.kt`, `CreateCard.kt`, `UpdateCard.kt`, `Adapter.kt`.

##### README for additional insights
- The README confirms core functionality: simple add/edit/delete tasks with minimal overhead.
- No external services or backend servers – all persistence is local.

##### Detailed element list
- Labels: “SplashScreen”, “MainActivity”, “CreateCardActivity”, “UpdateCardActivity”, “Adapter”
- Annotations: e.g., “Entity.kt defines table schema,” “myDatabase.kt manages DB instance”

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Android Framework"
        AF["Android OS\n(Activity Lifecycle & UI Rendering)"]:::framework
    end

    subgraph "UI Layer"
        SS["SplashScreen"]:::ui
        MA["MainActivity"]:::ui
        CC["CreateCardActivity"]:::ui
        UC["UpdateCardActivity"]:::ui
        AD["Adapter"]:::ui
    end

    subgraph "Data Layer"
        DO["DataObject (DTO)"]:::data
        DA["DAO Interface"]:::data
    end

    subgraph "Persistence Layer"
        DBcfg["myDatabase\n(Room DB Config)"]:::storage
        EN["Entity\n(table schema)"]:::storage
    end

    DB["SQLite Database"]:::storage

    subgraph "Resources"
        L1["activity_splash_screen.xml"]:::res
        L2["activity_main.xml"]:::res
        L3["activity_create_card.xml"]:::res
        L4["activity_update_card.xml"]:::res
        L5["view.xml"]:::res
        D1["circular_button.xml"]:::res
        D2["custom_edittext.xml"]:::res
        D3["ic_launcher_foreground.xml"]:::res
        D4["ic_launcher_background.xml"]:::res
        V1["strings.xml"]:::res
        V2["colors.xml"]:::res
        V3["themes.xml"]:::res
        V4["themes-night.xml"]:::res
    end

    AF --> SS
    AF --> MA
    AF --> CC
    AF --> UC

    SS --> L1
    MA --> L2
    CC --> L3
    UC --> L4

    MA --> AD
    AD --> L5

    MA -->|"QUERY"| DA
    CC -->|"INSERT"| DA
    UC -->|"UPDATE"| DA
    MA -->|"DELETE"| DA

    DA -->|"maps to DTO"| DO
    DA -->|"exec SQL via Room"| DBcfg
    EN --> DBcfg
    DBcfg -->|"exec SQL"| DB
    DA --> DBcfg

    DA -->|"returns DTO list"| AD
    AD -->|"binds to RecyclerView"| MA

    classDef ui fill:#bbdefb,stroke:#1e88e5,color:#0d47a1
    classDef data fill:#c8e6c9,stroke:#388e3c,color:#1b5e20
    classDef storage fill:#d7ccc8,stroke:#6d4c41,color:#3e2723
    classDef res fill:#eceff1,stroke:#78909c,color:#455a64
    classDef framework fill:#f5f5f5,stroke:#9e9e9e,color:#616161

    click SS "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/SplashScreen.kt"
    click MA "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/MainActivity.kt"
    click CC "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/CreateCard.kt"
    click UC "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/UpdateCard.kt"
    click AD "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/Adapter.kt"
    click DO "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/DataObject.kt"
    click DA "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/DAO.kt"
    click DBcfg "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/myDatabase.kt"
    click EN "https://github.com/sachinthax/todo/blob/master/app/src/main/java/com/example/todo/Entity.kt"
    click L1 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/layout/activity_splash_screen.xml"
    click L2 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/layout/activity_main.xml"
    click L3 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/layout/activity_create_card.xml"
    click L4 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/layout/activity_update_card.xml"
    click L5 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/layout/view.xml"
    click D1 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/drawable/circular_button.xml"
    click D2 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/drawable/custom_edittetext.xml"
    click D3 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/drawable-v24/ic_launcher_foreground.xml"
    click D4 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/drawable/ic_launcher_background.xml"
    click V1 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/values/strings.xml"
    click V2 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/values/colors.xml"
    click V3 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/values/themes.xml"
    click V4 "https://github.com/sachinthax/todo/blob/master/app/src/main/res/values-night/themes.xml"
```
