# developingalex/noteal architecture

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

- Interactive diagram: https://gitdiagram.com/developingalex/noteal
- Repository: https://github.com/developingalex/noteal

## Overview

1. **Overall shape**
   - Noteal is a small, single-module Android app with no backend and no network layer.
   - The architecture is a classic local-only CRUD note app: a list screen, a note editor/viewer screen, and a storage/helper layer that manages notes on device.

2. **Main presentation boundary**
   - The app is centered around two Activities in `developingAlex.noteal`:
     - `MainActivity` for the note list / home screen.
     - `DisplayNote` for creating, viewing, editing, and exporting one note.
   - This is the primary user-flow boundary: list management happens in `MainActivity`, while note content editing happens in `DisplayNote`.

3. **Storage and domain boundary**
   - `NoteManager` is the key non-UI subsystem.
   - Based on the README and class naming, it is the app’s note persistence and file-operation layer: loading notes, saving changes, deleting notes, and exporting a note as a text file.
   - `NoteManagerException` is the local error boundary for failures in note operations, separating storage problems from UI code.

4. **Data flow between screens**
   - The main screen likely asks `NoteManager` for the current set of notes and renders them in a list.
   - When a note is selected, the app navigates to `DisplayNote`, passing the note identity or contents.
   - When the user saves or navigates back, the edited note content is handed back through the activity flow to `NoteManager` for persistence.

5. **User actions and lifecycle behavior**
   - The README describes two save paths: explicit save from the overflow menu, or automatic save on Android back navigation.
   - Deletion is initiated from the list screen via long-press confirmation, which implies a list item-level action routed through `MainActivity` and then into `NoteManager`.
   - Export is a note-level action from the detail screen’s menu, keeping file export separate from list management.

6. **Local file storage model**
   - The app appears to store notes on device using app-private storage, not a database or cloud service.
   - Exported notes are written to app-specific external storage under the app’s files area, with filenames like `noteal-<title>.txt`.
   - That means the app has two storage concerns: internal note persistence used by the app itself, and user-visible exported text files.

7. **UI resource structure**
   - `activity_main.xml` and `my_list_layout.xml` define the list UI and list row presentation.
   - `activity_display_note.xml` defines the note editor/viewer screen.
   - Menu resources in `res/menu` define the top-right overflow actions for each screen, which are part of the app’s command surface.

8. **App packaging and Android boundaries**
   - `AndroidManifest.xml` defines the app entry points and activity registration.
   - The project is a standard Gradle Android app module (`app/build.gradle`) with resource-driven UI, so most behavior is split between Activity code and Android XML resources rather than custom framework code.

9. **Testing and quality boundaries**
   - There are both instrumented tests under `androidTest` and local JVM tests under `test`, but only the default template tests are present.
   - This suggests the repo currently has minimal automated coverage around the note workflow and storage logic.

10. **What an architecture diagram should show**
   - A user-facing flow from `MainActivity` to `DisplayNote`.
   - `MainActivity` as the list/controller screen and `DisplayNote` as the editor/export screen.
   - Both Activities depending on `NoteManager`.
   - `NoteManager` depending on device storage for save/load/delete/export operations.
   - `NoteManagerException` as the failure path back to the UI.
   - Resource files (`layout`, `menu`, `values`) supporting the two-screen Android UI.

