# lucaseduardo76/sipf architecture

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

- Interactive diagram: https://gitdiagram.com/lucaseduardo76/sipf
- Repository: https://github.com/lucaseduardo76/sipf

## Overview

SIP is a campus lost-and-found application: users create accounts, browse and search found items, and pursue item recovery; administrators manage items, review recovery requests, and maintain pickup schedules. The graph also shows authentication, profile, and notification support. Several domain pages and API modules are present in the tree but were not sampled, so their internal calls are not inferred; edges reflect only shown calls, imports listed in the source index, or documented behavior.

Main entry points: [`src/api/endpoints/recoveryService.ts`](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/recoveryService.ts) (Recovery service), [`src/api/axios.ts`](https://github.com/lucaseduardo76/sipf/blob/main/src/api/axios.ts) (HTTP client), [`src/app/(public)/login/LoginClient.tsx`](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(public)/login/LoginClient.tsx) (Sign in), [`src/app/(public)/signup/page.tsx`](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(public)/signup/page.tsx) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_login["Sign in<br/>[LoginClient.tsx]"]
  node_signup["Registration<br/>[page.tsx]"]
  node_auth["Auth context<br/>[AuthContext.tsx]"]
  node_authapi["Auth endpoints<br/>[auth.ts]"]
  node_userapi["User endpoints<br/>[user.ts]"]
  node_middleware["Route access<br/>[middleware.ts]"]
end

subgraph group_items["Item discovery"]
  node_itemdetail["Item details<br/>[page.tsx]"]
  node_itemlist["Item browsing<br/>[page.tsx]"]
  node_itemsearch["Item search<br/>[page.tsx]"]
  node_itemadmin["Item management"]
  node_itemapi["Item endpoints<br/>[item.ts]"]
end

subgraph group_recovery["Recovery operations"]
  node_recovery["Request history<br/>[page.tsx]"]
  node_review["Review requests<br/>[page.tsx]"]
  node_recoveryapi["Recovery service<br/>[recoveryService.ts]"]
  node_withdrawalapi["Withdrawal endpoints<br/>[withdrawal.ts]"]
  node_schedule["Pickup schedules"]
end

subgraph group_platform["Shared platform"]
  node_profile["Profile management<br/>[page.tsx]"]
  node_avatar["Avatar upload<br/>[useAvatarUpload.ts]"]
  node_http["HTTP client<br/>[axios.ts]"]
  node_notifications["Live notifications"]
  node_notificationui["Notification header<br/>[PageHeader.tsx]"]
  node_notificationapi["Notification endpoints<br/>[notification.ts]"]
end

node_visitor(("Campus user"))
node_backend[("Application API")]

node_visitor -->|"signs in"| node_login
node_visitor -->|"registers"| node_signup
node_login -->|"calls login"| node_auth
node_signup -->|"calls register"| node_auth
node_auth -->|"calls auth"| node_authapi
node_authapi -->|"uses client"| node_http
node_login -->|"requests reactivation"| node_userapi
node_middleware -->|"gates routes"| node_visitor
node_itemdetail -->|"loads item"| node_itemapi
node_itemdetail -->|"submits withdrawal"| node_withdrawalapi
node_recovery -->|"loads history"| node_recoveryapi
node_review -->|"reviews requests"| node_recoveryapi
node_recoveryapi -->|"uses client"| node_http
node_signup -->|"uploads photo"| node_avatar
node_avatar -->|"sends upload"| node_http
node_profile -->|"loads profile"| node_http
node_notificationui -->|"uses context"| node_notifications
node_notificationui -->|"loads notifications"| node_notificationapi
node_notifications -->|"uses endpoints"| node_notificationapi
node_itemapi -.->|"exchanges item data"| node_backend
node_recoveryapi -->|"exchanges requests"| node_backend
node_withdrawalapi -.->|"exchanges withdrawals"| node_backend
node_notificationapi -.->|"exchanges notifications"| node_backend
node_userapi -.->|"exchanges account data"| node_backend
node_schedule -.->|"manages pickup slots"| node_backend

click node_login "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(public)/login/LoginClient.tsx"
click node_signup "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(public)/signup/page.tsx"
click node_auth "https://github.com/lucaseduardo76/sipf/blob/main/src/context/AuthContext.tsx"
click node_authapi "https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/auth.ts"
click node_userapi "https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/user.ts"
click node_middleware "https://github.com/lucaseduardo76/sipf/blob/main/src/middleware.ts"
click node_itemdetail "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/items/%5Bid%5D/page.tsx"
click node_itemlist "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/items/list/%5Bfilter%5D/page.tsx"
click node_itemsearch "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/items/search/%5B%5B...operation%5D%5D/page.tsx"
click node_itemadmin "https://github.com/lucaseduardo76/sipf/tree/main/src/app/(private)/dashboard/(admin)/items"
click node_itemapi "https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/item.ts"
click node_recovery "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/request-history/page.tsx"
click node_review "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/(admin)/requests/page.tsx"
click node_recoveryapi "https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/recoveryService.ts"
click node_withdrawalapi "https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/withdrawal.ts"
click node_schedule "https://github.com/lucaseduardo76/sipf/tree/main/src/app/(private)/dashboard/(admin)/schedule"
click node_profile "https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/profile/page.tsx"
click node_avatar "https://github.com/lucaseduardo76/sipf/blob/main/src/utils/useAvatarUpload.ts"
click node_http "https://github.com/lucaseduardo76/sipf/blob/main/src/api/axios.ts"
click node_notifications "https://github.com/lucaseduardo76/sipf/blob/main/src/context/WebsocketContext.tsx"
click node_notificationui "https://github.com/lucaseduardo76/sipf/blob/main/src/components/ui/PageHeader.tsx"
click node_notificationapi "https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/notification.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_signup,node_auth,node_authapi,node_userapi,node_middleware,node_visitor toneBlue
class node_itemdetail,node_itemlist,node_itemsearch,node_itemadmin,node_itemapi,node_backend toneAmber
class node_recovery,node_review,node_recoveryapi,node_withdrawalapi,node_schedule toneMint
class node_profile,node_avatar,node_http,node_notifications,node_notificationui,node_notificationapi toneRose
```

## Components

### Identity and access

- [Sign in](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(public)/login/LoginClient.tsx): `src/app/(public)/login/LoginClient.tsx`
- [Registration](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(public)/signup/page.tsx): `src/app/(public)/signup/page.tsx`
- [Auth context](https://github.com/lucaseduardo76/sipf/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Auth endpoints](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/auth.ts): `src/api/endpoints/auth.ts`
- [User endpoints](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/user.ts): `src/api/endpoints/user.ts`
- [Route access](https://github.com/lucaseduardo76/sipf/blob/main/src/middleware.ts): `src/middleware.ts`

### Item discovery

- [Item details](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/items/%5Bid%5D/page.tsx): `src/app/(private)/dashboard/items/[id]/page.tsx`
- [Item browsing](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/items/list/%5Bfilter%5D/page.tsx): `src/app/(private)/dashboard/items/list/[filter]/page.tsx`
- [Item search](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/items/search/%5B%5B...operation%5D%5D/page.tsx): `src/app/(private)/dashboard/items/search/[[...operation]]/page.tsx`
- [Item management](https://github.com/lucaseduardo76/sipf/tree/main/src/app/(private)/dashboard/(admin)/items): `src/app/(private)/dashboard/(admin)/items`
- [Item endpoints](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/item.ts): `src/api/endpoints/item.ts`

### Recovery operations

- [Request history](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/request-history/page.tsx): `src/app/(private)/dashboard/request-history/page.tsx`
- [Review requests](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/(admin)/requests/page.tsx): `src/app/(private)/dashboard/(admin)/requests/page.tsx`
- [Recovery service](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/recoveryService.ts): `src/api/endpoints/recoveryService.ts`
- [Withdrawal endpoints](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/withdrawal.ts): `src/api/endpoints/withdrawal.ts`
- [Pickup schedules](https://github.com/lucaseduardo76/sipf/tree/main/src/app/(private)/dashboard/(admin)/schedule): `src/app/(private)/dashboard/(admin)/schedule`

### Shared platform

- [Profile management](https://github.com/lucaseduardo76/sipf/blob/main/src/app/(private)/dashboard/profile/page.tsx): `src/app/(private)/dashboard/profile/page.tsx`
- [Avatar upload](https://github.com/lucaseduardo76/sipf/blob/main/src/utils/useAvatarUpload.ts): `src/utils/useAvatarUpload.ts`
- [HTTP client](https://github.com/lucaseduardo76/sipf/blob/main/src/api/axios.ts): `src/api/axios.ts`
- [Live notifications](https://github.com/lucaseduardo76/sipf/blob/main/src/context/WebsocketContext.tsx): `src/context/WebsocketContext.tsx`
- [Notification header](https://github.com/lucaseduardo76/sipf/blob/main/src/components/ui/PageHeader.tsx): `src/components/ui/PageHeader.tsx`
- [Notification endpoints](https://github.com/lucaseduardo76/sipf/blob/main/src/api/endpoints/notification.ts): `src/api/endpoints/notification.ts`

### Other components

- **Campus user**
- **Application API**

## Connections

- Campus user → Sign in: signs in (evidence: `src/app/(public)/login/LoginClient.tsx`)
- Campus user → Registration: registers (evidence: `src/app/(public)/signup/page.tsx`)
- Sign in → Auth context: calls login (evidence: `src/app/(public)/login/LoginClient.tsx`)
- Registration → Auth context: calls register (evidence: `src/app/(public)/signup/page.tsx`)
- Auth context → Auth endpoints: calls auth (evidence: `src/context/AuthContext.tsx`)
- Auth endpoints → HTTP client: uses client (evidence: `src/api/endpoints/auth.ts`)
- Sign in → User endpoints: requests reactivation (evidence: `src/app/(public)/login/LoginClient.tsx`)
- Route access → Campus user: gates routes (evidence: `src/middleware.ts`)
- Item details → Item endpoints: loads item (evidence: `src/app/(private)/dashboard/items/[id]/page.tsx`)
- Item details → Withdrawal endpoints: submits withdrawal (evidence: `src/app/(private)/dashboard/items/[id]/page.tsx`)
- Request history → Recovery service: loads history (evidence: `src/app/(private)/dashboard/request-history/page.tsx`)
- Review requests → Recovery service: reviews requests (evidence: `src/app/(private)/dashboard/(admin)/requests/page.tsx`)
- Recovery service → HTTP client: uses client (evidence: `src/api/endpoints/recoveryService.ts`)
- Registration → Avatar upload: uploads photo (evidence: `src/app/(public)/signup/page.tsx`)
- Avatar upload → HTTP client: sends upload (evidence: `src/utils/useAvatarUpload.ts`)
- Profile management → HTTP client: loads profile (evidence: `src/app/(private)/dashboard/profile/page.tsx`)
- Notification header → Live notifications: uses context (evidence: `src/components/ui/PageHeader.tsx`)
- Notification header → Notification endpoints: loads notifications (evidence: `src/components/ui/PageHeader.tsx`)
- Live notifications → Notification endpoints: uses endpoints (evidence: `src/context/WebsocketContext.tsx`)
- Item endpoints → Application API: exchanges item data
- Recovery service → Application API: exchanges requests (evidence: `src/api/endpoints/recoveryService.ts`)
- Withdrawal endpoints → Application API: exchanges withdrawals
- Notification endpoints → Application API: exchanges notifications
- User endpoints → Application API: exchanges account data
- Pickup schedules → Application API: manages pickup slots
