# peterndta/ojt-management-system architecture

> Architecture diagram of the GitHub repository peterndta/ojt-management-system, 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/peterndta/ojt-management-system
- Repository: https://github.com/peterndta/ojt-management-system

## Overview

OJT Management System is a role-based internship-placement application for students, company representatives, and school administrators. Students browse jobs and companies, apply, confirm placements, and view OJT results; companies create jobs, manage applicants and offers, and submit results; administrators manage student/company records and oversee applications and results. The React routes document the role-specific screens, while the Java backend exposes authentication and domain services. The README documents the broader capabilities, but most controller and service implementations were not sampled, so those connections are left unverified.

Main entry points: [`ojt-fe/src/routes.js`](https://github.com/peterndta/ojt-management-system/blob/main/ojt-fe/src/routes.js) (Role-based routes), [`ojt-management-project/src/main/java/com/fptu/ojt/services`](https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/services) (Placement services), [`ojt-fe/src/features/company`](https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/company) (Company placement), [`ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java`](https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java) (Authentication API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_router["Role-based routes<br/>[routes.js]"]
  node_authui["Login and access"]
end

subgraph group_placement["Placement workflows"]
  node_student["Student placement"]
  node_company["Company placement"]
  node_admin["School oversight"]
end

subgraph group_backend["Backend services"]
  node_authapi["Authentication API"]
  node_authservice["Token management"]
  node_domainsvc["Placement services"]
end

subgraph group_data["Persistence and integrations"]
  node_records[("Placement records")]
  node_repositories["Data repositories"]
  node_files["Attachment storage"]
  node_mail["Email service<br/>[EmailService.java]"]
end

node_actors(("Portal users"))
node_objectstore[("Object storage")]
node_database[("PostgreSQL")]

node_actors -->|"use portal"| node_router
node_router -->|"routes to"| node_authui
node_router -->|"routes to"| node_student
node_router -->|"routes to"| node_company
node_router -->|"routes to"| node_admin
node_authui -.->|"authenticates via"| node_authapi
node_student -.->|"uses APIs"| node_domainsvc
node_company -.->|"uses APIs"| node_domainsvc
node_admin -.->|"uses APIs"| node_domainsvc
node_authapi -->|"creates tokens"| node_authservice
node_authapi -->|"queries records"| node_repositories
node_authservice -->|"reads and writes"| node_repositories
node_domainsvc -.->|"manages placements"| node_records
node_repositories -.->|"persists entities"| node_database
node_files -.->|"stores attachments"| node_objectstore
node_company -.->|"sends notices"| node_mail

click node_router "https://github.com/peterndta/ojt-management-system/blob/main/ojt-fe/src/routes.js"
click node_authui "https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/auth"
click node_student "https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/student"
click node_company "https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/company"
click node_admin "https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/admin"
click node_authapi "https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java"
click node_authservice "https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/configuration/security/services/RefreshTokenService.java"
click node_domainsvc "https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/services"
click node_records "https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/data/entities"
click node_repositories "https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/data/repositories"
click node_files "https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/remote/AmazonClientService.java"
click node_mail "https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/services/EmailService.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_router,node_authui,node_actors toneBlue
class node_student,node_company,node_admin,node_objectstore,node_database toneAmber
class node_authapi,node_authservice,node_domainsvc toneMint
class node_records,node_repositories,node_files,node_mail toneRose
```

## Components

### Web client

- [Role-based routes](https://github.com/peterndta/ojt-management-system/blob/main/ojt-fe/src/routes.js): `ojt-fe/src/routes.js`
- [Login and access](https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/auth): `ojt-fe/src/features/auth`

### Placement workflows

- [Student placement](https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/student): `ojt-fe/src/features/student`
- [Company placement](https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/company): `ojt-fe/src/features/company`
- [School oversight](https://github.com/peterndta/ojt-management-system/tree/main/ojt-fe/src/features/admin): `ojt-fe/src/features/admin`

### Backend services

- [Authentication API](https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java): `ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java`
- [Token management](https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/configuration/security/services/RefreshTokenService.java): `ojt-management-project/src/main/java/com/fptu/ojt/configuration/security/services/RefreshTokenService.java`
- [Placement services](https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/services): `ojt-management-project/src/main/java/com/fptu/ojt/services`

### Persistence and integrations

- [Placement records](https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/data/entities): `ojt-management-project/src/main/java/com/fptu/ojt/data/entities`
- [Data repositories](https://github.com/peterndta/ojt-management-system/tree/main/ojt-management-project/src/main/java/com/fptu/ojt/data/repositories): `ojt-management-project/src/main/java/com/fptu/ojt/data/repositories`
- [Attachment storage](https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/remote/AmazonClientService.java): `ojt-management-project/src/main/java/com/fptu/ojt/remote/AmazonClientService.java`
- [Email service](https://github.com/peterndta/ojt-management-system/blob/main/ojt-management-project/src/main/java/com/fptu/ojt/services/EmailService.java): `ojt-management-project/src/main/java/com/fptu/ojt/services/EmailService.java`

### Other components

- **Portal users**
- **Object storage**
- **PostgreSQL**

## Connections

- Portal users → Role-based routes: use portal
- Role-based routes → Login and access: routes to (evidence: `ojt-fe/src/routes.js`)
- Role-based routes → Student placement: routes to (evidence: `ojt-fe/src/routes.js`)
- Role-based routes → Company placement: routes to (evidence: `ojt-fe/src/routes.js`)
- Role-based routes → School oversight: routes to (evidence: `ojt-fe/src/routes.js`)
- Login and access → Authentication API: authenticates via
- Student placement → Placement services: uses APIs
- Company placement → Placement services: uses APIs
- School oversight → Placement services: uses APIs
- Authentication API → Token management: creates tokens (evidence: `ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java`)
- Authentication API → Data repositories: queries records (evidence: `ojt-management-project/src/main/java/com/fptu/ojt/controllers/AuthController.java`)
- Token management → Data repositories: reads and writes (evidence: `ojt-management-project/src/main/java/com/fptu/ojt/configuration/security/services/RefreshTokenService.java`)
- Placement services → Placement records: manages placements (evidence: `ojt-management-project/src/main/java/com/fptu/ojt/services/CompanyService.java`)
- Data repositories → PostgreSQL: persists entities
- Attachment storage → Object storage: stores attachments
- Company placement → Email service: sends notices
