# romancitodev/bluecode architecture

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

- Interactive diagram: https://gitdiagram.com/romancitodev/bluecode
- Repository: https://github.com/romancitodev/bluecode

## Overview

Bluecode is a healthcare administration dashboard organized around patient listings, with additional areas, personnel, reports, and authentication screens. Users navigate dashboard sections through a shared sidebar; the patient page composes filtering and patient-card UI. Authentication is handled by a NextAuth API route that verifies credentials through Prisma. The README provides no product-specific workflow documentation, and several screens’ implementations were not sampled, so their behavior and data connections are not inferred.

Main entry points: [`src/app/(dashboard)/patients/page.tsx`](https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/patients/page.tsx) (Patient listing), [`src/components/sidebar.tsx`](https://github.com/romancitodev/bluecode/blob/main/src/components/sidebar.tsx) (Section navigation), [`src/app/api/auth/[...nextauth]/route.ts`](https://github.com/romancitodev/bluecode/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts) (Auth endpoint), [`src/components/cards.tsx`](https://github.com/romancitodev/bluecode/blob/main/src/components/cards.tsx) (Patient cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_login["Login screen<br/>[page.tsx]"]
  node_admin["Admin screen<br/>[page.tsx]"]
  node_auth_api["Auth endpoint<br/>[route.ts]"]
  node_auth_provider["Session provider<br/>[AuthProvider.tsx]"]
  node_prisma["Prisma client<br/>[singleton.ts]"]
  node_db[("Application database<br/>[schema.prisma]")]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard_layout["Dashboard layout<br/>[layout.tsx]"]
  node_patients["Patient listing<br/>[page.tsx]"]
  node_areas["Areas screen<br/>[page.tsx]"]
  node_personnel["Personnel screen<br/>[page.tsx]"]
  node_reports["Reports screen<br/>[page.tsx]"]
end

subgraph group_ui["Shared UI"]
  node_sidebar["Section navigation<br/>[sidebar.tsx]"]
  node_add["Add control<br/>[add.tsx]"]
  node_filter["Patient filters<br/>[filter.tsx]"]
  node_title["Page title<br/>[title.tsx]"]
  node_cards["Patient cards<br/>[cards.tsx]"]
  node_patient_card["Patient card<br/>[flat-card.tsx]"]
end

node_user(("Dashboard user"))

node_user -.->|"opens"| node_login
node_auth_api -->|"uses"| node_prisma
node_auth_api -->|"verifies login"| node_db
node_dashboard_layout -->|"renders"| node_sidebar
node_sidebar -->|"links to"| node_patients
node_sidebar -->|"links to"| node_areas
node_sidebar -->|"links to"| node_personnel
node_sidebar -->|"links to"| node_reports
node_patients -->|"renders"| node_add
node_patients -->|"renders"| node_filter
node_patients -->|"renders"| node_title
node_patients -->|"renders"| node_cards
node_cards -->|"renders"| node_patient_card

click node_login "https://github.com/romancitodev/bluecode/blob/main/src/app/(auth)/login/page.tsx"
click node_admin "https://github.com/romancitodev/bluecode/blob/main/src/app/(auth)/admin/page.tsx"
click node_auth_api "https://github.com/romancitodev/bluecode/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_auth_provider "https://github.com/romancitodev/bluecode/blob/main/src/context/AuthProvider.tsx"
click node_prisma "https://github.com/romancitodev/bluecode/blob/main/prisma/singleton.ts"
click node_db "https://github.com/romancitodev/bluecode/blob/main/prisma/schema.prisma"
click node_dashboard_layout "https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/layout.tsx"
click node_sidebar "https://github.com/romancitodev/bluecode/blob/main/src/components/sidebar.tsx"
click node_patients "https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/patients/page.tsx"
click node_areas "https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/areas/page.tsx"
click node_personnel "https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/personal/page.tsx"
click node_reports "https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/reports/page.tsx"
click node_add "https://github.com/romancitodev/bluecode/blob/main/src/components/add.tsx"
click node_filter "https://github.com/romancitodev/bluecode/blob/main/src/components/filter.tsx"
click node_title "https://github.com/romancitodev/bluecode/blob/main/src/components/title.tsx"
click node_cards "https://github.com/romancitodev/bluecode/blob/main/src/components/cards.tsx"
click node_patient_card "https://github.com/romancitodev/bluecode/blob/main/src/components/flat-card.tsx"

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_login,node_admin,node_auth_api,node_auth_provider,node_prisma,node_db,node_user toneBlue
class node_dashboard_layout,node_patients,node_areas,node_personnel,node_reports toneAmber
class node_sidebar,node_add,node_filter,node_title,node_cards,node_patient_card toneMint
```

## Components

### Authentication

- [Login screen](https://github.com/romancitodev/bluecode/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [Admin screen](https://github.com/romancitodev/bluecode/blob/main/src/app/(auth)/admin/page.tsx): `src/app/(auth)/admin/page.tsx`
- [Auth endpoint](https://github.com/romancitodev/bluecode/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts): `src/app/api/auth/[...nextauth]/route.ts`
- [Session provider](https://github.com/romancitodev/bluecode/blob/main/src/context/AuthProvider.tsx): `src/context/AuthProvider.tsx`
- [Prisma client](https://github.com/romancitodev/bluecode/blob/main/prisma/singleton.ts): `prisma/singleton.ts`
- [Application database](https://github.com/romancitodev/bluecode/blob/main/prisma/schema.prisma): `prisma/schema.prisma`

### Dashboard

- [Dashboard layout](https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/layout.tsx): `src/app/(dashboard)/layout.tsx`
- [Patient listing](https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/patients/page.tsx): `src/app/(dashboard)/patients/page.tsx`
- [Areas screen](https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/areas/page.tsx): `src/app/(dashboard)/areas/page.tsx`
- [Personnel screen](https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/personal/page.tsx): `src/app/(dashboard)/personal/page.tsx`
- [Reports screen](https://github.com/romancitodev/bluecode/blob/main/src/app/(dashboard)/reports/page.tsx): `src/app/(dashboard)/reports/page.tsx`

### Shared UI

- [Section navigation](https://github.com/romancitodev/bluecode/blob/main/src/components/sidebar.tsx): `src/components/sidebar.tsx`
- [Add control](https://github.com/romancitodev/bluecode/blob/main/src/components/add.tsx): `src/components/add.tsx`
- [Patient filters](https://github.com/romancitodev/bluecode/blob/main/src/components/filter.tsx): `src/components/filter.tsx`
- [Page title](https://github.com/romancitodev/bluecode/blob/main/src/components/title.tsx): `src/components/title.tsx`
- [Patient cards](https://github.com/romancitodev/bluecode/blob/main/src/components/cards.tsx): `src/components/cards.tsx`
- [Patient card](https://github.com/romancitodev/bluecode/blob/main/src/components/flat-card.tsx): `src/components/flat-card.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Login screen: opens
- Auth endpoint → Prisma client: uses (evidence: `src/app/api/auth/[...nextauth]/route.ts`)
- Auth endpoint → Application database: verifies login (evidence: `src/app/api/auth/[...nextauth]/route.ts`)
- Dashboard layout → Section navigation: renders (evidence: `src/app/(dashboard)/layout.tsx`)
- Section navigation → Patient listing: links to (evidence: `src/components/sidebar.tsx`)
- Section navigation → Areas screen: links to (evidence: `src/components/sidebar.tsx`)
- Section navigation → Personnel screen: links to (evidence: `src/components/sidebar.tsx`)
- Section navigation → Reports screen: links to (evidence: `src/components/sidebar.tsx`)
- Patient listing → Add control: renders (evidence: `src/app/(dashboard)/patients/page.tsx`)
- Patient listing → Patient filters: renders (evidence: `src/app/(dashboard)/patients/page.tsx`)
- Patient listing → Page title: renders (evidence: `src/app/(dashboard)/patients/page.tsx`)
- Patient listing → Patient cards: renders (evidence: `src/app/(dashboard)/patients/page.tsx`)
- Patient cards → Patient card: renders (evidence: `src/components/cards.tsx`)