Main entry points: [`app/src/main/java/developingAlex/noteal/MainActivity.java`](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/MainActivity.java) (MainActivity), [`app/src/main/java/developingAlex/noteal/DisplayNote.java`](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/DisplayNote.java) (DisplayNote), [`app/src/main/java/developingAlex/noteal/NoteManager.java`](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/NoteManager.java) (NoteManager), [`app/src/main/res/values/styles.xml`](https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/styles.xml) (Styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App code"]
  node_main_activity["MainActivity<br/>activity list screen<br/>[MainActivity.java]"]
  node_display_note["DisplayNote<br/>activity editor screen<br/>[DisplayNote.java]"]
  node_note_manager[("NoteManager<br/>storage service<br/>[NoteManager.java]")]
  node_note_error{{"NoteManagerException<br/>error boundary"}}
  node_manifest["Manifest"]
end

subgraph group_res["Resources"]
  node_activity_main_xml["Main layout<br/>ui layout<br/>[activity_main.xml]"]
  node_list_row_xml["List row<br/>ui row layout<br/>[my_list_layout.xml]"]
  node_activity_display_xml["Editor layout<br/>ui layout"]
  node_menu_main_xml["Main menu<br/>ui menu<br/>[menu_main.xml]"]
  node_display_menu_xml["Note menu<br/>ui menu<br/>[display_note.xml]"]
  node_strings["Strings<br/>resources<br/>[strings.xml]"]
  node_styles["Styles<br/>theme resources<br/>[styles.xml]"]
  node_colors["Colors<br/>palette<br/>[colors.xml]"]
  node_dimens["Dimensions<br/>layout metrics<br/>[dimens.xml]"]
end

subgraph group_tests["Tests"]
  node_unit_test["Unit test<br/>jvm test"]
  node_instrumented_test["Instrumented test<br/>android test"]
end

node_manifest -->|"launches"| node_main_activity
node_manifest -->|"registers"| node_display_note
node_main_activity -->|"inflates"| node_activity_main_xml
node_main_activity -->|"uses"| node_menu_main_xml
node_main_activity -->|"renders"| node_list_row_xml
node_main_activity -->|"reads"| node_strings
node_main_activity -->|"loads notes"| node_note_manager
node_main_activity -.->|"handles"| node_note_error
node_main_activity -->|"opens note"| node_display_note
node_display_note -->|"inflates"| node_activity_display_xml
node_display_note -->|"uses"| node_display_menu_xml
node_display_note -->|"reads"| node_strings
node_display_note -->|"saves exports"| node_note_manager
node_display_note -.->|"handles"| node_note_error
node_note_manager -->|"throws"| node_note_error
node_note_manager -.->|"may style"| node_colors
node_note_manager -.->|"may style"| node_dimens
node_styles -->|"references"| node_colors
node_styles -->|"references"| node_dimens
node_main_activity -.->|"themes"| node_styles
node_display_note -.->|"themes"| node_styles
node_unit_test -.->|"targets"| node_main_activity
node_instrumented_test -.->|"targets"| node_main_activity

click node_main_activity "https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/MainActivity.java"
click node_display_note "https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/DisplayNote.java"
click node_note_manager "https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/NoteManager.java"
click node_note_error "https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/NoteManagerException.java"
click node_manifest "https://github.com/developingalex/noteal/blob/master/app/src/main/AndroidManifest.xml"
click node_activity_main_xml "https://github.com/developingalex/noteal/blob/master/app/src/main/res/layout/activity_main.xml"
click node_list_row_xml "https://github.com/developingalex/noteal/blob/master/app/src/main/res/layout/my_list_layout.xml"
click node_activity_display_xml "https://github.com/developingalex/noteal/blob/master/app/src/main/res/layout/activity_display_note.xml"
click node_menu_main_xml "https://github.com/developingalex/noteal/blob/master/app/src/main/res/menu/menu_main.xml"
click node_display_menu_xml "https://github.com/developingalex/noteal/blob/master/app/src/main/res/menu/display_note.xml"
click node_strings "https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/strings.xml"
click node_styles "https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/styles.xml"
click node_colors "https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/colors.xml"
click node_dimens "https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/dimens.xml"
click node_unit_test "https://github.com/developingalex/noteal/blob/master/app/src/test/java/developingAlex/noteal/ExampleUnitTest.java"
click node_instrumented_test "https://github.com/developingalex/noteal/blob/master/app/src/androidTest/java/developingAlex/noteal/ExampleInstrumentedTest.java"

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_main_activity,node_display_note,node_note_manager,node_note_error,node_manifest toneBlue
class node_activity_main_xml,node_list_row_xml,node_activity_display_xml,node_menu_main_xml,node_display_menu_xml,node_strings,node_styles,node_colors,node_dimens toneAmber
class node_unit_test,node_instrumented_test toneMint
```

## Components

### App code

Android activities and local note persistence

- [MainActivity](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/MainActivity.java): activity list screen · Home screen that lists notes and routes create/open/delete actions · `app/src/main/java/developingAlex/noteal/MainActivity.java`
- [DisplayNote](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/DisplayNote.java): activity editor screen · Note detail screen for viewing, editing, saving, and exporting one note · `app/src/main/java/developingAlex/noteal/DisplayNote.java`
- [NoteManager](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/NoteManager.java): storage service · Local note persistence and file-operation layer for load/save/delete/export · `app/src/main/java/developingAlex/noteal/NoteManager.java`
- [NoteManagerException](https://github.com/developingalex/noteal/blob/master/app/src/main/java/developingAlex/noteal/NoteManagerException.java): error boundary · Application-level exception for note operation failures · `app/src/main/java/developingAlex/noteal/NoteManagerException.java`
- [Manifest](https://github.com/developingalex/noteal/blob/master/app/src/main/AndroidManifest.xml): android manifest · Declares the app and registers activity entry points · `app/src/main/AndroidManifest.xml`

### Resources

Layouts, menus, and app values

- [Main layout](https://github.com/developingalex/noteal/blob/master/app/src/main/res/layout/activity_main.xml): ui layout · Root layout for the note list screen · `app/src/main/res/layout/activity_main.xml`
- [List row](https://github.com/developingalex/noteal/blob/master/app/src/main/res/layout/my_list_layout.xml): ui row layout · Row template used to render individual notes in the list · `app/src/main/res/layout/my_list_layout.xml`
- [Editor layout](https://github.com/developingalex/noteal/blob/master/app/src/main/res/layout/activity_display_note.xml): ui layout · Root layout for the note editor and viewer screen · `app/src/main/res/layout/activity_display_note.xml`
- [Main menu](https://github.com/developingalex/noteal/blob/master/app/src/main/res/menu/menu_main.xml): ui menu · Overflow actions for the list screen · `app/src/main/res/menu/menu_main.xml`
- [Note menu](https://github.com/developingalex/noteal/blob/master/app/src/main/res/menu/display_note.xml): ui menu · Overflow actions for the note detail screen · `app/src/main/res/menu/display_note.xml`
- [Strings](https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/strings.xml): resources · App text and labels shared by activities and menus · `app/src/main/res/values/strings.xml`
- [Styles](https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/styles.xml): theme resources · Theme and styling definitions for the Android app · `app/src/main/res/values/styles.xml`
- [Colors](https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/colors.xml): palette · Shared color constants for the UI · `app/src/main/res/values/colors.xml`
- [Dimensions](https://github.com/developingalex/noteal/blob/master/app/src/main/res/values/dimens.xml): layout metrics · Shared spacing and sizing constants · `app/src/main/res/values/dimens.xml`

### Tests

Default JVM and instrumented test scaffolding

- [Unit test](https://github.com/developingalex/noteal/blob/master/app/src/test/java/developingAlex/noteal/ExampleUnitTest.java): jvm test · Default local test scaffold with no app-specific coverage · `app/src/test/java/developingAlex/noteal/ExampleUnitTest.java`
- [Instrumented test](https://github.com/developingalex/noteal/blob/master/app/src/androidTest/java/developingAlex/noteal/ExampleInstrumentedTest.java): android test · Default device test scaffold with no app-specific coverage · `app/src/androidTest/java/developingAlex/noteal/ExampleInstrumentedTest.java`

## Connections

- Manifest → MainActivity: launches · Declares the entry activity for the app
- Manifest → DisplayNote: registers · Makes the detail activity available to Android
- MainActivity → Main layout: inflates · Uses the list screen layout
- MainActivity → Main menu: uses · Wires list-screen overflow actions
- MainActivity → List row: renders · Uses the row template for note items
- MainActivity → Strings: reads · Consumes UI labels and text resources
- MainActivity → NoteManager: loads notes · Fetches and mutates the current note set
- MainActivity → NoteManagerException: handles · Surfaces persistence failures to the UI
- MainActivity → DisplayNote: opens note · Navigates to the detail screen with a selected note
- DisplayNote → Editor layout: inflates · Uses the editor/viewer layout
- DisplayNote → Note menu: uses · Wires note-level overflow actions
- DisplayNote → Strings: reads · Consumes UI labels and text resources
- DisplayNote → NoteManager: saves exports · Persists edits, deletes notes, and writes exported files
- DisplayNote → NoteManagerException: handles · Handles failures from note operations
- NoteManager → NoteManagerException: throws · Signals local storage and file-operation failures
- NoteManager → Colors: may style · Supports app theming indirectly through resources
- NoteManager → Dimensions: may style · Supports app theming indirectly through resources
- Styles → Colors: references · Builds theme colors from the palette
- Styles → Dimensions: references · Uses shared spacing and sizing values
- MainActivity → Styles: themes · Applies app theme to the list screen
- DisplayNote → Styles: themes · Applies app theme to the editor screen
- Unit test → MainActivity: targets · Default unit test scaffold for app logic
- Instrumented test → MainActivity: targets · Default device test scaffold for app behavior
