# sujalpoudel78/luna architecture

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

- Interactive diagram: https://gitdiagram.com/sujalpoudel78/luna
- Repository: https://github.com/sujalpoudel78/luna

## Overview

Luna is a personal-use Flutter app for chat-style notes, daily habit tracking with calendar progress, and recent screen-time awareness. Users open the app and use its feature pages; screen-time requires enabling usage access on Android. The README says data stays local. App implementation files were not sampled, so navigation, persistence calls, and platform-plugin wiring cannot be verified; the graph shows the documented capabilities without inventing those connections.

Main entry points: [`lib/pages/screentime.dart`](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/screentime.dart) (Screen time), [`lib/main.dart`](https://github.com/sujalpoudel78/luna/blob/main/lib/main.dart) (App entry), [`lib/pages/notes_page.dart`](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/notes_page.dart) (Notes), [`lib/pages/habit_page.dart`](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/habit_page.dart) (Habits)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_entry["App entry<br/>[main.dart]"]
  node_home["Home page<br/>[home_page.dart]"]
  node_notes["Notes<br/>[notes_page.dart]"]
  node_theme["Theme<br/>[theme.dart]"]
end

subgraph group_habits["Habit tracking"]
  node_habitpage["Habits<br/>[habit_page.dart]"]
  node_habitadd["Add habit<br/>[habit_add.dart]"]
  node_calendar["Progress calendar<br/>[calendar_page.dart]"]
  node_habitmodel["Habit model<br/>[habit_model.dart]"]
end

subgraph group_wellbeing["Personal wellbeing"]
  node_screentime["Screen time<br/>[screentime.dart]"]
end

node_user(("User"))
node_usageaccess["Usage access"]
node_localdata[("Local device data")]

node_user -->|"opens"| node_entry
node_user -->|"uses"| node_notes
node_user -->|"tracks habits"| node_habitpage
node_user -->|"views progress"| node_calendar
node_user -->|"views usage"| node_screentime
node_screentime -->|"requires access"| node_usageaccess

click node_entry "https://github.com/sujalpoudel78/luna/blob/main/lib/main.dart"
click node_home "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/home_page.dart"
click node_notes "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/notes_page.dart"
click node_theme "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/theme.dart"
click node_habitpage "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/habit_page.dart"
click node_habitadd "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/habit_add.dart"
click node_calendar "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/calendar_page.dart"
click node_habitmodel "https://github.com/sujalpoudel78/luna/blob/main/lib/models/habit_model.dart"
click node_screentime "https://github.com/sujalpoudel78/luna/blob/main/lib/pages/screentime.dart"

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_entry,node_home,node_notes,node_theme,node_user toneBlue
class node_habitpage,node_habitadd,node_calendar,node_habitmodel,node_localdata toneAmber
class node_screentime toneMint
class node_usageaccess toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/sujalpoudel78/luna/blob/main/lib/main.dart): `lib/main.dart`
- [Home page](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/home_page.dart): `lib/pages/home_page.dart`
- [Notes](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/notes_page.dart): `lib/pages/notes_page.dart`
- [Theme](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/theme.dart): `lib/pages/theme.dart`

### Habit tracking

- [Habits](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/habit_page.dart): `lib/pages/habit_page.dart`
- [Add habit](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/habit_add.dart): `lib/pages/habit_add.dart`
- [Progress calendar](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/calendar_page.dart): `lib/pages/calendar_page.dart`
- [Habit model](https://github.com/sujalpoudel78/luna/blob/main/lib/models/habit_model.dart): `lib/models/habit_model.dart`

### Personal wellbeing

- [Screen time](https://github.com/sujalpoudel78/luna/blob/main/lib/pages/screentime.dart): `lib/pages/screentime.dart`

### Other components

- **User**
- **Usage access**
- **Local device data**

## Connections

- User → App entry: opens
- User → Notes: uses
- User → Habits: tracks habits
- User → Progress calendar: views progress
- User → Screen time: views usage
- Screen time → Usage access: requires access
