# g6-pnc-studend-score/g6-pnc-studend-score-front architecture

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

- Interactive diagram: https://gitdiagram.com/g6-pnc-studend-score/g6-pnc-studend-score-front
- Repository: https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front

## Overview

This Vue SPA supports school staff managing academic records and students viewing their own results. The principal workflow is authenticated navigation into student/class/subject setup, score entry, and reporting; a separate student portal presents scores and transcripts. Views call domain services through the shared Axios client, while Pinia stores hold cross-page state. The README documents Google Sheets score integration and administration features; some links are omitted because their view implementations were not sampled.

Main entry points: [`src/router/routes.ts`](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/router/routes.ts) (Route map), [`src/stores/auth.ts`](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/stores/auth.ts) (Auth state), [`src/services/apiHttp.ts`](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/apiHttp.ts) (HTTP client), [`src/views/students/composables/useStudents.ts`](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/students/composables/useStudents.ts) (Student operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Shell &amp; Access"]
  node_app_shell["App shell<br/>[App.vue]"]
  node_routes["Route guards<br/>[index.ts]"]
  node_route_map["Route map<br/>[routes.ts]"]
  node_auth_pages["Sign-in<br/>[LoginPage.vue]"]
  node_main_layout["Protected layout<br/>[MainLayout.vue]"]
end

subgraph group_records["Academic Records"]
  node_student_admin["Student management<br/>[StudentPage.vue]"]
  node_student_logic["Student operations<br/>[useStudents.ts]"]
  node_student_api["Student API<br/>[studentService.ts]"]
  node_class_page["Class management<br/>[ClassPage.vue]"]
  node_subject_page["Subject management<br/>[SubjectPage.vue]"]
  node_teacher_page["Teacher management<br/>[TeacherPage.vue]"]
end

subgraph group_assessment["Scores &amp; Reporting"]
  node_score_page["Score navigation<br/>[ScorePage.vue]"]
  node_term_view["Term subjects"]
  node_score_sheet["Score sheet<br/>[ScoreSheetView.vue]"]
  node_score_api["Score service<br/>[scoreService.ts]"]
  node_google_modal["Sheets integration"]
  node_dashboard["Dashboard<br/>[DashboardView.vue]"]
  node_reports["Reports<br/>[ReportPage.vue]"]
  node_report_export["Report export<br/>[reportExport.ts]"]
  node_portal["Student portal"]
  node_portal_scores["Student scores"]
  node_transcript["Transcript"]
end

subgraph group_identity["Users &amp; Policy"]
  node_users_roles["Users &amp; roles<br/>[RolesPage.vue]"]
  node_user_admin["User management<br/>[UsersPage.vue]"]
  node_profile["Profile<br/>[UserProfile.vue]"]
  node_activity["Activity logs"]
end

subgraph group_shared["API &amp; State"]
  node_auth_store["Auth state<br/>[auth.ts]"]
  node_auth_service["Authentication API<br/>[authService.ts]"]
  node_http["HTTP client<br/>[apiHttp.ts]"]
  node_toast["Toast state<br/>[useToast.ts]"]
end

node_staff(("Staff"))
node_student_actor(("Student"))
node_backend["Laravel API"]
node_google["Google Sheets"]

node_staff -->|"signs in"| node_auth_pages
node_student_actor -->|"signs in"| node_auth_pages
node_auth_pages -.->|"authenticates"| node_auth_store
node_auth_store -->|"calls"| node_auth_service
node_auth_store -->|"sets token"| node_http
node_routes -->|"loads routes"| node_route_map
node_routes -->|"checks access"| node_auth_store
node_route_map -->|"routes through"| node_main_layout
node_route_map -->|"routes to"| node_student_admin
node_route_map -->|"routes to"| node_class_page
node_route_map -->|"routes to"| node_subject_page
node_route_map -->|"routes to"| node_teacher_page
node_route_map -->|"routes to"| node_score_page
node_route_map -->|"routes to"| node_term_view
node_route_map -->|"routes to"| node_score_sheet
node_route_map -->|"routes to"| node_dashboard
node_route_map -->|"routes to"| node_reports
node_route_map -->|"routes to"| node_portal
node_route_map -->|"routes to"| node_portal_scores
node_route_map -->|"routes to"| node_transcript
node_app_shell -->|"renders"| node_toast
node_student_admin -.->|"uses"| node_student_logic
node_student_logic -->|"calls"| node_student_api
node_student_logic -->|"notifies"| node_toast
node_score_sheet -->|"calls"| node_score_api
node_google_modal -->|"calls"| node_score_api
node_score_api -->|"sends requests"| node_http
node_auth_service -->|"sends requests"| node_http
node_student_api -->|"sends requests"| node_http
node_http -->|"REST requests"| node_backend
node_google_modal -.->|"integrates"| node_google
node_reports -.->|"exports"| node_report_export
node_profile -->|"reads identity"| node_auth_store
node_users_roles -.->|"reads theme"| node_auth_store
node_user_admin -->|"checks permission"| node_auth_store
node_teacher_page -->|"checks permission"| node_auth_store

click node_app_shell "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/App.vue"
click node_routes "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/router/index.ts"
click node_route_map "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/router/routes.ts"
click node_auth_pages "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/auth/LoginPage.vue"
click node_main_layout "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/layouts/MainLayout.vue"
click node_student_admin "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/students/StudentPage.vue"
click node_student_logic "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/students/composables/useStudents.ts"
click node_student_api "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/studentService.ts"
click node_class_page "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/classes/ClassPage.vue"
click node_subject_page "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/SubjectPage.vue"
click node_teacher_page "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/teachers/TeacherPage.vue"
click node_score_page "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/scores/ScorePage.vue"
click node_term_view "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/scores/TermSubjectsView.vue"
click node_score_sheet "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/scores/ScoreSheetView.vue"
click node_score_api "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/scoreService.ts"
click node_google_modal "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/components/GoogleSheetsModal.vue"
click node_dashboard "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/DashboardView.vue"
click node_reports "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/reports/ReportPage.vue"
click node_report_export "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/utils/reportExport.ts"
click node_portal "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/portal/StudentPortalPage.vue"
click node_portal_scores "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/portal/StudentScoresPage.vue"
click node_transcript "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/portal/StudentTranscriptPage.vue"
click node_users_roles "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/roles/RolesPage.vue"
click node_user_admin "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/users/UsersPage.vue"
click node_profile "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/UserProfile.vue"
click node_activity "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/activity/ActivityLogPage.vue"
click node_auth_store "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/stores/auth.ts"
click node_auth_service "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/authService.ts"
click node_http "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/apiHttp.ts"
click node_toast "https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/composables/useToast.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_app_shell,node_routes,node_route_map,node_auth_pages,node_main_layout toneBlue
class node_student_admin,node_student_logic,node_student_api,node_class_page,node_subject_page,node_teacher_page toneAmber
class node_score_page,node_term_view,node_score_sheet,node_score_api,node_google_modal,node_dashboard,node_reports,node_report_export,node_portal,node_portal_scores,node_transcript,node_backend toneMint
class node_users_roles,node_user_admin,node_profile,node_activity toneRose
class node_auth_store,node_auth_service,node_http,node_toast,node_staff,node_student_actor,node_google toneIndigo
```

## Components

### Shell & Access

- [App shell](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/App.vue): `src/App.vue`
- [Route guards](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/router/index.ts): `src/router/index.ts`
- [Route map](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/router/routes.ts): `src/router/routes.ts`
- [Sign-in](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/auth/LoginPage.vue): `src/views/auth/LoginPage.vue`
- [Protected layout](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/layouts/MainLayout.vue): `src/layouts/MainLayout.vue`

### Academic Records

- [Student management](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/students/StudentPage.vue): `src/views/students/StudentPage.vue`
- [Student operations](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/students/composables/useStudents.ts): `src/views/students/composables/useStudents.ts`
- [Student API](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/studentService.ts): `src/services/studentService.ts`
- [Class management](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/classes/ClassPage.vue): `src/views/classes/ClassPage.vue`
- [Subject management](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/SubjectPage.vue): `src/views/SubjectPage.vue`
- [Teacher management](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/teachers/TeacherPage.vue): `src/views/teachers/TeacherPage.vue`

### Scores & Reporting

- [Score navigation](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/scores/ScorePage.vue): `src/views/scores/ScorePage.vue`
- [Term subjects](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/scores/TermSubjectsView.vue): `src/views/scores/TermSubjectsView.vue`
- [Score sheet](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/scores/ScoreSheetView.vue): `src/views/scores/ScoreSheetView.vue`
- [Score service](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/scoreService.ts): `src/services/scoreService.ts`
- [Sheets integration](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/components/GoogleSheetsModal.vue): `src/components/GoogleSheetsModal.vue`
- [Dashboard](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/DashboardView.vue): `src/views/DashboardView.vue`
- [Reports](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/reports/ReportPage.vue): `src/views/reports/ReportPage.vue`
- [Report export](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/utils/reportExport.ts): `src/utils/reportExport.ts`
- [Student portal](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/portal/StudentPortalPage.vue): `src/views/portal/StudentPortalPage.vue`
- [Student scores](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/portal/StudentScoresPage.vue): `src/views/portal/StudentScoresPage.vue`
- [Transcript](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/portal/StudentTranscriptPage.vue): `src/views/portal/StudentTranscriptPage.vue`

### Users & Policy

- [Users & roles](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/roles/RolesPage.vue): `src/views/roles/RolesPage.vue`
- [User management](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/users/UsersPage.vue): `src/views/users/UsersPage.vue`
- [Profile](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/UserProfile.vue): `src/views/UserProfile.vue`
- [Activity logs](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/views/activity/ActivityLogPage.vue): `src/views/activity/ActivityLogPage.vue`

### API & State

- [Auth state](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/stores/auth.ts): `src/stores/auth.ts`
- [Authentication API](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [HTTP client](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/services/apiHttp.ts): `src/services/apiHttp.ts`
- [Toast state](https://github.com/g6-pnc-studend-score/g6-pnc-studend-score-front/blob/main/src/composables/useToast.ts): `src/composables/useToast.ts`

### Other components

- **Staff**
- **Student**
- **Laravel API**
- **Google Sheets**

## Connections

- Staff → Sign-in: signs in
- Student → Sign-in: signs in
- Sign-in → Auth state: authenticates
- Auth state → Authentication API: calls (evidence: `src/stores/auth.ts`)
- Auth state → HTTP client: sets token (evidence: `src/stores/auth.ts`)
- Route guards → Route map: loads routes (evidence: `src/router/index.ts`)
- Route guards → Auth state: checks access (evidence: `src/router/index.ts`)
- Route map → Protected layout: routes through (evidence: `src/router/routes.ts`)
- Route map → Student management: routes to (evidence: `src/router/routes.ts`)
- Route map → Class management: routes to (evidence: `src/router/routes.ts`)
- Route map → Subject management: routes to (evidence: `src/router/routes.ts`)
- Route map → Teacher management: routes to (evidence: `src/router/routes.ts`)
- Route map → Score navigation: routes to (evidence: `src/router/routes.ts`)
- Route map → Term subjects: routes to (evidence: `src/router/routes.ts`)
- Route map → Score sheet: routes to (evidence: `src/router/routes.ts`)
- Route map → Dashboard: routes to (evidence: `src/router/routes.ts`)
- Route map → Reports: routes to (evidence: `src/router/routes.ts`)
- Route map → Student portal: routes to (evidence: `src/router/routes.ts`)
- Route map → Student scores: routes to (evidence: `src/router/routes.ts`)
- Route map → Transcript: routes to (evidence: `src/router/routes.ts`)
- App shell → Toast state: renders (evidence: `src/App.vue`)
- Student management → Student operations: uses
- Student operations → Student API: calls (evidence: `src/views/students/composables/useStudents.ts`)
- Student operations → Toast state: notifies (evidence: `src/views/students/composables/useStudents.ts`)
- Score sheet → Score service: calls (evidence: `src/views/scores/ScoreSheetView.vue`)
- Sheets integration → Score service: calls (evidence: `src/components/GoogleSheetsModal.vue`)
- Score service → HTTP client: sends requests (evidence: `src/services/scoreService.ts`)
- Authentication API → HTTP client: sends requests (evidence: `src/services/authService.ts`)
- Student API → HTTP client: sends requests (evidence: `src/services/studentService.ts`)
- HTTP client → Laravel API: REST requests (evidence: `src/services/apiHttp.ts`)
- Sheets integration → Google Sheets: integrates
- Reports → Report export: exports
- Profile → Auth state: reads identity (evidence: `src/views/UserProfile.vue`)
- Users & roles → Auth state: reads theme
- User management → Auth state: checks permission (evidence: `src/views/users/UsersPage.vue`)
- Teacher management → Auth state: checks permission (evidence: `src/views/teachers/TeacherPage.vue`)
