# shaulaa/trackify-daily-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/shaulaa/trackify-daily-tracker
- Repository: https://github.com/shaulaa/trackify-daily-tracker

## Overview

Trackify is a static personal productivity dashboard. Users enter through the web app, manage personal trackers and reflections, and review progress on the dashboard; data stays in browser storage when signed out and can sync through Firebase when signed in. The README documents the broader tracker set, backup/restore, and local reminders. Source excerpts confirm the main state/sync responsibilities and notification storage/sending; unsampled page wiring is not inferred.

Main entry points: [`js/script.js`](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js) (App state and actions), [`index.html`](https://github.com/shaulaa/trackify-daily-tracker/blob/main/index.html) (Web app), [`js/notifications.js`](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/notifications.js) (Reminder settings), [`api/send-notifications.js`](https://github.com/shaulaa/trackify-daily-tracker/blob/main/api/send-notifications.js) (Scheduled push endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Dashboard and trackers"]
  node_page["Web app<br/>[index.html]"]
  node_appstate["App state and actions<br/>[script.js]"]
  node_dashboard["Progress dashboard<br/>[script.js]"]
  node_goals["Target tracker<br/>[script.js]"]
  node_habits["Habit tracker<br/>[script.js]"]
  node_todos["To-do tracker<br/>[script.js]"]
  node_journals["Journal and reflection<br/>[script.js]"]
  node_learning["Learning tracker<br/>[script.js]"]
  node_emotion["Emotion tracker<br/>[script.js]"]
  node_social["Social notes<br/>[script.js]"]
  node_cycle["Cycle tracker<br/>[script.js]"]
  node_backup["Backup and restore<br/>[script.js]"]
end

subgraph group_data["Identity and storage"]
  node_browserdata[("Browser data")]
  node_firebase["Auth and sync<br/>[firebase.js]"]
end

subgraph group_notify["Notifications and PWA"]
  node_notif["Reminder settings<br/>[notifications.js]"]
  node_browsernotif["Browser notifications"]
  node_pwa["Install prompt<br/>[pwa.js]"]
  node_sw["Offline service worker<br/>[sw.js]"]
  node_fcm["Push messaging worker"]
  node_fcmclient["Push client<br/>[fcm.js]"]
end

subgraph group_services["External services"]
  node_firestore[("Firestore")]
  node_scheduler(("Notification scheduler"))
  node_pushapi["Scheduled push endpoint"]
  node_feedbackapi["Feedback endpoint<br/>[send-feedback.js]"]
  node_telegram["Telegram"]
end

node_user(("User"))

node_user -->|"opens"| node_page
node_page -->|"loads"| node_appstate
node_appstate -->|"renders"| node_dashboard
node_appstate -->|"manages"| node_goals
node_appstate -->|"manages"| node_habits
node_appstate -->|"manages"| node_todos
node_appstate -->|"manages"| node_journals
node_appstate -->|"manages"| node_learning
node_appstate -->|"manages"| node_emotion
node_appstate -->|"manages"| node_social
node_appstate -->|"manages"| node_cycle
node_appstate -->|"exports/restores"| node_backup
node_appstate -->|"stores state"| node_browserdata
node_appstate -->|"syncs with"| node_firebase
node_firebase -->|"reads/writes"| node_firestore
node_appstate -->|"configures"| node_notif
node_notif -->|"stores preferences"| node_firestore
node_notif -->|"shows reminders"| node_browsernotif
node_appstate -.->|"initializes"| node_pwa
node_page -.->|"uses offline cache"| node_sw
node_fcmclient -.->|"stores tokens"| node_firestore
node_scheduler -->|"invokes"| node_pushapi
node_pushapi -->|"reads preferences/tokens"| node_firestore
node_pushapi -->|"sends push"| node_fcm
node_user -.->|"submits feedback"| node_feedbackapi
node_feedbackapi -->|"forwards message"| node_telegram

click node_page "https://github.com/shaulaa/trackify-daily-tracker/blob/main/index.html"
click node_appstate "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_dashboard "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_goals "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_habits "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_todos "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_journals "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_learning "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_emotion "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_social "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_cycle "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_backup "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js"
click node_firebase "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/firebase.js"
click node_notif "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/notifications.js"
click node_pwa "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/pwa.js"
click node_sw "https://github.com/shaulaa/trackify-daily-tracker/blob/main/sw.js"
click node_fcm "https://github.com/shaulaa/trackify-daily-tracker/blob/main/firebase-messaging-sw.js"
click node_fcmclient "https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/fcm.js"
click node_pushapi "https://github.com/shaulaa/trackify-daily-tracker/blob/main/api/send-notifications.js"
click node_feedbackapi "https://github.com/shaulaa/trackify-daily-tracker/blob/main/api/send-feedback.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_page,node_appstate,node_dashboard,node_goals,node_habits,node_todos,node_journals,node_learning,node_emotion,node_social,node_cycle,node_backup,node_user toneBlue
class node_browserdata,node_firebase toneAmber
class node_notif,node_browsernotif,node_pwa,node_sw,node_fcm,node_fcmclient toneMint
class node_firestore,node_scheduler,node_pushapi,node_feedbackapi,node_telegram toneRose
```

## Components

### Dashboard and trackers

- [Web app](https://github.com/shaulaa/trackify-daily-tracker/blob/main/index.html): `index.html`
- [App state and actions](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Progress dashboard](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Target tracker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Habit tracker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [To-do tracker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Journal and reflection](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Learning tracker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Emotion tracker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Social notes](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Cycle tracker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`
- [Backup and restore](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/script.js): `js/script.js`

### Identity and storage

- **Browser data**
- [Auth and sync](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/firebase.js): `js/firebase.js`

### Notifications and PWA

- [Reminder settings](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/notifications.js): `js/notifications.js`
- **Browser notifications**
- [Install prompt](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/pwa.js): `js/pwa.js`
- [Offline service worker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/sw.js): `sw.js`
- [Push messaging worker](https://github.com/shaulaa/trackify-daily-tracker/blob/main/firebase-messaging-sw.js): `firebase-messaging-sw.js`
- [Push client](https://github.com/shaulaa/trackify-daily-tracker/blob/main/js/fcm.js): `js/fcm.js`

### External services

- **Firestore**
- **Notification scheduler**
- [Scheduled push endpoint](https://github.com/shaulaa/trackify-daily-tracker/blob/main/api/send-notifications.js): `api/send-notifications.js`
- [Feedback endpoint](https://github.com/shaulaa/trackify-daily-tracker/blob/main/api/send-feedback.js): `api/send-feedback.js`
- **Telegram**

### Other components

- **User**

## Connections

- User → Web app: opens
- Web app → App state and actions: loads
- App state and actions → Progress dashboard: renders
- App state and actions → Target tracker: manages
- App state and actions → Habit tracker: manages
- App state and actions → To-do tracker: manages
- App state and actions → Journal and reflection: manages
- App state and actions → Learning tracker: manages
- App state and actions → Emotion tracker: manages
- App state and actions → Social notes: manages
- App state and actions → Cycle tracker: manages
- App state and actions → Backup and restore: exports/restores
- App state and actions → Browser data: stores state
- App state and actions → Auth and sync: syncs with
- Auth and sync → Firestore: reads/writes
- App state and actions → Reminder settings: configures
- Reminder settings → Firestore: stores preferences
- Reminder settings → Browser notifications: shows reminders
- App state and actions → Install prompt: initializes
- Web app → Offline service worker: uses offline cache
- Push client → Firestore: stores tokens
- Notification scheduler → Scheduled push endpoint: invokes
- Scheduled push endpoint → Firestore: reads preferences/tokens
- Scheduled push endpoint → Push messaging worker: sends push
- User → Feedback endpoint: submits feedback
- Feedback endpoint → Telegram: forwards message
