# morgan-davila/axe-project architecture

> Architecture diagram of the GitHub repository morgan-davila/axe-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/morgan-davila/axe-project
- Repository: https://github.com/morgan-davila/axe-project

## Overview

AXE is a local-first personal productivity app. The main user workflow is to create and manage habits, then mark due habits complete and see daily progress, streaks, and weekly totals. The app also includes theme controls and a flashcard interface; its calendar and broader statistics capabilities are documented, though their runtime connections are not shown here. Habit and dashboard state currently uses browser LocalStorage. Connections are limited to those supported by excerpts, the source index, or the README; several subsystems were not sampled in full.

Main entry points: [`src/js/main.js`](https://github.com/morgan-davila/axe-project/blob/main/src/js/main.js) (App Startup), [`src/js/services/storage.js`](https://github.com/morgan-davila/axe-project/blob/main/src/js/services/storage.js) (Local Data), [`src/js/components/theme/themeEvents.js`](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/themeEvents.js) (Theme Events), [`src/js/components/habits/popupSearch/habitsSearchEvents.js`](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/popupSearch/habitsSearchEvents.js) (Habit Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Application Core"]
  node_entry["App Startup<br/>[main.js]"]
  node_themeevents["Theme Events<br/>[themeEvents.js]"]
  node_theme["Theme Logic<br/>[theme.js]"]
  node_themeui["Theme Interface<br/>[themeUI.js]"]
end

subgraph group_habits["Habit Management"]
  node_habitmodel["Habit Logic<br/>[habits.js]"]
  node_habitevents["Habit Events<br/>[habitsEvents.js]"]
  node_habitui["Habit Interface<br/>[habitsUI.js]"]
  node_search["Habit Search"]
  node_searchui["Search Interface<br/>[habitsSearchUI.js]"]
end

subgraph group_progress["Progress Dashboard"]
  node_dashboard["Dashboard Logic<br/>[dashboard.js]"]
  node_dashboardevents["Dashboard Events<br/>[dashboardEvents.js]"]
  node_dashboardui["Dashboard View<br/>[dashboardUI.js]"]
  node_calendar["Calendar<br/>[calendar.js]"]
end

subgraph group_study["Study Tools"]
  node_scolar["Flashcard Logic<br/>[scolar.js]"]
  node_scolarevents["Flashcard Events<br/>[scolarEvents.js]"]
  node_scolarui["Flashcard Interface<br/>[scolarUI.js]"]
  node_editor["Flashcard Editor"]
end

subgraph group_platform["Shared Services"]
  node_storage["Local Data<br/>[storage.js]"]
  node_date["Date Utilities<br/>[date.js]"]
  node_dom["DOM Utilities<br/>[dom.js]"]
  node_format["Formatting<br/>[format.js]"]
  node_effects["Visual Effects<br/>[effects.js]"]
  node_error["Error Utilities<br/>[error.js]"]
end

node_user(("User"))
node_browserstorage[("Browser LocalStorage")]

node_user -->|"opens app"| node_entry
node_entry -->|"sets up"| node_themeevents
node_entry -->|"initializes"| node_habitmodel
node_entry -->|"sets up"| node_habitevents
node_entry -->|"sets up"| node_search
node_entry -->|"renders"| node_habitui
node_entry -->|"initializes"| node_dashboard
node_entry -->|"sets up"| node_dashboardevents
node_entry -->|"imports"| node_scolar
node_entry -->|"sets up"| node_scolarui
node_entry -->|"sets up"| node_scolarevents
node_entry -->|"sets up"| node_editor
node_habitevents -->|"uses"| node_habitmodel
node_habitevents -->|"saves habits"| node_storage
node_habitevents -->|"updates view"| node_habitui
node_search -->|"filters habits"| node_habitmodel
node_search -->|"renders results"| node_habitui
node_search -->|"refreshes controls"| node_habitevents
node_search -->|"opens popup"| node_searchui
node_dashboard -->|"updates streaks"| node_storage
node_dashboard -->|"checks dates"| node_date
node_dashboard -->|"renders progress"| node_dashboardui
node_dashboardevents -->|"refreshes dashboard"| node_dashboard
node_dashboardevents -->|"updates view"| node_dashboardui
node_dashboardevents -->|"records completion"| node_storage
node_dashboardui -->|"animates stats"| node_effects
node_dashboardui -->|"formats streaks"| node_format
node_scolarevents -->|"controls cards"| node_scolarui
node_scolarevents -->|"uses editor"| node_editor
node_scolarevents -->|"saves cards"| node_storage
node_scolarevents -->|"uses logic"| node_scolar
node_scolarui -->|"reads cards"| node_storage
node_editor -->|"uses view"| node_scolarui
node_themeevents -->|"loads and saves"| node_storage
node_themeevents -->|"gets next theme"| node_theme
node_themeevents -->|"applies theme"| node_themeui
node_themeevents -->|"updates chart colors"| node_dashboardui
node_storage -->|"reads and writes"| node_browserstorage

click node_entry "https://github.com/morgan-davila/axe-project/blob/main/src/js/main.js"
click node_habitmodel "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/habits.js"
click node_habitevents "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/habitsEvents.js"
click node_habitui "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/habitsUI.js"
click node_search "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/popupSearch/habitsSearchEvents.js"
click node_searchui "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/popupSearch/habitsSearchUI.js"
click node_dashboard "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/dashboard/dashboard.js"
click node_dashboardevents "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/dashboard/dashboardEvents.js"
click node_dashboardui "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/dashboard/dashboardUI.js"
click node_calendar "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/calendar/calendar.js"
click node_scolar "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/scolar.js"
click node_scolarevents "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/scolarEvents.js"
click node_scolarui "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/scolarUI.js"
click node_editor "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/flashcardsEditor.js"
click node_themeevents "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/themeEvents.js"
click node_theme "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/theme.js"
click node_themeui "https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/themeUI.js"
click node_storage "https://github.com/morgan-davila/axe-project/blob/main/src/js/services/storage.js"
click node_date "https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/date.js"
click node_dom "https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/dom.js"
click node_format "https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/format.js"
click node_effects "https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/effects.js"
click node_error "https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/error.js"

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_themeevents,node_theme,node_themeui,node_user toneBlue
class node_habitmodel,node_habitevents,node_habitui,node_search,node_searchui,node_browserstorage toneAmber
class node_dashboard,node_dashboardevents,node_dashboardui,node_calendar toneMint
class node_scolar,node_scolarevents,node_scolarui,node_editor toneRose
class node_storage,node_date,node_dom,node_format,node_effects,node_error toneIndigo
```

## Components

### Application Core

- [App Startup](https://github.com/morgan-davila/axe-project/blob/main/src/js/main.js): `src/js/main.js`
- [Theme Events](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/themeEvents.js): `src/js/components/theme/themeEvents.js`
- [Theme Logic](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/theme.js): `src/js/components/theme/theme.js`
- [Theme Interface](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/theme/themeUI.js): `src/js/components/theme/themeUI.js`

### Habit Management

- [Habit Logic](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/habits.js): `src/js/components/habits/habits.js`
- [Habit Events](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/habitsEvents.js): `src/js/components/habits/habitsEvents.js`
- [Habit Interface](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/habitsUI.js): `src/js/components/habits/habitsUI.js`
- [Habit Search](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/popupSearch/habitsSearchEvents.js): `src/js/components/habits/popupSearch/habitsSearchEvents.js`
- [Search Interface](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/habits/popupSearch/habitsSearchUI.js): `src/js/components/habits/popupSearch/habitsSearchUI.js`

### Progress Dashboard

- [Dashboard Logic](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/dashboard/dashboard.js): `src/js/components/dashboard/dashboard.js`
- [Dashboard Events](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/dashboard/dashboardEvents.js): `src/js/components/dashboard/dashboardEvents.js`
- [Dashboard View](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/dashboard/dashboardUI.js): `src/js/components/dashboard/dashboardUI.js`
- [Calendar](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/calendar/calendar.js): `src/js/components/calendar/calendar.js`

### Study Tools

- [Flashcard Logic](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/scolar.js): `src/js/components/scolar/scolar.js`
- [Flashcard Events](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/scolarEvents.js): `src/js/components/scolar/scolarEvents.js`
- [Flashcard Interface](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/scolarUI.js): `src/js/components/scolar/scolarUI.js`
- [Flashcard Editor](https://github.com/morgan-davila/axe-project/blob/main/src/js/components/scolar/flashcardsEditor.js): `src/js/components/scolar/flashcardsEditor.js`

### Shared Services

- [Local Data](https://github.com/morgan-davila/axe-project/blob/main/src/js/services/storage.js): `src/js/services/storage.js`
- [Date Utilities](https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/date.js): `src/js/utils/date.js`
- [DOM Utilities](https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/dom.js): `src/js/utils/dom.js`
- [Formatting](https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/format.js): `src/js/utils/format.js`
- [Visual Effects](https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/effects.js): `src/js/utils/effects.js`
- [Error Utilities](https://github.com/morgan-davila/axe-project/blob/main/src/js/utils/error.js): `src/js/utils/error.js`

### Other components

- **User**
- **Browser LocalStorage**

## Connections

- User → App Startup: opens app (evidence: `README.md`)
- App Startup → Theme Events: sets up (evidence: `src/js/main.js`)
- App Startup → Habit Logic: initializes (evidence: `src/js/main.js`)
- App Startup → Habit Events: sets up (evidence: `src/js/main.js`)
- App Startup → Habit Search: sets up (evidence: `src/js/main.js`)
- App Startup → Habit Interface: renders (evidence: `src/js/main.js`)
- App Startup → Dashboard Logic: initializes (evidence: `src/js/main.js`)
- App Startup → Dashboard Events: sets up (evidence: `src/js/main.js`)
- App Startup → Flashcard Logic: imports (evidence: `src/js/main.js`)
- App Startup → Flashcard Interface: sets up (evidence: `src/js/main.js`)
- App Startup → Flashcard Events: sets up (evidence: `src/js/main.js`)
- App Startup → Flashcard Editor: sets up (evidence: `src/js/main.js`)
- Habit Events → Habit Logic: uses (evidence: `src/js/components/habits/habitsEvents.js`)
- Habit Events → Local Data: saves habits (evidence: `src/js/components/habits/habitsEvents.js`)
- Habit Events → Habit Interface: updates view (evidence: `src/js/components/habits/habitsEvents.js`)
- Habit Search → Habit Logic: filters habits (evidence: `src/js/components/habits/popupSearch/habitsSearchEvents.js`)
- Habit Search → Habit Interface: renders results (evidence: `src/js/components/habits/popupSearch/habitsSearchEvents.js`)
- Habit Search → Habit Events: refreshes controls (evidence: `src/js/components/habits/popupSearch/habitsSearchEvents.js`)
- Habit Search → Search Interface: opens popup (evidence: `src/js/components/habits/popupSearch/habitsSearchEvents.js`)
- Dashboard Logic → Local Data: updates streaks (evidence: `src/js/components/dashboard/dashboard.js`)
- Dashboard Logic → Date Utilities: checks dates (evidence: `src/js/components/dashboard/dashboard.js`)
- Dashboard Logic → Dashboard View: renders progress (evidence: `src/js/components/dashboard/dashboard.js`)
- Dashboard Events → Dashboard Logic: refreshes dashboard (evidence: `src/js/components/dashboard/dashboardEvents.js`)
- Dashboard Events → Dashboard View: updates view (evidence: `src/js/components/dashboard/dashboardEvents.js`)
- Dashboard Events → Local Data: records completion (evidence: `src/js/components/dashboard/dashboardEvents.js`)
- Dashboard View → Visual Effects: animates stats (evidence: `src/js/components/dashboard/dashboardUI.js`)
- Dashboard View → Formatting: formats streaks (evidence: `src/js/components/dashboard/dashboardUI.js`)
- Flashcard Events → Flashcard Interface: controls cards (evidence: `src/js/components/scolar/scolarEvents.js`)
- Flashcard Events → Flashcard Editor: uses editor (evidence: `src/js/components/scolar/scolarEvents.js`)
- Flashcard Events → Local Data: saves cards (evidence: `src/js/components/scolar/scolarEvents.js`)
- Flashcard Events → Flashcard Logic: uses logic (evidence: `src/js/components/scolar/scolarEvents.js`)
- Flashcard Interface → Local Data: reads cards (evidence: `src/js/components/scolar/scolarUI.js`)
- Flashcard Editor → Flashcard Interface: uses view (evidence: `src/js/components/scolar/flashcardsEditor.js`)
- Theme Events → Local Data: loads and saves (evidence: `src/js/components/theme/themeEvents.js`)
- Theme Events → Theme Logic: gets next theme (evidence: `src/js/components/theme/themeEvents.js`)
- Theme Events → Theme Interface: applies theme (evidence: `src/js/components/theme/themeEvents.js`)
- Theme Events → Dashboard View: updates chart colors (evidence: `src/js/components/theme/themeEvents.js`)
- Local Data → Browser LocalStorage: reads and writes (evidence: `src/js/services/storage.js`)
