# stefanzmija/ticketing-system-ipnks architecture

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

- Interactive diagram: https://gitdiagram.com/stefanzmija/ticketing-system-ipnks
- Repository: https://github.com/stefanzmija/ticketing-system-ipnks

## Overview

FINKI student-services ticketing app: students register, submit and track requests; staff triage, assign, reply and update them; admins manage roles. Angular route components call ticket and identity services, which use Supabase for Auth, Postgres and Realtime. Database SQL defines schema and access rules. The README documents filtering, live updates and keyboard shortcuts; some feature implementations and SQL were not excerpted, so those links rely on README documentation rather than assumed calls.

Main entry points: [`src/app/app.routes.ts`](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/app.routes.ts) (App routes), [`src/app/core/auth.service.ts`](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/auth.service.ts) (Authentication), [`src/app/features/tickets/ticket-list/ticket-list.ts`](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/ticket-list/ticket-list.ts) (Ticket dashboard), [`src/app/features/tickets/ticket-detail/ticket-detail.ts`](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/ticket-detail/ticket-detail.ts) (Ticket conversation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Angular experience"]
  node_routes["App routes<br/>[app.routes.ts]"]
  node_home["Home and contact"]
end

subgraph group_identity["Identity and access"]
  node_authpages["Login and register"]
  node_authlayout["Auth layout<br/>[auth-layout.ts]"]
  node_authservice["Authentication<br/>[auth.service.ts]"]
  node_guards["Route guards<br/>[auth.guard.ts]"]
  node_profiles["Profile service"]
  node_users["User roles<br/>[users.ts]"]
end

subgraph group_tickets["Ticket workflows"]
  node_ticketlist["Ticket dashboard<br/>[ticket-list.ts]"]
  node_ticketcreate["Ticket creation"]
  node_ticketdetail["Ticket conversation<br/>[ticket-detail.ts]"]
  node_ticketservice["Ticket service<br/>[tickets.service.ts]"]
  node_models["Domain models"]
end

subgraph group_backend["Supabase backend"]
  node_supabaseclient["Supabase client<br/>[supabase.client.ts]"]
  node_database[("Ticket database<br/>[01_schema.sql]")]
  node_rules["Access and realtime rules"]
end

node_student(("Student"))
node_staff(("Staff"))
node_admin(("Admin"))
node_supabase["Supabase"]

node_student -->|"uses"| node_routes
node_staff -->|"uses"| node_routes
node_admin -->|"uses"| node_routes
node_routes -->|"routes to"| node_authpages
node_routes -->|"routes to"| node_ticketlist
node_routes -->|"routes to"| node_ticketcreate
node_routes -->|"routes to"| node_ticketdetail
node_routes -->|"guards route"| node_users
node_authpages -->|"uses"| node_authlayout
node_authpages -->|"calls"| node_authservice
node_authservice -->|"uses"| node_supabaseclient
node_authservice -->|"loads profiles"| node_profiles
node_guards -->|"checks session"| node_authservice
node_users -->|"manages"| node_profiles
node_ticketlist -->|"loads and watches"| node_ticketservice
node_ticketcreate -->|"creates tickets"| node_ticketservice
node_ticketdetail -->|"reads and updates"| node_ticketservice
node_ticketlist -->|"uses"| node_models
node_ticketdetail -->|"uses"| node_models
node_ticketservice -->|"queries through"| node_supabaseclient
node_supabaseclient -->|"configures"| node_supabase
node_supabase -->|"stores ticket data"| node_database
node_supabase -->|"enforces policies and realtime"| node_rules
node_home -->|"reads identity"| node_authservice
node_student -->|"submits request"| node_ticketcreate
node_staff -->|"triages requests"| node_ticketlist
node_staff -->|"replies and updates"| node_ticketdetail
node_admin -->|"manages roles"| node_users

click node_routes "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/app.routes.ts"
click node_home "https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/features/home"
click node_authpages "https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/features/auth"
click node_authlayout "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/auth/auth-layout/auth-layout.ts"
click node_authservice "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/auth.service.ts"
click node_guards "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/guards/auth.guard.ts"
click node_profiles "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/profiles.service.ts"
click node_users "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/admin/users/users.ts"
click node_ticketlist "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/ticket-list/ticket-list.ts"
click node_ticketcreate "https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/features/tickets/ticket-create"
click node_ticketdetail "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/ticket-detail/ticket-detail.ts"
click node_ticketservice "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/tickets.service.ts"
click node_models "https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/core/models"
click node_supabaseclient "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/supabase.client.ts"
click node_database "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/supabase/01_schema.sql"
click node_rules "https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/supabase/02_rules_and_realtime.sql"

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_routes,node_home toneBlue
class node_authpages,node_authlayout,node_authservice,node_guards,node_profiles,node_users toneAmber
class node_ticketlist,node_ticketcreate,node_ticketdetail,node_ticketservice,node_models toneMint
class node_supabaseclient,node_database,node_rules toneRose
class node_student,node_staff,node_admin,node_supabase toneIndigo
```

## Components

### Angular experience

- [App routes](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Home and contact](https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/features/home): `src/app/features/home`

### Identity and access

- [Login and register](https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/features/auth): `src/app/features/auth`
- [Auth layout](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/auth/auth-layout/auth-layout.ts): `src/app/features/auth/auth-layout/auth-layout.ts`
- [Authentication](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/auth.service.ts): `src/app/core/auth.service.ts`
- [Route guards](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/guards/auth.guard.ts): `src/app/core/guards/auth.guard.ts`
- [Profile service](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/profiles.service.ts): `src/app/core/profiles.service.ts`
- [User roles](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/admin/users/users.ts): `src/app/features/admin/users/users.ts`

### Ticket workflows

- [Ticket dashboard](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/ticket-list/ticket-list.ts): `src/app/features/tickets/ticket-list/ticket-list.ts`
- [Ticket creation](https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/features/tickets/ticket-create): `src/app/features/tickets/ticket-create`
- [Ticket conversation](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/ticket-detail/ticket-detail.ts): `src/app/features/tickets/ticket-detail/ticket-detail.ts`
- [Ticket service](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/features/tickets/tickets.service.ts): `src/app/features/tickets/tickets.service.ts`
- [Domain models](https://github.com/stefanzmija/ticketing-system-ipnks/tree/main/src/app/core/models): `src/app/core/models`

### Supabase backend

- [Supabase client](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/src/app/core/supabase.client.ts): `src/app/core/supabase.client.ts`
- [Ticket database](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/supabase/01_schema.sql): `supabase/01_schema.sql`
- [Access and realtime rules](https://github.com/stefanzmija/ticketing-system-ipnks/blob/main/supabase/02_rules_and_realtime.sql): `supabase/02_rules_and_realtime.sql`

### Other components

- **Student**
- **Staff**
- **Admin**
- **Supabase**

## Connections

- Student → App routes: uses (evidence: `README.md`)
- Staff → App routes: uses (evidence: `README.md`)
- Admin → App routes: uses (evidence: `README.md`)
- App routes → Login and register: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Ticket dashboard: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Ticket creation: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Ticket conversation: routes to (evidence: `src/app/app.routes.ts`)
- App routes → User roles: guards route (evidence: `src/app/app.routes.ts`)
- Login and register → Auth layout: uses (evidence: `src/app/features/auth/login/login.ts`)
- Login and register → Authentication: calls (evidence: `src/app/features/auth/login/login.ts`)
- Authentication → Supabase client: uses (evidence: `src/app/core/auth.service.ts`)
- Authentication → Profile service: loads profiles (evidence: `src/app/core/auth.service.ts`)
- Route guards → Authentication: checks session (evidence: `src/app/core/guards/auth.guard.ts`)
- User roles → Profile service: manages (evidence: `src/app/features/admin/users/users.ts`)
- Ticket dashboard → Ticket service: loads and watches (evidence: `src/app/features/tickets/ticket-list/ticket-list.ts`)
- Ticket creation → Ticket service: creates tickets (evidence: `src/app/features/tickets/ticket-create/ticket-create.ts`)
- Ticket conversation → Ticket service: reads and updates (evidence: `src/app/features/tickets/ticket-detail/ticket-detail.ts`)
- Ticket dashboard → Domain models: uses (evidence: `src/app/features/tickets/ticket-list/ticket-list.ts`)
- Ticket conversation → Domain models: uses (evidence: `src/app/features/tickets/ticket-detail/ticket-detail.ts`)
- Ticket service → Supabase client: queries through (evidence: `src/app/features/tickets/tickets.service.ts`)
- Supabase client → Supabase: configures (evidence: `README.md`)
- Supabase → Ticket database: stores ticket data (evidence: `README.md`)
- Supabase → Access and realtime rules: enforces policies and realtime (evidence: `README.md`)
- Home and contact → Authentication: reads identity (evidence: `src/app/features/home/home.ts`)
- Student → Ticket creation: submits request (evidence: `README.md`)
- Staff → Ticket dashboard: triages requests (evidence: `README.md`)
- Staff → Ticket conversation: replies and updates (evidence: `README.md`)
- Admin → User roles: manages roles (evidence: `README.md`)
