# davidddsssssdoescode/bsu-portal-remake architecture

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

- Interactive diagram: https://gitdiagram.com/davidddsssssdoescode/bsu-portal-remake
- Repository: https://github.com/davidddsssssdoescode/bsu-portal-remake

## Overview

This is a student portal with a React client and an Express service. The visible workflow is student login, credential validation, and navigation to a dashboard that presents student information; the server also exposes a separate student-profile lookup. The app includes a portal navigation drawer and overlay. Dashboard data-fetching and API URL configuration are not shown in the sampled source, so their wiring is left out.

Main entry points: [`client/src/App.tsx`](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/App.tsx) (App routes), [`client/src/pages/Login.tsx`](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/pages/Login.tsx) (Login form), [`client/src/apis/AuthAPI.ts`](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/apis/AuthAPI.ts) (Auth API client), [`server/src/routes/users.ts`](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/routes/users.ts) (Student routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Portal client"]
  node_app["App routes<br/>[App.tsx]"]
  node_login["Login form<br/>[Login.tsx]"]
  node_authapi["Auth API client<br/>[AuthAPI.ts]"]
  node_dashboard["Student dashboard<br/>[MainPortal.tsx]"]
  node_userinfo["Student profile view<br/>[UserInfo.tsx]"]
  node_header["Portal header<br/>[Header.tsx]"]
  node_navbar["Navigation drawer<br/>[NavBar.tsx]"]
  node_overlay["Modal overlay<br/>[ModalOverlay.tsx]"]
end

subgraph group_server["Student service"]
  node_server["Express server<br/>[server.ts]"]
  node_users["Student routes<br/>[users.ts]"]
end

subgraph group_data["Student data"]
  node_pool["Postgres pool<br/>[pool.ts]"]
end

node_student(("Student"))
node_auth_service["Login API"]
node_students[("Students database")]

node_student -->|"opens"| node_app
node_app -->|"routes"| node_login
node_app -->|"routes"| node_dashboard
node_app -->|"renders"| node_header
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_overlay
node_student -->|"submits credentials"| node_login
node_login -->|"calls"| node_authapi
node_authapi -.->|"posts credentials"| node_auth_service
node_login -->|"navigates on success"| node_dashboard
node_server -->|"mounts routes"| node_users
node_users -->|"queries"| node_pool
node_pool -->|"reads"| node_students

click node_app "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/App.tsx"
click node_login "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/pages/Login.tsx"
click node_authapi "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/apis/AuthAPI.ts"
click node_dashboard "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/pages/MainPortal.tsx"
click node_userinfo "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/MainPortal/UserInfo.tsx"
click node_header "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/Header.tsx"
click node_navbar "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/MainPortal/NavBar/NavBar.tsx"
click node_overlay "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/Modals/ModalOverlay.tsx"
click node_server "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/server.ts"
click node_users "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/routes/users.ts"
click node_pool "https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/configs/pool.ts"

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_login,node_authapi,node_dashboard,node_userinfo,node_header,node_navbar,node_overlay toneBlue
class node_server,node_users,node_students toneAmber
class node_pool,node_auth_service toneMint
class node_student toneIndigo
```

## Components

### Portal client

- [App routes](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Login form](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/pages/Login.tsx): `client/src/pages/Login.tsx`
- [Auth API client](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/apis/AuthAPI.ts): `client/src/apis/AuthAPI.ts`
- [Student dashboard](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/pages/MainPortal.tsx): `client/src/pages/MainPortal.tsx`
- [Student profile view](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/MainPortal/UserInfo.tsx): `client/src/components/MainPortal/UserInfo.tsx`
- [Portal header](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/Header.tsx): `client/src/components/Header.tsx`
- [Navigation drawer](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/MainPortal/NavBar/NavBar.tsx): `client/src/components/MainPortal/NavBar/NavBar.tsx`
- [Modal overlay](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/client/src/components/Modals/ModalOverlay.tsx): `client/src/components/Modals/ModalOverlay.tsx`

### Student service

- [Express server](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/server.ts): `server/src/server.ts`
- [Student routes](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/routes/users.ts): `server/src/routes/users.ts`

### Student data

- [Postgres pool](https://github.com/davidddsssssdoescode/bsu-portal-remake/blob/main/server/src/configs/pool.ts): `server/src/configs/pool.ts`

### Other components

- **Student**
- **Login API**
- **Students database**

## Connections

- Student → App routes: opens
- App routes → Login form: routes
- App routes → Student dashboard: routes
- App routes → Portal header: renders
- App routes → Navigation drawer: renders
- App routes → Modal overlay: renders
- Student → Login form: submits credentials
- Login form → Auth API client: calls
- Auth API client → Login API: posts credentials
- Login form → Student dashboard: navigates on success
- Express server → Student routes: mounts routes
- Student routes → Postgres pool: queries
- Postgres pool → Students database: reads
