# bryanna-21/unilink-admin-panel architecture

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

- Interactive diagram: https://gitdiagram.com/bryanna-21/unilink-admin-panel
- Repository: https://github.com/bryanna-21/unilink-admin-panel

## Overview

UNILINK-ADMIN-PANEL is a role-protected university administration console. Administrators sign in, enter a shared dashboard shell, and use separate operational pages to manage people, university structure, schedules, moderation, reports, and platform oversight; screens retrieve or mutate backend data through the authenticated API client, while notifications also have a socket path. The sampled material confirms the shell, dashboard, timetable, and moderation flows. Many other capabilities are identifiable from routes and the source index, but their internal calls were not sampled, so those links are left out.

Main entry points: [`src/lib/axios.ts`](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/lib/axios.ts) (API client), [`src/store/auth.store.ts`](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/store/auth.store.ts) (Auth state), [`src/app/dashboard/page.tsx`](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/dashboard/page.tsx) (Dashboard), [`src/providers/socket-provider.tsx`](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/providers/socket-provider.tsx) (Live notifications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_login["Sign-in<br/>[page.tsx]"]
  node_layout["Admin shell"]
  node_guard["Role guard<br/>[auth-guard.tsx]"]
end

subgraph group_people["People and structure"]
  node_users["User administration<br/>[page.tsx]"]
  node_students["Student records<br/>[page.tsx]"]
  node_admins["Admin accounts<br/>[page.tsx]"]
  node_lecturers["Lecturer accounts<br/>[page.tsx]"]
  node_structure["University structure<br/>[structure-page.tsx]"]
  node_universities["Universities<br/>[page.tsx]"]
end

subgraph group_operations["Campus operations"]
  node_timetables["Timetables<br/>[page.tsx]"]
  node_moderation["Content moderation<br/>[page.tsx]"]
  node_penalties["Penalties and appeals<br/>[page.tsx]"]
  node_reports["Emergency reports<br/>[page.tsx]"]
  node_announcements["Announcements<br/>[page.tsx]"]
  node_engagement["Community tools<br/>[page.tsx]"]
end

subgraph group_oversight["Insights and oversight"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_analytics["Analytics<br/>[page.tsx]"]
  node_audit["Audit logs<br/>[page.tsx]"]
  node_health["System health<br/>[page.tsx]"]
end

subgraph group_runtime["Shared runtime"]
  node_authstate[("Auth state<br/>[auth.store.ts]")]
  node_api["API client<br/>[axios.ts]"]
  node_dashboarddata["Dashboard data<br/>[use-dashboard.ts]"]
  node_dashboardservice["Dashboard service"]
  node_notifications["Live notifications"]
  node_socket["Socket client<br/>[socket.ts]"]
end

node_admin(("Administrator"))
node_backend{{"UniLink backend"}}

node_admin -->|"signs in"| node_login
node_login -.->|"sets session"| node_authstate
node_dashboard -->|"renders"| node_layout
node_layout -->|"wraps"| node_guard
node_guard -->|"checks session"| node_authstate
node_dashboard -->|"loads metrics"| node_dashboarddata
node_dashboarddata -->|"uses"| node_dashboardservice
node_dashboardservice -->|"requests data"| node_api
node_dashboard -->|"fetches stats"| node_api
node_api -->|"sends requests"| node_backend
node_timetables -->|"reads and updates"| node_api
node_moderation -->|"reviews reports"| node_api
node_penalties -->|"manages cases"| node_api
node_authstate -.->|"authenticates via client"| node_backend
node_notifications -->|"uses"| node_socket
node_notifications -->|"reads session"| node_authstate
node_socket -.->|"connects live"| node_backend

click node_login "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/login/page.tsx"
click node_layout "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/components/layout/dashboard-layout.tsx"
click node_guard "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/components/auth/auth-guard.tsx"
click node_dashboard "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/dashboard/page.tsx"
click node_analytics "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/analytics/page.tsx"
click node_audit "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/audit-logs/page.tsx"
click node_health "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/system-health/page.tsx"
click node_users "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/users/page.tsx"
click node_students "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/students/page.tsx"
click node_admins "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/admins/page.tsx"
click node_lecturers "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/lecturers/page.tsx"
click node_structure "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/components/structure/structure-page.tsx"
click node_universities "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/universities/page.tsx"
click node_timetables "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/timetables/page.tsx"
click node_moderation "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/moderation/page.tsx"
click node_penalties "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/penalties/page.tsx"
click node_reports "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/reports/page.tsx"
click node_announcements "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/announcements/page.tsx"
click node_engagement "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/posts/page.tsx"
click node_authstate "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/store/auth.store.ts"
click node_api "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/lib/axios.ts"
click node_dashboarddata "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/hooks/use-dashboard.ts"
click node_dashboardservice "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/services/dashboard.service.ts"
click node_notifications "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/providers/socket-provider.tsx"
click node_socket "https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/services/socket.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_login,node_layout,node_guard toneBlue
class node_users,node_students,node_admins,node_lecturers,node_structure,node_universities toneAmber
class node_timetables,node_moderation,node_penalties,node_reports,node_announcements,node_engagement toneMint
class node_dashboard,node_analytics,node_audit,node_health toneRose
class node_authstate,node_api,node_dashboarddata,node_dashboardservice,node_notifications,node_socket,node_admin,node_backend toneIndigo
```

## Components

### Access and shell

- [Sign-in](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Admin shell](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/components/layout/dashboard-layout.tsx): `src/components/layout/dashboard-layout.tsx`
- [Role guard](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/components/auth/auth-guard.tsx): `src/components/auth/auth-guard.tsx`

### People and structure

- [User administration](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/users/page.tsx): `src/app/users/page.tsx`
- [Student records](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/students/page.tsx): `src/app/students/page.tsx`
- [Admin accounts](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/admins/page.tsx): `src/app/admins/page.tsx`
- [Lecturer accounts](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/lecturers/page.tsx): `src/app/lecturers/page.tsx`
- [University structure](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/components/structure/structure-page.tsx): `src/components/structure/structure-page.tsx`
- [Universities](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/universities/page.tsx): `src/app/universities/page.tsx`

### Campus operations

- [Timetables](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/timetables/page.tsx): `src/app/timetables/page.tsx`
- [Content moderation](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/moderation/page.tsx): `src/app/moderation/page.tsx`
- [Penalties and appeals](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/penalties/page.tsx): `src/app/penalties/page.tsx`
- [Emergency reports](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/reports/page.tsx): `src/app/reports/page.tsx`
- [Announcements](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/announcements/page.tsx): `src/app/announcements/page.tsx`
- [Community tools](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/posts/page.tsx): `src/app/posts/page.tsx`

### Insights and oversight

- [Dashboard](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Analytics](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/analytics/page.tsx): `src/app/analytics/page.tsx`
- [Audit logs](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/audit-logs/page.tsx): `src/app/audit-logs/page.tsx`
- [System health](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/app/system-health/page.tsx): `src/app/system-health/page.tsx`

### Shared runtime

- [Auth state](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/store/auth.store.ts): `src/store/auth.store.ts`
- [API client](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/lib/axios.ts): `src/lib/axios.ts`
- [Dashboard data](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/hooks/use-dashboard.ts): `src/hooks/use-dashboard.ts`
- [Dashboard service](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/services/dashboard.service.ts): `src/services/dashboard.service.ts`
- [Live notifications](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/providers/socket-provider.tsx): `src/providers/socket-provider.tsx`
- [Socket client](https://github.com/bryanna-21/unilink-admin-panel/blob/main/src/services/socket.ts): `src/services/socket.ts`

### Other components

- **Administrator**
- **UniLink backend**

## Connections

- Administrator → Sign-in: signs in
- Sign-in → Auth state: sets session
- Dashboard → Admin shell: renders (evidence: `src/app/dashboard/page.tsx`)
- Admin shell → Role guard: wraps (evidence: `src/components/layout/dashboard-layout.tsx`)
- Role guard → Auth state: checks session (evidence: `src/components/auth/auth-guard.tsx`)
- Dashboard → Dashboard data: loads metrics (evidence: `src/app/dashboard/page.tsx`)
- Dashboard data → Dashboard service: uses (evidence: `src/hooks/use-dashboard.ts`)
- Dashboard service → API client: requests data
- Dashboard → API client: fetches stats (evidence: `src/app/dashboard/page.tsx`)
- API client → UniLink backend: sends requests (evidence: `src/lib/axios.ts`)
- Timetables → API client: reads and updates (evidence: `src/app/timetables/page.tsx`)
- Content moderation → API client: reviews reports (evidence: `src/app/moderation/page.tsx`)
- Penalties and appeals → API client: manages cases (evidence: `src/app/penalties/page.tsx`)
- Auth state → UniLink backend: authenticates via client
- Live notifications → Socket client: uses (evidence: `src/providers/socket-provider.tsx`)
- Live notifications → Auth state: reads session (evidence: `src/providers/socket-provider.tsx`)
- Socket client → UniLink backend: connects live
