# atharv0717/npd-portal architecture

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

- Interactive diagram: https://gitdiagram.com/atharv0717/npd-portal
- Repository: https://github.com/atharv0717/npd-portal

## Overview

NPD Portal is a private, per-user workspace for projects, documents, communications and Mahle/customer meetings. Users sign up or sign in through the API, then access their own profile and workspace data; meeting changes can trigger schedule emails, while a scheduled function checks meetings and sends reminders. The README also describes browser-side file viewing, uploads, and pop-up/dashboard notifications, but the public UI source was not sampled, so those capabilities are shown without inferred implementation links. API and reminder relationships are supported by sampled source.

Main entry points: [`public/index.html`](https://github.com/atharv0717/npd-portal/blob/main/public/index.html) (Portal interface), [`netlify/functions/api.mjs`](https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs) (Workspace API), [`netlify/functions/reminders.mjs`](https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/reminders.mjs) (Reminder scheduler), [`netlify/lib/mail.mjs`](https://github.com/atharv0717/npd-portal/blob/main/netlify/lib/mail.mjs) (Email composition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity &amp; Settings"]
  node_auth["Signup &amp; sign-in<br/>[api.mjs]"]
  node_profile["Profile &amp; password<br/>[api.mjs]"]
end

subgraph group_workspace["Private Workspace"]
  node_web["Portal interface<br/>[index.html]"]
  node_api["Workspace API<br/>[api.mjs]"]
  node_projects["Projects<br/>[index.html]"]
  node_documents["Documents &amp; files<br/>[index.html]"]
  node_communication["Communication<br/>[index.html]"]
  node_blobs[("Netlify Blobs")]
end

subgraph group_meeting["Meetings &amp; Reminders"]
  node_meetings["Meeting records<br/>[index.html]"]
  node_alerts["Dashboard alerts<br/>[index.html]"]
  node_reminders["Reminder scheduler<br/>[reminders.mjs]"]
end

subgraph group_messaging["Notifications"]
  node_mail["Email composition<br/>[mail.mjs]"]
  node_smtp["SMTP / Gmail"]
  node_sms["SMS delivery<br/>[mail.mjs]"]
  node_twilio["Twilio"]
end

node_visitor(("Portal user"))

node_visitor -.->|"uses"| node_web
node_web -.->|"signs in"| node_auth
node_web -.->|"requests workspace"| node_api
node_auth -->|"stores users"| node_blobs
node_api -->|"reads and writes"| node_blobs
node_web -.->|"manages"| node_projects
node_web -.->|"views and uploads"| node_documents
node_web -.->|"manages"| node_communication
node_web -.->|"manages"| node_meetings
node_web -.->|"shows"| node_alerts
node_web -.->|"updates settings"| node_profile
node_api -->|"updates profile"| node_profile
node_api -->|"sends meeting email"| node_mail
node_api -->|"sends test SMS"| node_sms
node_reminders -->|"reads users and meetings"| node_blobs
node_reminders -->|"sends reminders"| node_mail
node_reminders -->|"sends reminders"| node_sms
node_mail -->|"delivers email"| node_smtp
node_sms -->|"sends SMS"| node_twilio

click node_web "https://github.com/atharv0717/npd-portal/blob/main/public/index.html"
click node_auth "https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs"
click node_profile "https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs"
click node_api "https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs"
click node_projects "https://github.com/atharv0717/npd-portal/blob/main/public/index.html"
click node_documents "https://github.com/atharv0717/npd-portal/blob/main/public/index.html"
click node_communication "https://github.com/atharv0717/npd-portal/blob/main/public/index.html"
click node_meetings "https://github.com/atharv0717/npd-portal/blob/main/public/index.html"
click node_alerts "https://github.com/atharv0717/npd-portal/blob/main/public/index.html"
click node_reminders "https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/reminders.mjs"
click node_mail "https://github.com/atharv0717/npd-portal/blob/main/netlify/lib/mail.mjs"
click node_sms "https://github.com/atharv0717/npd-portal/blob/main/netlify/lib/mail.mjs"

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_auth,node_profile,node_visitor toneBlue
class node_web,node_api,node_projects,node_documents,node_communication,node_blobs toneAmber
class node_meetings,node_alerts,node_reminders toneMint
class node_mail,node_smtp,node_sms,node_twilio toneRose
```

## Components

### Identity & Settings

- [Signup & sign-in](https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs): `netlify/functions/api.mjs`
- [Profile & password](https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs): `netlify/functions/api.mjs`

### Private Workspace

- [Portal interface](https://github.com/atharv0717/npd-portal/blob/main/public/index.html): `public/index.html`
- [Workspace API](https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/api.mjs): `netlify/functions/api.mjs`
- [Projects](https://github.com/atharv0717/npd-portal/blob/main/public/index.html): `public/index.html`
- [Documents & files](https://github.com/atharv0717/npd-portal/blob/main/public/index.html): `public/index.html`
- [Communication](https://github.com/atharv0717/npd-portal/blob/main/public/index.html): `public/index.html`
- **Netlify Blobs**

### Meetings & Reminders

- [Meeting records](https://github.com/atharv0717/npd-portal/blob/main/public/index.html): `public/index.html`
- [Dashboard alerts](https://github.com/atharv0717/npd-portal/blob/main/public/index.html): `public/index.html`
- [Reminder scheduler](https://github.com/atharv0717/npd-portal/blob/main/netlify/functions/reminders.mjs): `netlify/functions/reminders.mjs`

### Notifications

- [Email composition](https://github.com/atharv0717/npd-portal/blob/main/netlify/lib/mail.mjs): `netlify/lib/mail.mjs`
- **SMTP / Gmail**
- [SMS delivery](https://github.com/atharv0717/npd-portal/blob/main/netlify/lib/mail.mjs): `netlify/lib/mail.mjs`
- **Twilio**

### Other components

- **Portal user**

## Connections

- Portal user → Portal interface: uses (evidence: `README.txt`)
- Portal interface → Signup & sign-in: signs in (evidence: `README.txt`)
- Portal interface → Workspace API: requests workspace (evidence: `README.txt`)
- Signup & sign-in → Netlify Blobs: stores users (evidence: `netlify/functions/api.mjs`)
- Workspace API → Netlify Blobs: reads and writes (evidence: `netlify/functions/api.mjs`)
- Portal interface → Projects: manages (evidence: `README.txt`)
- Portal interface → Documents & files: views and uploads (evidence: `README.txt`)
- Portal interface → Communication: manages (evidence: `README.txt`)
- Portal interface → Meeting records: manages (evidence: `README.txt`)
- Portal interface → Dashboard alerts: shows (evidence: `README.txt`)
- Portal interface → Profile & password: updates settings (evidence: `README.txt`)
- Workspace API → Profile & password: updates profile (evidence: `netlify/functions/api.mjs`)
- Workspace API → Email composition: sends meeting email (evidence: `netlify/functions/api.mjs`)
- Workspace API → SMS delivery: sends test SMS (evidence: `netlify/functions/api.mjs`)
- Reminder scheduler → Netlify Blobs: reads users and meetings (evidence: `netlify/functions/reminders.mjs`)
- Reminder scheduler → Email composition: sends reminders (evidence: `netlify/functions/reminders.mjs`)
- Reminder scheduler → SMS delivery: sends reminders (evidence: `netlify/functions/reminders.mjs`)
- Email composition → SMTP / Gmail: delivers email (evidence: `netlify/lib/mail.mjs`)
- SMS delivery → Twilio: sends SMS (evidence: `netlify/lib/mail.mjs`)
