# king130/capstone architecture

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

- Interactive diagram: https://gitdiagram.com/king130/capstone
- Repository: https://github.com/king130/capstone

## Overview

This is a multi-role internship and OJT management platform: students discover placements and apply; host organizations and schools manage applications, placement terms, schedules, and hours; administrators govern organizations, access, and subscriptions. The graph groups the user-facing entry points with the principal domain stages and their backend ownership. Several capabilities are represented from the repository tree rather than inspected implementation; their relationships are omitted or marked unverified. The README is empty, so capability context comes from the file tree and sampled source.

Main entry points: [`backend/app/Http/Controllers/ApplicationController.php`](https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/ApplicationController.php) (Applications), [`src/main.ts`](https://github.com/king130/capstone/blob/main/src/main.ts) (Vue application), [`src/stores/auth.ts`](https://github.com/king130/capstone/blob/main/src/stores/auth.ts) (Authentication state), [`backend/app/Models/Organization.php`](https://github.com/king130/capstone/blob/main/backend/app/Models/Organization.php) (Organization profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Vue application<br/>[main.ts]"]
  node_routing["Role-based routing<br/>[index.ts]"]
  node_auth["Authentication state<br/>[auth.ts]"]
  node_auth_service["Auth API service<br/>[auth.ts]"]
end

subgraph group_opportunities["Internship opportunities"]
  node_directory["Opportunity directory"]
  node_internships["Internship listings"]
  node_eligibility["Internship eligibility"]
end

subgraph group_placement["Application and placement"]
  node_applications["Applications"]
  node_application_record[("Application records<br/>[Application.php]")]
  node_tracker["Application progress"]
  node_hours_agreement["Hours agreements"]
  node_agreement_record[("Agreement records")]
  node_placement_schedule["Placement schedules"]
end

subgraph group_ojt["OJT tracking"]
  node_ojt["OJT attendance and logs"]
  node_ojt_frontend["OJT interface services<br/>[ojtService.ts]"]
end

subgraph group_platform["Organizations and platform"]
  node_accounts[("User and student accounts<br/>[User.php]")]
  node_organizations[("Organization profiles<br/>[Organization.php]")]
  node_org_access["Organization access"]
  node_subscriptions["Subscription management"]
  node_subscription_service["Subscription checkout API<br/>[subscriptions.ts]"]
  node_admin["Administration"]
end

node_user(("Students and staff"))

node_user -->|"uses"| node_app
node_app -->|"installs"| node_routing
node_app -->|"initializes"| node_auth
node_routing -->|"checks access"| node_auth
node_auth -->|"authenticates"| node_auth_service
node_directory -.->|"loads opportunities"| node_internships
node_internships -->|"checks eligibility"| node_eligibility
node_applications -->|"creates and updates"| node_application_record
node_applications -->|"checks eligibility"| node_eligibility
node_applications -->|"updates progress"| node_tracker
node_applications -->|"coordinates terms"| node_hours_agreement
node_application_record -->|"has agreement"| node_agreement_record
node_applications -.->|"manages schedules"| node_placement_schedule
node_ojt_frontend -.->|"submits attendance"| node_ojt
node_accounts -->|"has memberships"| node_organizations
node_org_access -.->|"manages access"| node_organizations
node_subscriptions -->|"starts and verifies checkout"| node_subscription_service
node_admin -.->|"administers"| node_organizations

click node_app "https://github.com/king130/capstone/blob/main/src/main.ts"
click node_routing "https://github.com/king130/capstone/blob/main/src/router/index.ts"
click node_auth "https://github.com/king130/capstone/blob/main/src/stores/auth.ts"
click node_auth_service "https://github.com/king130/capstone/blob/main/src/services/auth.ts"
click node_directory "https://github.com/king130/capstone/blob/main/src/composables/browseDirectory/useBrowseDirectory.ts"
click node_internships "https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/InternshipController.php"
click node_eligibility "https://github.com/king130/capstone/blob/main/backend/app/Services/InternshipEligibilityService.php"
click node_applications "https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/ApplicationController.php"
click node_application_record "https://github.com/king130/capstone/blob/main/backend/app/Models/Application.php"
click node_tracker "https://github.com/king130/capstone/blob/main/backend/app/Services/ApplicationTracker.php"
click node_hours_agreement "https://github.com/king130/capstone/blob/main/backend/app/Services/HoursAgreementService.php"
click node_agreement_record "https://github.com/king130/capstone/blob/main/backend/app/Models/ApplicationHoursAgreement.php"
click node_placement_schedule "https://github.com/king130/capstone/blob/main/backend/app/Services/PlacementScheduleService.php"
click node_ojt "https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/OjtAttendanceController.php"
click node_ojt_frontend "https://github.com/king130/capstone/blob/main/src/services/ojtService.ts"
click node_accounts "https://github.com/king130/capstone/blob/main/backend/app/Models/User.php"
click node_organizations "https://github.com/king130/capstone/blob/main/backend/app/Models/Organization.php"
click node_org_access "https://github.com/king130/capstone/blob/main/src/components/OrganizationAccessManager.vue"
click node_subscriptions "https://github.com/king130/capstone/blob/main/src/components/SubscriptionManager.vue"
click node_subscription_service "https://github.com/king130/capstone/blob/main/src/services/subscriptions.ts"
click node_admin "https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/AdminController.php"

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,node_routing,node_auth,node_auth_service toneBlue
class node_directory,node_internships,node_eligibility toneAmber
class node_applications,node_application_record,node_tracker,node_hours_agreement,node_agreement_record,node_placement_schedule toneMint
class node_ojt,node_ojt_frontend toneRose
class node_accounts,node_organizations,node_org_access,node_subscriptions,node_subscription_service,node_admin,node_user toneIndigo
```

## Components

### Application entry

- [Vue application](https://github.com/king130/capstone/blob/main/src/main.ts): `src/main.ts`
- [Role-based routing](https://github.com/king130/capstone/blob/main/src/router/index.ts): `src/router/index.ts`
- [Authentication state](https://github.com/king130/capstone/blob/main/src/stores/auth.ts): `src/stores/auth.ts`
- [Auth API service](https://github.com/king130/capstone/blob/main/src/services/auth.ts): `src/services/auth.ts`

### Internship opportunities

- [Opportunity directory](https://github.com/king130/capstone/blob/main/src/composables/browseDirectory/useBrowseDirectory.ts): `src/composables/browseDirectory/useBrowseDirectory.ts`
- [Internship listings](https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/InternshipController.php): `backend/app/Http/Controllers/InternshipController.php`
- [Internship eligibility](https://github.com/king130/capstone/blob/main/backend/app/Services/InternshipEligibilityService.php): `backend/app/Services/InternshipEligibilityService.php`

### Application and placement

- [Applications](https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/ApplicationController.php): `backend/app/Http/Controllers/ApplicationController.php`
- [Application records](https://github.com/king130/capstone/blob/main/backend/app/Models/Application.php): `backend/app/Models/Application.php`
- [Application progress](https://github.com/king130/capstone/blob/main/backend/app/Services/ApplicationTracker.php): `backend/app/Services/ApplicationTracker.php`
- [Hours agreements](https://github.com/king130/capstone/blob/main/backend/app/Services/HoursAgreementService.php): `backend/app/Services/HoursAgreementService.php`
- [Agreement records](https://github.com/king130/capstone/blob/main/backend/app/Models/ApplicationHoursAgreement.php): `backend/app/Models/ApplicationHoursAgreement.php`
- [Placement schedules](https://github.com/king130/capstone/blob/main/backend/app/Services/PlacementScheduleService.php): `backend/app/Services/PlacementScheduleService.php`

### OJT tracking

- [OJT attendance and logs](https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/OjtAttendanceController.php): `backend/app/Http/Controllers/OjtAttendanceController.php`
- [OJT interface services](https://github.com/king130/capstone/blob/main/src/services/ojtService.ts): `src/services/ojtService.ts`

### Organizations and platform

- [User and student accounts](https://github.com/king130/capstone/blob/main/backend/app/Models/User.php): `backend/app/Models/User.php`
- [Organization profiles](https://github.com/king130/capstone/blob/main/backend/app/Models/Organization.php): `backend/app/Models/Organization.php`
- [Organization access](https://github.com/king130/capstone/blob/main/src/components/OrganizationAccessManager.vue): `src/components/OrganizationAccessManager.vue`
- [Subscription management](https://github.com/king130/capstone/blob/main/src/components/SubscriptionManager.vue): `src/components/SubscriptionManager.vue`
- [Subscription checkout API](https://github.com/king130/capstone/blob/main/src/services/subscriptions.ts): `src/services/subscriptions.ts`
- [Administration](https://github.com/king130/capstone/blob/main/backend/app/Http/Controllers/AdminController.php): `backend/app/Http/Controllers/AdminController.php`

### Other components

- **Students and staff**

## Connections

- Students and staff → Vue application: uses
- Vue application → Role-based routing: installs (evidence: `src/main.ts`)
- Vue application → Authentication state: initializes (evidence: `src/main.ts`)
- Role-based routing → Authentication state: checks access (evidence: `src/router/index.ts`)
- Authentication state → Auth API service: authenticates (evidence: `src/stores/auth.ts`)
- Opportunity directory → Internship listings: loads opportunities (evidence: `src/composables/browseDirectory/useBrowseDirectory.ts`)
- Internship listings → Internship eligibility: checks eligibility (evidence: `backend/app/Http/Controllers/InternshipController.php`)
- Applications → Application records: creates and updates (evidence: `backend/app/Http/Controllers/ApplicationController.php`)
- Applications → Internship eligibility: checks eligibility (evidence: `backend/app/Http/Controllers/ApplicationController.php`)
- Applications → Application progress: updates progress (evidence: `backend/app/Http/Controllers/ApplicationController.php`)
- Applications → Hours agreements: coordinates terms (evidence: `backend/app/Http/Controllers/ApplicationController.php`)
- Application records → Agreement records: has agreement (evidence: `backend/app/Models/Application.php`)
- Applications → Placement schedules: manages schedules
- OJT interface services → OJT attendance and logs: submits attendance
- User and student accounts → Organization profiles: has memberships (evidence: `backend/app/Models/User.php`)
- Organization access → Organization profiles: manages access
- Subscription management → Subscription checkout API: starts and verifies checkout (evidence: `src/components/SubscriptionManager.vue`)
- Administration → Organization profiles: administers
