# chherika/finalproject-petpulse architecture

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

- Interactive diagram: https://gitdiagram.com/chherika/finalproject-petpulse
- Repository: https://github.com/chherika/finalproject-petpulse

## Overview

PetPulse is a pet-care platform composed of separate HTTP services for account registration and login, pet profiles, appointments, prescriptions, and billing. The visible service routes support a user workflow from account creation through managing pets and care records to invoice payment. Each sampled service connects to MongoDB; the source excerpts do not establish how the frontend or API gateway routes requests, nor do they show cross-service calls, so those relationships are omitted.

Main entry points: [`Registration/index.js`](https://github.com/chherika/finalproject-petpulse/blob/main/Registration/index.js) (Registration), [`Login/index.js`](https://github.com/chherika/finalproject-petpulse/blob/main/Login/index.js) (Login), [`Pet_Profile/index.js`](https://github.com/chherika/finalproject-petpulse/blob/main/Pet_Profile/index.js) (Pet profiles), [`Appointment/index.js`](https://github.com/chherika/finalproject-petpulse/blob/main/Appointment/index.js) (Appointments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_frontend["Web frontend<br/>[index.html]"]
  node_gateway["API gateway<br/>[api-gateway.js]"]
  node_registration["Registration<br/>[index.js]"]
  node_login["Login<br/>[index.js]"]
end

subgraph group_care["Pet care"]
  node_pets["Pet profiles<br/>[index.js]"]
  node_appointments["Appointments<br/>[index.js]"]
  node_prescriptions["Prescriptions<br/>[index.js]"]
end

subgraph group_finance["Billing"]
  node_billing["Invoices and payment<br/>[index.js]"]
end

subgraph group_data["Persistence"]
  node_registration_db["Registration DB connector<br/>[db-connect.js]"]
  node_login_db["Login DB connector<br/>[db-connect.js]"]
  node_pets_db["Pet DB connector<br/>[db-connect.js]"]
  node_appointments_db["Appointment DB connector<br/>[db-connect.js]"]
  node_prescriptions_db["Prescription DB connector<br/>[db-connect.js]"]
  node_billing_db["Billing DB connector<br/>[db-connect.js]"]
  node_mongo[("MongoDB")]
end

node_user(("Platform user"))

node_user -->|"registers"| node_registration
node_user -.->|"authenticates"| node_login
node_user -->|"manages pets"| node_pets
node_user -->|"books visits"| node_appointments
node_user -->|"views care"| node_prescriptions
node_user -->|"pays invoices"| node_billing
node_registration -->|"connects"| node_registration_db
node_login -->|"connects"| node_login_db
node_pets -->|"connects"| node_pets_db
node_appointments -->|"connects"| node_appointments_db
node_prescriptions -->|"connects"| node_prescriptions_db
node_billing -->|"connects"| node_billing_db
node_registration_db -->|"connects"| node_mongo
node_login_db -->|"connects"| node_mongo
node_pets_db -->|"connects"| node_mongo
node_appointments_db -->|"connects"| node_mongo
node_prescriptions_db -->|"connects"| node_mongo
node_billing_db -->|"connects"| node_mongo

click node_frontend "https://github.com/chherika/finalproject-petpulse/blob/main/Frontend/index.html"
click node_gateway "https://github.com/chherika/finalproject-petpulse/blob/main/API-Gateway/api-gateway.js"
click node_registration "https://github.com/chherika/finalproject-petpulse/blob/main/Registration/index.js"
click node_login "https://github.com/chherika/finalproject-petpulse/blob/main/Login/index.js"
click node_registration_db "https://github.com/chherika/finalproject-petpulse/blob/main/Registration/db-connect.js"
click node_login_db "https://github.com/chherika/finalproject-petpulse/blob/main/Login/db-connect.js"
click node_pets "https://github.com/chherika/finalproject-petpulse/blob/main/Pet_Profile/index.js"
click node_pets_db "https://github.com/chherika/finalproject-petpulse/blob/main/Pet_Profile/db-connect.js"
click node_appointments "https://github.com/chherika/finalproject-petpulse/blob/main/Appointment/index.js"
click node_appointments_db "https://github.com/chherika/finalproject-petpulse/blob/main/Appointment/db-connect.js"
click node_prescriptions "https://github.com/chherika/finalproject-petpulse/blob/main/Prescription/index.js"
click node_prescriptions_db "https://github.com/chherika/finalproject-petpulse/blob/main/Prescription/db-connect.js"
click node_billing "https://github.com/chherika/finalproject-petpulse/blob/main/Billing/index.js"
click node_billing_db "https://github.com/chherika/finalproject-petpulse/blob/main/Billing/db-connect.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_frontend,node_gateway,node_registration,node_login,node_user toneBlue
class node_pets,node_appointments,node_prescriptions toneAmber
class node_billing toneMint
class node_registration_db,node_login_db,node_pets_db,node_appointments_db,node_prescriptions_db,node_billing_db,node_mongo toneRose
```

## Components

### Access

- [Web frontend](https://github.com/chherika/finalproject-petpulse/blob/main/Frontend/index.html): `Frontend/index.html`
- [API gateway](https://github.com/chherika/finalproject-petpulse/blob/main/API-Gateway/api-gateway.js): `API-Gateway/api-gateway.js`
- [Registration](https://github.com/chherika/finalproject-petpulse/blob/main/Registration/index.js): `Registration/index.js`
- [Login](https://github.com/chherika/finalproject-petpulse/blob/main/Login/index.js): `Login/index.js`

### Pet care

- [Pet profiles](https://github.com/chherika/finalproject-petpulse/blob/main/Pet_Profile/index.js): `Pet_Profile/index.js`
- [Appointments](https://github.com/chherika/finalproject-petpulse/blob/main/Appointment/index.js): `Appointment/index.js`
- [Prescriptions](https://github.com/chherika/finalproject-petpulse/blob/main/Prescription/index.js): `Prescription/index.js`

### Billing

- [Invoices and payment](https://github.com/chherika/finalproject-petpulse/blob/main/Billing/index.js): `Billing/index.js`

### Persistence

- [Registration DB connector](https://github.com/chherika/finalproject-petpulse/blob/main/Registration/db-connect.js): `Registration/db-connect.js`
- [Login DB connector](https://github.com/chherika/finalproject-petpulse/blob/main/Login/db-connect.js): `Login/db-connect.js`
- [Pet DB connector](https://github.com/chherika/finalproject-petpulse/blob/main/Pet_Profile/db-connect.js): `Pet_Profile/db-connect.js`
- [Appointment DB connector](https://github.com/chherika/finalproject-petpulse/blob/main/Appointment/db-connect.js): `Appointment/db-connect.js`
- [Prescription DB connector](https://github.com/chherika/finalproject-petpulse/blob/main/Prescription/db-connect.js): `Prescription/db-connect.js`
- [Billing DB connector](https://github.com/chherika/finalproject-petpulse/blob/main/Billing/db-connect.js): `Billing/db-connect.js`
- **MongoDB**

### Other components

- **Platform user**

## Connections

- Platform user → Registration: registers (evidence: `Registration/index.js`)
- Platform user → Login: authenticates
- Platform user → Pet profiles: manages pets (evidence: `Pet_Profile/index.js`)
- Platform user → Appointments: books visits (evidence: `Appointment/index.js`)
- Platform user → Prescriptions: views care (evidence: `Prescription/index.js`)
- Platform user → Invoices and payment: pays invoices (evidence: `Billing/index.js`)
- Registration → Registration DB connector: connects (evidence: `Registration/index.js`)
- Login → Login DB connector: connects (evidence: `Login/index.js`)
- Pet profiles → Pet DB connector: connects (evidence: `Pet_Profile/index.js`)
- Appointments → Appointment DB connector: connects (evidence: `Appointment/index.js`)
- Prescriptions → Prescription DB connector: connects (evidence: `Prescription/index.js`)
- Invoices and payment → Billing DB connector: connects (evidence: `Billing/index.js`)
- Registration DB connector → MongoDB: connects (evidence: `Registration/db-connect.js`)
- Login DB connector → MongoDB: connects (evidence: `Login/db-connect.js`)
- Pet DB connector → MongoDB: connects (evidence: `Pet_Profile/db-connect.js`)
- Appointment DB connector → MongoDB: connects (evidence: `Appointment/db-connect.js`)
- Prescription DB connector → MongoDB: connects (evidence: `Prescription/db-connect.js`)
- Billing DB connector → MongoDB: connects (evidence: `Billing/db-connect.js`)
