# peoliveirapinto/campushub_pi_2026_2 architecture

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

- Interactive diagram: https://gitdiagram.com/peoliveirapinto/campushub_pi_2026_2
- Repository: https://github.com/peoliveirapinto/campushub_pi_2026_2

## Overview

CampusHub is a university student platform for account access, student profiles, and matching compatible students into project groups. The apparent user journey is account creation or login, profile setup, then exploring or forming groups; the frontend shows API calls for authentication and profile creation. The README describes student matching as a core capability, but the supplied excerpts do not show its implementation or the backend’s internal call paths. Those areas are represented as subsystems without asserting unverified connections.

Main entry points: [`backend/src/main/java/org/example/backend/controller/AuthController.java`](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/controller/AuthController.java) (Auth endpoints), [`frontend/src/app/criar_conta/page.tsx`](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_conta/page.tsx) (Account registration), [`backend/src/main/java/org/example/backend/service/AuthService.java`](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/service/AuthService.java) (Authentication service), [`frontend/src/app/home_c/login/page.tsx`](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/home_c/login/page.tsx) (Student dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_landing["CampusHub landing<br/>[page.tsx]"]
  node_dashboard["Student dashboard<br/>[page.tsx]"]
end

subgraph group_identity["Identity and access"]
  node_registration["Account registration<br/>[page.tsx]"]
  node_login["Login form<br/>[page.tsx]"]
  node_authui["Auth endpoints"]
  node_authservice["Authentication service<br/>[AuthService.java]"]
  node_security["JWT and security"]
end

subgraph group_profiles["Student profiles"]
  node_profilecreate["Profile creation<br/>[page.tsx]"]
  node_profileedit["Profile editing<br/>[page.tsx]"]
  node_profileapi["Profile API"]
  node_profileservice["Profile service<br/>[PerfilService.java]"]
end

subgraph group_groups["Matching and groups"]
  node_groupcreate["Group creation<br/>[page.tsx]"]
  node_groupdetail["Group details and request<br/>[page.tsx]"]
  node_matching["Student matching"]
end

subgraph group_data["Backend data"]
  node_userstore[("User persistence")]
  node_profilestore[("Profile persistence")]
  node_postgres[("PostgreSQL")]
end

node_student(("Student"))

node_student -->|"opens"| node_landing
node_student -->|"creates account"| node_registration
node_student -->|"signs in"| node_login
node_registration -->|"posts registration"| node_authui
node_registration -->|"logs in"| node_authui
node_login -->|"posts credentials"| node_authui
node_student -->|"sets up profile"| node_profilecreate
node_profilecreate -->|"posts profile"| node_profileapi
node_student -->|"edits profile"| node_profileedit
node_student -->|"views hub"| node_dashboard
node_dashboard -->|"opens creation"| node_groupcreate
node_student -->|"seeks compatible peers"| node_matching
node_student -->|"requests group entry"| node_groupdetail
node_authui -.->|"delegates"| node_authservice
node_authservice -.->|"uses tokens"| node_security
node_authservice -.->|"reads and writes"| node_userstore
node_profileapi -.->|"delegates"| node_profileservice
node_profileservice -.->|"reads and writes"| node_profilestore
node_userstore -.->|"persists"| node_postgres
node_profilestore -.->|"persists"| node_postgres

click node_landing "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/page.tsx"
click node_registration "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_conta/page.tsx"
click node_login "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/login/page.tsx"
click node_authui "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/controller/AuthController.java"
click node_authservice "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/service/AuthService.java"
click node_security "https://github.com/peoliveirapinto/campushub_pi_2026_2/tree/main/backend/src/main/java/org/example/backend/security"
click node_profilecreate "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_perfil/page.tsx"
click node_profileedit "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/editar_perfil/page.tsx"
click node_profileapi "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/controller/PerfilController.java"
click node_profileservice "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/service/PerfilService.java"
click node_dashboard "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/home_c/login/page.tsx"
click node_groupcreate "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_grupo/page.tsx"
click node_groupdetail "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/saber_mais_grupo/page.tsx"
click node_matching "https://github.com/peoliveirapinto/campushub_pi_2026_2/tree/main/backend/src/main/java/org/example/backend/service"
click node_userstore "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/repository/UsuarioRepository.java"
click node_profilestore "https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/repository/PerfilRepository.java"

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_landing,node_dashboard toneBlue
class node_registration,node_login,node_authui,node_authservice,node_security toneAmber
class node_profilecreate,node_profileedit,node_profileapi,node_profileservice toneMint
class node_groupcreate,node_groupdetail,node_matching toneRose
class node_userstore,node_profilestore,node_postgres,node_student toneIndigo
```

## Components

### Web experience

- [CampusHub landing](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Student dashboard](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/home_c/login/page.tsx): `frontend/src/app/home_c/login/page.tsx`

### Identity and access

- [Account registration](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_conta/page.tsx): `frontend/src/app/criar_conta/page.tsx`
- [Login form](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/login/page.tsx): `frontend/src/app/login/page.tsx`
- [Auth endpoints](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/controller/AuthController.java): `backend/src/main/java/org/example/backend/controller/AuthController.java`
- [Authentication service](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/service/AuthService.java): `backend/src/main/java/org/example/backend/service/AuthService.java`
- [JWT and security](https://github.com/peoliveirapinto/campushub_pi_2026_2/tree/main/backend/src/main/java/org/example/backend/security): `backend/src/main/java/org/example/backend/security`

### Student profiles

- [Profile creation](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_perfil/page.tsx): `frontend/src/app/criar_perfil/page.tsx`
- [Profile editing](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/editar_perfil/page.tsx): `frontend/src/app/editar_perfil/page.tsx`
- [Profile API](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/controller/PerfilController.java): `backend/src/main/java/org/example/backend/controller/PerfilController.java`
- [Profile service](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/service/PerfilService.java): `backend/src/main/java/org/example/backend/service/PerfilService.java`

### Matching and groups

- [Group creation](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/criar_grupo/page.tsx): `frontend/src/app/criar_grupo/page.tsx`
- [Group details and request](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/frontend/src/app/saber_mais_grupo/page.tsx): `frontend/src/app/saber_mais_grupo/page.tsx`
- [Student matching](https://github.com/peoliveirapinto/campushub_pi_2026_2/tree/main/backend/src/main/java/org/example/backend/service): `backend/src/main/java/org/example/backend/service`

### Backend data

- [User persistence](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/repository/UsuarioRepository.java): `backend/src/main/java/org/example/backend/repository/UsuarioRepository.java`
- [Profile persistence](https://github.com/peoliveirapinto/campushub_pi_2026_2/blob/main/backend/src/main/java/org/example/backend/repository/PerfilRepository.java): `backend/src/main/java/org/example/backend/repository/PerfilRepository.java`
- **PostgreSQL**

### Other components

- **Student**

## Connections

- Student → CampusHub landing: opens (evidence: `README.md`)
- Student → Account registration: creates account (evidence: `README.md`)
- Student → Login form: signs in (evidence: `README.md`)
- Account registration → Auth endpoints: posts registration (evidence: `frontend/src/app/criar_conta/page.tsx`)
- Account registration → Auth endpoints: logs in (evidence: `frontend/src/app/criar_conta/page.tsx`)
- Login form → Auth endpoints: posts credentials (evidence: `frontend/src/app/login/page.tsx`)
- Student → Profile creation: sets up profile (evidence: `README.md`)
- Profile creation → Profile API: posts profile (evidence: `frontend/src/app/criar_perfil/page.tsx`)
- Student → Profile editing: edits profile (evidence: `README.md`)
- Student → Student dashboard: views hub (evidence: `README.md`)
- Student dashboard → Group creation: opens creation (evidence: `frontend/src/app/home_c/login/page.tsx`)
- Student → Student matching: seeks compatible peers (evidence: `README.md`)
- Student → Group details and request: requests group entry (evidence: `README.md`)
- Auth endpoints → Authentication service: delegates
- Authentication service → JWT and security: uses tokens
- Authentication service → User persistence: reads and writes
- Profile API → Profile service: delegates
- Profile service → Profile persistence: reads and writes
- User persistence → PostgreSQL: persists
- Profile persistence → PostgreSQL: persists
