# nishanth6153/summer-internship-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/nishanth6153/summer-internship-2026
- Repository: https://github.com/nishanth6153/summer-internship-2026

## Overview

HabitFit is a browser-based habit tracker. Its main workflow is user interaction with the app, which updates the habit model, saves state locally, and renders refreshed views. The model also derives check-in, streak, chart, and badge data; the app can export a CSV summary. The README is empty, so capabilities are inferred from the sampled source and data definitions. No external authentication or reminder-delivery service is shown: sign-in is simulated and reminders are managed in-app.

Main entry points: [`js/app.js`](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/app.js) (Event controller), [`js/model.js`](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js) (Habit state model), [`js/views.js`](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/views.js) (View rendering), [`js/storage.js`](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/storage.js) (State persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Browser interface"]
  node_browser["App shell<br/>[index.html]"]
  node_views["View rendering<br/>[views.js]"]
end

subgraph group_control["App and state"]
  node_app["Event controller<br/>[app.js]"]
  node_data["Starter data<br/>[data.js]"]
  node_utils["Shared utilities<br/>[utils.js]"]
  node_model["Habit state model<br/>[model.js]"]
  node_storage["State persistence<br/>[storage.js]"]
end

subgraph group_tracking["Habit tracking"]
  node_profile["Profile and session<br/>[model.js]"]
  node_habits["Habit management<br/>[model.js]"]
  node_checkins["Daily check-ins<br/>[model.js]"]
  node_reminders["Reminder management<br/>[model.js]"]
end

subgraph group_insights["Progress and rewards"]
  node_metrics["Progress metrics<br/>[model.js]"]
  node_charts["Charts and streaks<br/>[views.js]"]
  node_badges["Badges<br/>[model.js]"]
  node_export["CSV summary<br/>[model.js]"]
end

node_user(("User"))
node_localstore[("Browser local storage")]

node_user -->|"uses"| node_browser
node_browser -->|"hosts"| node_app
node_app -->|"loads and saves"| node_storage
node_storage -->|"reads and writes"| node_localstore
node_storage -->|"loads defaults"| node_data
node_storage -->|"builds starter state"| node_utils
node_app -->|"updates state"| node_model
node_app -->|"renders"| node_views
node_app -->|"selects DOM elements"| node_utils
node_views -->|"reads metrics and state"| node_model
node_views -->|"renders module and category data"| node_data
node_views -->|"formats and escapes content"| node_utils
node_model -->|"uses date and ID helpers"| node_utils
node_model -->|"updates"| node_profile
node_model -->|"manages"| node_habits
node_model -->|"records"| node_checkins
node_model -->|"manages"| node_reminders
node_model -->|"computes"| node_metrics
node_model -->|"evaluates"| node_badges
node_model -->|"creates"| node_export
node_views -->|"renders"| node_charts
node_app -->|"requests summary"| node_export
node_app -->|"handles profile actions"| node_profile
node_app -->|"handles habit actions"| node_habits
node_app -->|"handles check-in actions"| node_checkins
node_app -->|"handles reminder actions"| node_reminders

click node_browser "https://github.com/nishanth6153/summer-internship-2026/blob/main/index.html"
click node_app "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/app.js"
click node_views "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/views.js"
click node_data "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/data.js"
click node_utils "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/utils.js"
click node_model "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_storage "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/storage.js"
click node_profile "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_habits "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_checkins "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_reminders "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_metrics "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_charts "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/views.js"
click node_badges "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js"
click node_export "https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.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_browser,node_views,node_user toneBlue
class node_app,node_data,node_utils,node_model,node_storage,node_localstore toneAmber
class node_profile,node_habits,node_checkins,node_reminders toneMint
class node_metrics,node_charts,node_badges,node_export toneRose
```

## Components

### Browser interface

- [App shell](https://github.com/nishanth6153/summer-internship-2026/blob/main/index.html): `index.html`
- [View rendering](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/views.js): `js/views.js`

### App and state

- [Event controller](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/app.js): `js/app.js`
- [Starter data](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/data.js): `js/data.js`
- [Shared utilities](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/utils.js): `js/utils.js`
- [Habit state model](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`
- [State persistence](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/storage.js): `js/storage.js`

### Habit tracking

- [Profile and session](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`
- [Habit management](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`
- [Daily check-ins](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`
- [Reminder management](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`

### Progress and rewards

- [Progress metrics](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`
- [Charts and streaks](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/views.js): `js/views.js`
- [Badges](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`
- [CSV summary](https://github.com/nishanth6153/summer-internship-2026/blob/main/js/model.js): `js/model.js`

### Other components

- **User**
- **Browser local storage**

## Connections

- User → App shell: uses
- App shell → Event controller: hosts
- Event controller → State persistence: loads and saves (evidence: `js/app.js`)
- State persistence → Browser local storage: reads and writes (evidence: `js/storage.js`)
- State persistence → Starter data: loads defaults (evidence: `js/storage.js`)
- State persistence → Shared utilities: builds starter state (evidence: `js/storage.js`)
- Event controller → Habit state model: updates state (evidence: `js/app.js`)
- Event controller → View rendering: renders (evidence: `js/app.js`)
- Event controller → Shared utilities: selects DOM elements (evidence: `js/app.js`)
- View rendering → Habit state model: reads metrics and state (evidence: `js/views.js`)
- View rendering → Starter data: renders module and category data (evidence: `js/views.js`)
- View rendering → Shared utilities: formats and escapes content (evidence: `js/views.js`)
- Habit state model → Shared utilities: uses date and ID helpers (evidence: `js/model.js`)
- Habit state model → Profile and session: updates (evidence: `js/model.js`)
- Habit state model → Habit management: manages (evidence: `js/model.js`)
- Habit state model → Daily check-ins: records (evidence: `js/model.js`)
- Habit state model → Reminder management: manages (evidence: `js/model.js`)
- Habit state model → Progress metrics: computes (evidence: `js/model.js`)
- Habit state model → Badges: evaluates (evidence: `js/model.js`)
- Habit state model → CSV summary: creates (evidence: `js/model.js`)
- View rendering → Charts and streaks: renders (evidence: `js/views.js`)
- Event controller → CSV summary: requests summary (evidence: `js/app.js`)
- Event controller → Profile and session: handles profile actions (evidence: `js/app.js`)
- Event controller → Habit management: handles habit actions (evidence: `js/app.js`)
- Event controller → Daily check-ins: handles check-in actions (evidence: `js/app.js`)
- Event controller → Reminder management: handles reminder actions (evidence: `js/app.js`)
