# nathanielgreen/bulletbuddy architecture

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

- Interactive diagram: https://gitdiagram.com/nathanielgreen/bulletbuddy
- Repository: https://github.com/nathanielgreen/bulletbuddy

## Overview

Bullet Buddy is a local-first journal PWA. Users browse the Index, create a Daily, Monthly, or Future Log, and open a page to add and manage entries; Vuex coordinates page state and PouchDB stores it locally. The graph includes the documented calendar and monthly-task views, plus navigation, page metadata, and settings actions. Relationships for sampled modules are supported by excerpts or the SOURCE INDEX; unsampled feature internals are represented only where documented or referenced.

Main entry points: [`src/store/index.js`](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/index.js) (Journal store), [`src/App.vue`](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/App.vue) (Application shell), [`src/views/Page.vue`](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Page.vue) (Open journal page), [`src/components/Navbar.vue`](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/Navbar.vue) (Navigation bar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["Application shell<br/>[App.vue]"]
  node_navigation["Navigation bar<br/>[Navbar.vue]"]
  node_pageinfo["Page metadata<br/>[PageInfo.vue]"]
  node_settingsicon["Settings icon<br/>[IconSettings.vue]"]
end

subgraph group_pages["Journal pages"]
  node_index["Journal index<br/>[Index.vue]"]
  node_addnew["Create page<br/>[AddNew.vue]"]
  node_menu["Settings menu<br/>[Menu.vue]"]
  node_deleteall["Delete all pages"]
  node_pageview["Open journal page<br/>[Page.vue]"]
  node_welcome["Welcome view<br/>[HelloWorld.vue]"]
end

subgraph group_entries["Log entries"]
  node_daily["Daily log<br/>[DailyLog.vue]"]
  node_monthly["Monthly log<br/>[MonthlyLog.vue]"]
  node_calendar["Calendar view"]
  node_monthlylist["Monthly task list<br/>[MonthlyLogList.vue]"]
  node_future["Future log<br/>[FutureLog.vue]"]
  node_input["Entry input<br/>[LogInput.vue]"]
  node_loglist["Entry list<br/>[LogList.vue]"]
  node_monthlyitems["Monthly entry list<br/>[LogListMonthly.vue]"]
end

subgraph group_state["State and storage"]
  node_store["Journal store<br/>[index.js]"]
  node_activepage["Active page state<br/>[activePage.js]"]
  node_dailydata["Daily log state<br/>[dailyLog.js]"]
  node_monthlydata["Monthly log state<br/>[monthlyLog.js]"]
  node_futuredata["Future log state<br/>[futureLog.js]"]
  node_pouch[("Local PouchDB<br/>[pouchdb.js]")]
end

node_user(("Journal user"))

node_user -->|"chooses view"| node_navigation
node_navigation -->|"opens index"| node_index
node_navigation -->|"opens creation"| node_addnew
node_navigation -->|"opens menu"| node_menu
node_navigation -->|"renders"| node_settingsicon
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_pageinfo
node_app -->|"loads pages"| node_store
node_app -->|"routes views"| node_index
node_app -->|"routes views"| node_addnew
node_app -->|"routes views"| node_menu
node_app -->|"routes views"| node_pageview
node_index -->|"reads and deletes"| node_store
node_index -->|"updates metadata"| node_activepage
node_addnew -->|"uses metadata"| node_pageinfo
node_menu -->|"renders action"| node_deleteall
node_deleteall -.->|"deletes pages"| node_store
node_pageview -->|"loads pages"| node_store
node_pageview -->|"sets active page"| node_activepage
node_pageview -->|"renders by type"| node_daily
node_pageview -->|"renders by type"| node_monthly
node_pageview -->|"renders by type"| node_future
node_daily -->|"renders"| node_input
node_daily -->|"renders"| node_loglist
node_future -->|"renders"| node_input
node_future -->|"renders"| node_loglist
node_monthly -->|"renders view"| node_calendar
node_monthly -->|"renders view"| node_monthlylist
node_monthlylist -->|"renders"| node_input
node_monthlylist -->|"renders"| node_monthlyitems
node_calendar -->|"renders"| node_loglist
node_input -.->|"emits entry"| node_activepage
node_activepage -->|"writes updates"| node_pouch
node_store -->|"reads and writes"| node_pouch
node_store -->|"registers module"| node_activepage
node_store -->|"registers module"| node_dailydata
node_store -->|"registers module"| node_monthlydata
node_store -->|"registers module"| node_futuredata
node_user -.->|"views home"| node_welcome

click node_app "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/App.vue"
click node_navigation "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/Navbar.vue"
click node_pageinfo "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/PageInfo.vue"
click node_index "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Index.vue"
click node_addnew "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/AddNew.vue"
click node_menu "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Menu.vue"
click node_deleteall "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/DeleteAllPagesButton.vue"
click node_pageview "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Page.vue"
click node_daily "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/DailyLog.vue"
click node_monthly "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/MonthlyLog.vue"
click node_calendar "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/MonthlyLogCalendar.vue"
click node_monthlylist "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/MonthlyLogList.vue"
click node_future "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/FutureLog.vue"
click node_input "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/LogInput.vue"
click node_loglist "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/LogList.vue"
click node_monthlyitems "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/LogListMonthly.vue"
click node_welcome "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/HelloWorld.vue"
click node_settingsicon "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/icons/IconSettings.vue"
click node_store "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/index.js"
click node_activepage "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/activePage.js"
click node_dailydata "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/dailyLog.js"
click node_monthlydata "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/monthlyLog.js"
click node_futuredata "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/futureLog.js"
click node_pouch "https://github.com/nathanielgreen/bulletbuddy/blob/master/src/assets/js/pouchdb.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_app,node_navigation,node_pageinfo,node_settingsicon,node_user toneBlue
class node_index,node_addnew,node_menu,node_deleteall,node_pageview,node_welcome toneAmber
class node_daily,node_monthly,node_calendar,node_monthlylist,node_future,node_input,node_loglist,node_monthlyitems toneMint
class node_store,node_activepage,node_dailydata,node_monthlydata,node_futuredata,node_pouch toneRose
```

## Components

### App shell

- [Application shell](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/App.vue): `src/App.vue`
- [Navigation bar](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/Navbar.vue): `src/components/Navbar.vue`
- [Page metadata](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/PageInfo.vue): `src/components/PageInfo.vue`
- [Settings icon](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/icons/IconSettings.vue): `src/components/icons/IconSettings.vue`

### Journal pages

- [Journal index](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Index.vue): `src/views/Index.vue`
- [Create page](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/AddNew.vue): `src/views/AddNew.vue`
- [Settings menu](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Menu.vue): `src/views/Menu.vue`
- [Delete all pages](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/DeleteAllPagesButton.vue): `src/components/DeleteAllPagesButton.vue`
- [Open journal page](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/views/Page.vue): `src/views/Page.vue`
- [Welcome view](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/HelloWorld.vue): `src/components/HelloWorld.vue`

### Log entries

- [Daily log](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/DailyLog.vue): `src/components/DailyLog.vue`
- [Monthly log](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/MonthlyLog.vue): `src/components/MonthlyLog.vue`
- [Calendar view](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/MonthlyLogCalendar.vue): `src/components/MonthlyLogCalendar.vue`
- [Monthly task list](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/MonthlyLogList.vue): `src/components/MonthlyLogList.vue`
- [Future log](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/FutureLog.vue): `src/components/FutureLog.vue`
- [Entry input](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/LogInput.vue): `src/components/LogInput.vue`
- [Entry list](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/LogList.vue): `src/components/LogList.vue`
- [Monthly entry list](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/components/LogListMonthly.vue): `src/components/LogListMonthly.vue`

### State and storage

- [Journal store](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/index.js): `src/store/index.js`
- [Active page state](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/activePage.js): `src/store/modules/activePage.js`
- [Daily log state](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/dailyLog.js): `src/store/modules/dailyLog.js`
- [Monthly log state](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/monthlyLog.js): `src/store/modules/monthlyLog.js`
- [Future log state](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/store/modules/futureLog.js): `src/store/modules/futureLog.js`
- [Local PouchDB](https://github.com/nathanielgreen/bulletbuddy/blob/master/src/assets/js/pouchdb.js): `src/assets/js/pouchdb.js`

### Other components

- **Journal user**

## Connections

- Journal user → Navigation bar: chooses view (evidence: `src/components/Navbar.vue`)
- Navigation bar → Journal index: opens index (evidence: `src/components/Navbar.vue`)
- Navigation bar → Create page: opens creation (evidence: `src/components/Navbar.vue`)
- Navigation bar → Settings menu: opens menu (evidence: `src/components/Navbar.vue`)
- Navigation bar → Settings icon: renders (evidence: `src/components/Navbar.vue`)
- Application shell → Navigation bar: renders (evidence: `src/App.vue`)
- Application shell → Page metadata: renders (evidence: `src/App.vue`)
- Application shell → Journal store: loads pages (evidence: `src/App.vue`)
- Application shell → Journal index: routes views
- Application shell → Create page: routes views
- Application shell → Settings menu: routes views
- Application shell → Open journal page: routes views
- Journal index → Journal store: reads and deletes (evidence: `src/views/Index.vue`)
- Journal index → Active page state: updates metadata (evidence: `src/views/Index.vue`)
- Create page → Page metadata: uses metadata (evidence: `src/views/AddNew.vue`)
- Settings menu → Delete all pages: renders action (evidence: `src/views/Menu.vue`)
- Delete all pages → Journal store: deletes pages
- Open journal page → Journal store: loads pages (evidence: `src/views/Page.vue`)
- Open journal page → Active page state: sets active page (evidence: `src/views/Page.vue`)
- Open journal page → Daily log: renders by type (evidence: `src/views/Page.vue`)
- Open journal page → Monthly log: renders by type (evidence: `src/views/Page.vue`)
- Open journal page → Future log: renders by type (evidence: `src/views/Page.vue`)
- Daily log → Entry input: renders (evidence: `src/components/DailyLog.vue`)
- Daily log → Entry list: renders (evidence: `src/components/DailyLog.vue`)
- Future log → Entry input: renders (evidence: `src/components/FutureLog.vue`)
- Future log → Entry list: renders (evidence: `src/components/FutureLog.vue`)
- Monthly log → Calendar view: renders view (evidence: `src/components/MonthlyLog.vue`)
- Monthly log → Monthly task list: renders view (evidence: `src/components/MonthlyLog.vue`)
- Monthly task list → Entry input: renders (evidence: `src/components/MonthlyLogList.vue`)
- Monthly task list → Monthly entry list: renders (evidence: `src/components/MonthlyLogList.vue`)
- Calendar view → Entry list: renders (evidence: `src/components/MonthlyLogCalendar.vue`)
- Entry input → Active page state: emits entry
- Active page state → Local PouchDB: writes updates (evidence: `src/store/modules/activePage.js`)
- Journal store → Local PouchDB: reads and writes (evidence: `src/store/index.js`)
- Journal store → Active page state: registers module (evidence: `src/store/index.js`)
- Journal store → Daily log state: registers module (evidence: `src/store/index.js`)
- Journal store → Monthly log state: registers module (evidence: `src/store/index.js`)
- Journal store → Future log state: registers module (evidence: `src/store/index.js`)
- Journal user → Welcome view: views home
