# christianparanas/capstone-frontend architecture

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

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

## Overview

EVSU Election System is an Angular frontend for student elections and related campus features, with distinct student, faculty, and administrator experiences. Users authenticate into role-specific areas; students can participate in elections and polls and access vote receipts, while faculty and administrators have election oversight and setup capabilities. The application also exposes messaging, notifications, and social features. HTTP services target a backend configured by the environment, and the student event service uses Socket.IO. Only selected source was sampled, so links between individual pages and services are omitted where their calls cannot be confirmed.

Main entry points: [`src/app/core/pages/login/login.component.ts`](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/pages/login/login.component.ts) (Login and signup), [`src/app/core/shared/services/auth.service.ts`](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/services/auth.service.ts) (Authentication), [`src/app/modules/student/shared/services/election.service.ts`](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/shared/services/election.service.ts) (Student election API), [`src/app/modules/faculty/shared/services/election.service.ts`](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/shared/services/election.service.ts) (Faculty election API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_login["Login and signup<br/>[login.component.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_student_guard["Student access<br/>[student.guard.ts]"]
  node_faculty_guard["Faculty access<br/>[faculty.guard.ts]"]
  node_admin_guard["Admin access<br/>[admin.guard.ts]"]
end

subgraph group_elections["Election workflows"]
  node_student_elections["Browse and vote"]
  node_student_election_service["Student election API"]
  node_receipts["Vote receipts"]
  node_faculty_elections["Election oversight"]
  node_faculty_election_service["Faculty election API"]
  node_admin_elections["Election setup"]
  node_admin_election_service["Admin election API"]
end

subgraph group_operations["Role operations"]
  node_student_features["Polls and account<br/>[polls.component.ts]"]
  node_faculty_features["Polls and voters<br/>[poll.component.ts]"]
  node_admin_features["Users and reports"]
end

subgraph group_community["Community"]
  node_chat["Messages and chat"]
  node_events["Live event client<br/>[event.service.ts]"]
end

node_student(("Student"))
node_faculty(("Faculty"))
node_administrator(("Administrator"))
node_backend{{"Application backend"}}
node_socket_server{{"Socket.IO service"}}

node_student -->|"signs in"| node_login
node_faculty -->|"signs in"| node_login
node_administrator -->|"signs in"| node_login
node_login -->|"submits credentials"| node_auth
node_auth -->|"sends auth requests"| node_backend
node_student -->|"opens student area"| node_student_guard
node_faculty -->|"opens faculty area"| node_faculty_guard
node_administrator -->|"opens admin area"| node_admin_guard
node_student -->|"browses elections"| node_student_elections
node_student_election_service -->|"requests election data"| node_backend
node_faculty -->|"oversees elections"| node_faculty_elections
node_faculty_election_service -->|"manages election data"| node_backend
node_administrator -->|"sets up elections"| node_admin_elections
node_admin_election_service -->|"manages election data"| node_backend
node_student -->|"views receipts"| node_receipts
node_student -->|"uses campus features"| node_student_features
node_faculty -->|"uses faculty tools"| node_faculty_features
node_administrator -->|"manages platform"| node_admin_features
node_student -->|"opens messages"| node_chat
node_events -->|"exchanges live events"| node_socket_server

click node_login "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/pages/login/login.component.ts"
click node_auth "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/services/auth.service.ts"
click node_student_guard "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/guards/student.guard.ts"
click node_faculty_guard "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/guards/faculty.guard.ts"
click node_admin_guard "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/guards/admin.guard.ts"
click node_student_elections "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/elections/elections.component.ts"
click node_student_election_service "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/shared/services/election.service.ts"
click node_receipts "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/receipts/receipts.component.ts"
click node_faculty_elections "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/pages/elections/elections.component.ts"
click node_faculty_election_service "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/shared/services/election.service.ts"
click node_admin_elections "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/admin/pages/election/election.component.ts"
click node_admin_election_service "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/admin/shared/services/election.service.ts"
click node_student_features "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/polls/polls.component.ts"
click node_faculty_features "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/pages/poll/poll.component.ts"
click node_admin_features "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/admin/pages/dashboard/dashboard.component.ts"
click node_chat "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/messages/messages.component.ts"
click node_events "https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/shared/services/event.service.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_login,node_auth,node_student_guard,node_faculty_guard,node_admin_guard toneBlue
class node_student_elections,node_student_election_service,node_receipts,node_faculty_elections,node_faculty_election_service,node_admin_elections,node_admin_election_service toneAmber
class node_student_features,node_faculty_features,node_admin_features toneMint
class node_chat,node_events toneRose
class node_student,node_faculty,node_administrator,node_backend,node_socket_server toneIndigo
```

## Components

### Access

- [Login and signup](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/pages/login/login.component.ts): `src/app/core/pages/login/login.component.ts`
- [Authentication](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/services/auth.service.ts): `src/app/core/shared/services/auth.service.ts`
- [Student access](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/guards/student.guard.ts): `src/app/core/shared/guards/student.guard.ts`
- [Faculty access](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/guards/faculty.guard.ts): `src/app/core/shared/guards/faculty.guard.ts`
- [Admin access](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/core/shared/guards/admin.guard.ts): `src/app/core/shared/guards/admin.guard.ts`

### Election workflows

- [Browse and vote](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/elections/elections.component.ts): `src/app/modules/student/pages/elections/elections.component.ts`
- [Student election API](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/shared/services/election.service.ts): `src/app/modules/student/shared/services/election.service.ts`
- [Vote receipts](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/receipts/receipts.component.ts): `src/app/modules/student/pages/receipts/receipts.component.ts`
- [Election oversight](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/pages/elections/elections.component.ts): `src/app/modules/faculty/pages/elections/elections.component.ts`
- [Faculty election API](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/shared/services/election.service.ts): `src/app/modules/faculty/shared/services/election.service.ts`
- [Election setup](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/admin/pages/election/election.component.ts): `src/app/modules/admin/pages/election/election.component.ts`
- [Admin election API](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/admin/shared/services/election.service.ts): `src/app/modules/admin/shared/services/election.service.ts`

### Role operations

- [Polls and account](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/polls/polls.component.ts): `src/app/modules/student/pages/polls/polls.component.ts`
- [Polls and voters](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/faculty/pages/poll/poll.component.ts): `src/app/modules/faculty/pages/poll/poll.component.ts`
- [Users and reports](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/admin/pages/dashboard/dashboard.component.ts): `src/app/modules/admin/pages/dashboard/dashboard.component.ts`

### Community

- [Messages and chat](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/pages/messages/messages.component.ts): `src/app/modules/student/pages/messages/messages.component.ts`
- [Live event client](https://github.com/christianparanas/capstone-frontend/blob/master/src/app/modules/student/shared/services/event.service.ts): `src/app/modules/student/shared/services/event.service.ts`

### Other components

- **Student**
- **Faculty**
- **Administrator**
- **Application backend**
- **Socket.IO service**

## Connections

- Student → Login and signup: signs in
- Faculty → Login and signup: signs in
- Administrator → Login and signup: signs in
- Login and signup → Authentication: submits credentials
- Authentication → Application backend: sends auth requests
- Student → Student access: opens student area
- Faculty → Faculty access: opens faculty area
- Administrator → Admin access: opens admin area
- Student → Browse and vote: browses elections
- Student election API → Application backend: requests election data
- Faculty → Election oversight: oversees elections
- Faculty election API → Application backend: manages election data
- Administrator → Election setup: sets up elections
- Admin election API → Application backend: manages election data
- Student → Vote receipts: views receipts
- Student → Polls and account: uses campus features
- Faculty → Polls and voters: uses faculty tools
- Administrator → Users and reports: manages platform
- Student → Messages and chat: opens messages
- Live event client → Socket.IO service: exchanges live events
