# jowbab/final_campus-find architecture

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

- Interactive diagram: https://gitdiagram.com/jowbab/final_campus-find
- Repository: https://github.com/jowbab/final_campus-find

## Overview

CampusFind is a Flutter campus lost-and-found app with a separate Node.js authentication backend. The apparent user journey is account access followed by browsing, posting, and viewing campus items; the tree identifies these screens and stores, but their source was not sampled, so their internal calls and backend integration are not verified. The backend excerpts do show HTTP auth routes calling an authentication service, which uses JSON-backed persistence and email delivery. The README provides no additional capability detail.

Main entry points: [`IT_LOST/lib/auth_store.dart`](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_store.dart) (Auth store), [`IT_LOST/backend/src/server.js`](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/server.js) (Server setup), [`IT_LOST/backend/src/auth/auth-service.js`](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/auth-service.js) (Auth service), [`IT_LOST/backend/src/app.js`](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/app.js) (HTTP auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter app"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_home["Browse items<br/>[home_screen.dart]"]
  node_post["Post item"]
  node_detail["Item detail"]
  node_item_model["Campus item<br/>[campus_item.dart]"]
  node_item_store["Item store<br/>[item_store.dart]"]
end

subgraph group_client_auth["Client auth"]
  node_login["Sign in<br/>[login_screen.dart]"]
  node_register["Register"]
  node_verify["Verify email"]
  node_reset["Reset password"]
  node_auth_store["Auth store<br/>[auth_store.dart]"]
  node_auth_api["Auth API<br/>[auth_api.dart]"]
  node_local_auth["Local auth API"]
  node_http_auth["HTTP auth client"]
end

subgraph group_server["Auth backend"]
  node_api["HTTP auth routes<br/>[app.js]"]
  node_server_entry["Server setup<br/>[server.js]"]
end

subgraph group_server_services["Backend services"]
  node_service["Auth service<br/>[auth-service.js]"]
  node_repository["JSON repository<br/>[json-repository.js]"]
  node_database[("Auth JSON data<br/>[json-repository.js]")]
  node_email_sender["Email sender<br/>[email-sender.js]"]
end

node_person(("Campus user"))
node_smtp{{"SMTP service"}}

node_person -.->|"uses"| node_app_entry
node_person -->|"requests auth"| node_api
node_server_entry -->|"initializes"| node_repository
node_server_entry -->|"constructs"| node_service
node_server_entry -->|"configures"| node_email_sender
node_server_entry -->|"creates"| node_api
node_api -->|"routes auth"| node_service
node_service -->|"reads and writes"| node_repository
node_service -->|"sends codes"| node_email_sender
node_repository -->|"reads and writes"| node_database
node_email_sender -.->|"sends mail"| node_smtp
node_app_entry -.->|"opens"| node_home
node_home -.->|"loads items"| node_item_store
node_post -.->|"submits item"| node_item_store
node_home -.->|"opens item"| node_detail
node_item_store -.->|"uses model"| node_item_model
node_login -.->|"signs in"| node_auth_store
node_register -.->|"registers"| node_auth_store
node_verify -.->|"verifies"| node_auth_store
node_reset -.->|"resets password"| node_auth_store
node_auth_store -.->|"delegates auth"| node_auth_api
node_auth_api -.->|"uses local"| node_local_auth
node_auth_api -.->|"uses HTTP"| node_http_auth
node_http_auth -.->|"calls backend"| node_api

click node_app_entry "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/main.dart"
click node_home "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/home_screen.dart"
click node_post "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/post_item_screen.dart"
click node_detail "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/item_detail_screen.dart"
click node_item_model "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/campus_item.dart"
click node_item_store "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/item_store.dart"
click node_login "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/login_screen.dart"
click node_register "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/register_screen.dart"
click node_verify "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/verify_email_screen.dart"
click node_reset "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/password_reset_screen.dart"
click node_auth_store "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_store.dart"
click node_auth_api "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_api.dart"
click node_local_auth "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/local_json_auth_api.dart"
click node_http_auth "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_http_client.dart"
click node_api "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/app.js"
click node_service "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/auth-service.js"
click node_repository "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/json-repository.js"
click node_database "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/json-repository.js"
click node_email_sender "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/email/email-sender.js"
click node_server_entry "https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/server.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_app_entry,node_home,node_post,node_detail,node_item_model,node_item_store,node_person toneBlue
class node_login,node_register,node_verify,node_reset,node_auth_store,node_auth_api,node_local_auth,node_http_auth toneAmber
class node_api,node_server_entry toneMint
class node_service,node_repository,node_database,node_email_sender toneRose
class node_smtp toneIndigo
```

## Components

### Flutter app

- [App entry](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/main.dart): `IT_LOST/lib/main.dart`
- [Browse items](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/home_screen.dart): `IT_LOST/lib/home_screen.dart`
- [Post item](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/post_item_screen.dart): `IT_LOST/lib/post_item_screen.dart`
- [Item detail](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/item_detail_screen.dart): `IT_LOST/lib/item_detail_screen.dart`
- [Campus item](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/campus_item.dart): `IT_LOST/lib/campus_item.dart`
- [Item store](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/item_store.dart): `IT_LOST/lib/item_store.dart`

### Client auth

- [Sign in](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/login_screen.dart): `IT_LOST/lib/login_screen.dart`
- [Register](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/register_screen.dart): `IT_LOST/lib/register_screen.dart`
- [Verify email](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/verify_email_screen.dart): `IT_LOST/lib/verify_email_screen.dart`
- [Reset password](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/password_reset_screen.dart): `IT_LOST/lib/password_reset_screen.dart`
- [Auth store](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_store.dart): `IT_LOST/lib/auth_store.dart`
- [Auth API](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_api.dart): `IT_LOST/lib/auth_api.dart`
- [Local auth API](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/local_json_auth_api.dart): `IT_LOST/lib/local_json_auth_api.dart`
- [HTTP auth client](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/lib/auth_http_client.dart): `IT_LOST/lib/auth_http_client.dart`

### Auth backend

- [HTTP auth routes](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/app.js): `IT_LOST/backend/src/app.js`
- [Server setup](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/server.js): `IT_LOST/backend/src/server.js`

### Backend services

- [Auth service](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/auth-service.js): `IT_LOST/backend/src/auth/auth-service.js`
- [JSON repository](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/json-repository.js): `IT_LOST/backend/src/auth/json-repository.js`
- [Auth JSON data](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/auth/json-repository.js): `IT_LOST/backend/src/auth/json-repository.js`
- [Email sender](https://github.com/jowbab/final_campus-find/blob/main/IT_LOST/backend/src/email/email-sender.js): `IT_LOST/backend/src/email/email-sender.js`

### Other components

- **Campus user**
- **SMTP service**

## Connections

- Campus user → App entry: uses
- Campus user → HTTP auth routes: requests auth (evidence: `IT_LOST/backend/src/app.js`)
- Server setup → JSON repository: initializes (evidence: `IT_LOST/backend/src/server.js`)
- Server setup → Auth service: constructs (evidence: `IT_LOST/backend/src/server.js`)
- Server setup → Email sender: configures (evidence: `IT_LOST/backend/src/server.js`)
- Server setup → HTTP auth routes: creates (evidence: `IT_LOST/backend/src/server.js`)
- HTTP auth routes → Auth service: routes auth (evidence: `IT_LOST/backend/src/app.js`)
- Auth service → JSON repository: reads and writes (evidence: `IT_LOST/backend/src/auth/auth-service.js`)
- Auth service → Email sender: sends codes (evidence: `IT_LOST/backend/src/auth/auth-service.js`)
- JSON repository → Auth JSON data: reads and writes (evidence: `IT_LOST/backend/src/auth/json-repository.js`)
- Email sender → SMTP service: sends mail
- App entry → Browse items: opens
- Browse items → Item store: loads items
- Post item → Item store: submits item
- Browse items → Item detail: opens item
- Item store → Campus item: uses model
- Sign in → Auth store: signs in
- Register → Auth store: registers
- Verify email → Auth store: verifies
- Reset password → Auth store: resets password
- Auth store → Auth API: delegates auth
- Auth API → Local auth API: uses local
- Auth API → HTTP auth client: uses HTTP
- HTTP auth client → HTTP auth routes: calls backend
