# cxzucchini/pawfolio architecture

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

- Interactive diagram: https://gitdiagram.com/cxzucchini/pawfolio
- Repository: https://github.com/cxzucchini/pawfolio

## Overview

Pawfolio is a dog-care record and reminder application. Users register or log in, then manage dog profiles and per-dog vaccinations, appointments, medical history, and emergency details; dashboard summaries, notifications, and in-app alerts help them act on upcoming or overdue care. The React client calls an Express API, which validates and persists account and care data through MongoDB and can send recovery or contact email. Several server and UI modules are only represented by the README or source index, so those links reflect documented capabilities rather than inspected implementation details.

Main entry points: [`src/Dashboard.jsx`](https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx) (Dashboard), [`src/api.js`](https://github.com/cxzucchini/pawfolio/blob/main/src/api.js) (API client), [`src/RootApp.jsx`](https://github.com/cxzucchini/pawfolio/blob/main/src/RootApp.jsx) (App and auth), [`server/app.js`](https://github.com/cxzucchini/pawfolio/blob/main/server/app.js) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_landing["Public landing<br/>[Landing.jsx]"]
  node_root["App and auth<br/>[RootApp.jsx]"]
  node_account["Recovery and policies<br/>[AccountPages.jsx]"]
  node_routes["Dashboard routes<br/>[dashboardRoutes.js]"]
end

subgraph group_care["Care workflows"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_dogprofiles["Dog profiles<br/>[Dashboard.jsx]"]
  node_vaccinations["Vaccinations<br/>[Dashboard.jsx]"]
  node_schedules["Care schedules<br/>[ScheduleBoard.jsx]"]
  node_medical["Medical history<br/>[CarePages.jsx]"]
  node_emergency["Emergency vault<br/>[CarePages.jsx]"]
  node_contact["Contact forms<br/>[ContactPage.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
  node_reminderalerts["Reminder popups<br/>[ReminderAlerts.jsx]"]
  node_live["Live refresh<br/>[useLiveRefresh.js]"]
end

subgraph group_server["API and services"]
  node_browserapi["API client<br/>[api.js]"]
  node_api["Express API<br/>[app.js]"]
  node_mail["Email service<br/>[mail.js]"]
  node_photos["Photo handling<br/>[photos.js]"]
end

subgraph group_shared["Shared logic"]
  node_timing["Reminder timing<br/>[reminderTiming.js]"]
  node_notifyitems["Notification items"]
end

subgraph group_persistence["Persistence"]
  node_models["Data models<br/>[models.js]"]
  node_mongodb[("MongoDB")]
end

node_visitor(("Visitor or user"))
node_smtp["SMTP provider"]

node_visitor -->|"opens"| node_landing
node_landing -->|"enters app"| node_root
node_root -->|"renders recovery"| node_account
node_root -->|"requests session"| node_browserapi
node_root -->|"renders dashboard"| node_dashboard
node_root -->|"resolves views"| node_routes
node_root -->|"renders contact"| node_contact
node_account -->|"submits recovery"| node_browserapi
node_dashboard -->|"loads and saves"| node_browserapi
node_dashboard -->|"manages dogs"| node_dogprofiles
node_dashboard -->|"manages doses"| node_vaccinations
node_dashboard -->|"shows schedules"| node_schedules
node_dashboard -->|"opens history"| node_medical
node_dashboard -->|"opens vault"| node_emergency
node_dashboard -->|"shows care notices"| node_notifications
node_dashboard -->|"refreshes records"| node_live
node_medical -->|"reads and saves"| node_browserapi
node_emergency -->|"reads and saves"| node_browserapi
node_contact -->|"sends message"| node_browserapi
node_notifications -->|"builds notices"| node_notifyitems
node_notifications -->|"shows popups"| node_reminderalerts
node_notifyitems -->|"uses care data"| node_browserapi
node_notifyitems -->|"calculates due times"| node_timing
node_browserapi -->|"sends HTTP requests"| node_api
node_api -->|"queries records"| node_models
node_models -->|"persists records"| node_mongodb
node_api -->|"sends recovery mail"| node_mail
node_mail -.->|"delivers email"| node_smtp
node_api -->|"validates photo input"| node_photos
node_api -->|"applies reminder timing"| node_timing

click node_landing "https://github.com/cxzucchini/pawfolio/blob/main/src/Landing.jsx"
click node_root "https://github.com/cxzucchini/pawfolio/blob/main/src/RootApp.jsx"
click node_account "https://github.com/cxzucchini/pawfolio/blob/main/src/AccountPages.jsx"
click node_dashboard "https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx"
click node_dogprofiles "https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx"
click node_vaccinations "https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx"
click node_schedules "https://github.com/cxzucchini/pawfolio/blob/main/src/ScheduleBoard.jsx"
click node_medical "https://github.com/cxzucchini/pawfolio/blob/main/src/CarePages.jsx"
click node_emergency "https://github.com/cxzucchini/pawfolio/blob/main/src/CarePages.jsx"
click node_contact "https://github.com/cxzucchini/pawfolio/blob/main/src/ContactPage.jsx"
click node_notifications "https://github.com/cxzucchini/pawfolio/blob/main/src/Notifications.jsx"
click node_reminderalerts "https://github.com/cxzucchini/pawfolio/blob/main/src/ReminderAlerts.jsx"
click node_live "https://github.com/cxzucchini/pawfolio/blob/main/src/useLiveRefresh.js"
click node_browserapi "https://github.com/cxzucchini/pawfolio/blob/main/src/api.js"
click node_api "https://github.com/cxzucchini/pawfolio/blob/main/server/app.js"
click node_models "https://github.com/cxzucchini/pawfolio/blob/main/server/models.js"
click node_mail "https://github.com/cxzucchini/pawfolio/blob/main/server/mail.js"
click node_photos "https://github.com/cxzucchini/pawfolio/blob/main/server/photos.js"
click node_timing "https://github.com/cxzucchini/pawfolio/blob/main/shared/reminderTiming.js"
click node_notifyitems "https://github.com/cxzucchini/pawfolio/blob/main/src/notificationItems.js"
click node_routes "https://github.com/cxzucchini/pawfolio/blob/main/src/dashboardRoutes.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_landing,node_root,node_account,node_routes,node_visitor toneBlue
class node_dashboard,node_dogprofiles,node_vaccinations,node_schedules,node_medical,node_emergency,node_contact,node_notifications,node_reminderalerts,node_live toneAmber
class node_browserapi,node_api,node_mail,node_photos toneMint
class node_timing,node_notifyitems toneRose
class node_models,node_mongodb,node_smtp toneIndigo
```

## Components

### Web client

- [Public landing](https://github.com/cxzucchini/pawfolio/blob/main/src/Landing.jsx): `src/Landing.jsx`
- [App and auth](https://github.com/cxzucchini/pawfolio/blob/main/src/RootApp.jsx): `src/RootApp.jsx`
- [Recovery and policies](https://github.com/cxzucchini/pawfolio/blob/main/src/AccountPages.jsx): `src/AccountPages.jsx`
- [Dashboard routes](https://github.com/cxzucchini/pawfolio/blob/main/src/dashboardRoutes.js): `src/dashboardRoutes.js`

### Care workflows

- [Dashboard](https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx): `src/Dashboard.jsx`
- [Dog profiles](https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx): `src/Dashboard.jsx`
- [Vaccinations](https://github.com/cxzucchini/pawfolio/blob/main/src/Dashboard.jsx): `src/Dashboard.jsx`
- [Care schedules](https://github.com/cxzucchini/pawfolio/blob/main/src/ScheduleBoard.jsx): `src/ScheduleBoard.jsx`
- [Medical history](https://github.com/cxzucchini/pawfolio/blob/main/src/CarePages.jsx): `src/CarePages.jsx`
- [Emergency vault](https://github.com/cxzucchini/pawfolio/blob/main/src/CarePages.jsx): `src/CarePages.jsx`
- [Contact forms](https://github.com/cxzucchini/pawfolio/blob/main/src/ContactPage.jsx): `src/ContactPage.jsx`
- [Notifications](https://github.com/cxzucchini/pawfolio/blob/main/src/Notifications.jsx): `src/Notifications.jsx`
- [Reminder popups](https://github.com/cxzucchini/pawfolio/blob/main/src/ReminderAlerts.jsx): `src/ReminderAlerts.jsx`
- [Live refresh](https://github.com/cxzucchini/pawfolio/blob/main/src/useLiveRefresh.js): `src/useLiveRefresh.js`

### API and services

- [API client](https://github.com/cxzucchini/pawfolio/blob/main/src/api.js): `src/api.js`
- [Express API](https://github.com/cxzucchini/pawfolio/blob/main/server/app.js): `server/app.js`
- [Email service](https://github.com/cxzucchini/pawfolio/blob/main/server/mail.js): `server/mail.js`
- [Photo handling](https://github.com/cxzucchini/pawfolio/blob/main/server/photos.js): `server/photos.js`

### Shared logic

- [Reminder timing](https://github.com/cxzucchini/pawfolio/blob/main/shared/reminderTiming.js): `shared/reminderTiming.js`
- [Notification items](https://github.com/cxzucchini/pawfolio/blob/main/src/notificationItems.js): `src/notificationItems.js`

### Persistence

- [Data models](https://github.com/cxzucchini/pawfolio/blob/main/server/models.js): `server/models.js`
- **MongoDB**

### Other components

- **Visitor or user**
- **SMTP provider**

## Connections

- Visitor or user → Public landing: opens (evidence: `README.md`)
- Public landing → App and auth: enters app (evidence: `src/Landing.jsx`)
- App and auth → Recovery and policies: renders recovery (evidence: `src/RootApp.jsx`)
- App and auth → API client: requests session (evidence: `src/RootApp.jsx`)
- App and auth → Dashboard: renders dashboard (evidence: `src/RootApp.jsx`)
- App and auth → Dashboard routes: resolves views (evidence: `src/RootApp.jsx`)
- App and auth → Contact forms: renders contact (evidence: `src/RootApp.jsx`)
- Recovery and policies → API client: submits recovery (evidence: `src/AccountPages.jsx`)
- Dashboard → API client: loads and saves (evidence: `src/Dashboard.jsx`)
- Dashboard → Dog profiles: manages dogs (evidence: `README.md`)
- Dashboard → Vaccinations: manages doses (evidence: `README.md`)
- Dashboard → Care schedules: shows schedules (evidence: `src/Dashboard.jsx`)
- Dashboard → Medical history: opens history (evidence: `README.md`)
- Dashboard → Emergency vault: opens vault (evidence: `README.md`)
- Dashboard → Notifications: shows care notices (evidence: `src/Dashboard.jsx`)
- Dashboard → Live refresh: refreshes records (evidence: `src/Dashboard.jsx`)
- Medical history → API client: reads and saves (evidence: `src/CarePages.jsx`)
- Emergency vault → API client: reads and saves (evidence: `src/CarePages.jsx`)
- Contact forms → API client: sends message (evidence: `src/ContactPage.jsx`)
- Notifications → Notification items: builds notices (evidence: `src/Notifications.jsx`)
- Notifications → Reminder popups: shows popups (evidence: `src/Notifications.jsx`)
- Notification items → API client: uses care data (evidence: `src/notificationItems.js`)
- Notification items → Reminder timing: calculates due times (evidence: `src/notificationItems.js`)
- API client → Express API: sends HTTP requests (evidence: `README.md`)
- Express API → Data models: queries records (evidence: `server/app.js`)
- Data models → MongoDB: persists records (evidence: `README.md`)
- Express API → Email service: sends recovery mail (evidence: `server/app.js`)
- Email service → SMTP provider: delivers email (evidence: `README.md`)
- Express API → Photo handling: validates photo input (evidence: `server/app.js`)
- Express API → Reminder timing: applies reminder timing (evidence: `server/app.js`)
