# mihaelaaa-23/pad-student-id-please architecture

> Architecture diagram of the GitHub repository mihaelaaa-23/pad-student-id-please, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mihaelaaa-23/pad-student-id-please
- Repository: https://github.com/mihaelaaa-23/pad-student-id-please

## Overview

Student ID, Please is a Discord-server moderation game organized as microservices. A shift brings players together to review generated applicants: they check credentials, hidden university records, and current server rules; a moderator then decides Accept, Reject, Flag, or Ban. The session service coordinates the shift, and its result feeds player progression. The README documents the service boundaries and integrations, but service implementations were not sampled, so edges reflect only those documented relationships.

Main entry points: [`services/server-moderation-session-service`](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/server-moderation-session-service) (Session Service), [`services/applicant-service`](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/applicant-service) (Applicant Service), [`services/moderation-service`](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/moderation-service) (Moderation Service), [`services/credential-service`](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/credential-service) (Credential Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shift["Shift Coordination"]
  node_session["Session Service"]
  node_sessiondb[("Session Store<br/>[init.sql]")]
end

subgraph group_evidence["Applicant Evidence"]
  node_applicant["Applicant Service"]
  node_applicantdb[("Applicant Store<br/>[init.js]")]
  node_credential["Credential Service"]
  node_credentialdb[("Credential Store<br/>[init.js]")]
  node_records["University Records"]
  node_recordsdb[("Records Store<br/>[init.sql]")]
  node_rules["Server Rules"]
  node_rulesdb[("Rules Store<br/>[init.js]")]
end

subgraph group_decisions["Moderation &amp; Communication"]
  node_moderation["Moderation Service"]
  node_moderationdb[("Decision Store<br/>[init.sql]")]
  node_dms["Discord DMs Service"]
  node_dmsdb[("DM Store<br/>[init.js]")]
end

subgraph group_identity["Player Progression"]
  node_player["Player Service"]
  node_playerdb[("Player Store<br/>[init.sql]")]
end

node_players(("Players"))
node_applicants(("Applicants"))

node_players -->|"join shifts"| node_session
node_session -->|"publishes results"| node_players
node_player -->|"coordinates joining"| node_session
node_session -->|"requests applicants"| node_applicant
node_session -->|"requests credentials"| node_credential
node_session -->|"requests rule checks"| node_rules
node_session -->|"requests records"| node_records
node_applicants -->|"profile input"| node_applicant
node_applicant -->|"propagates shared data"| node_credential
node_applicant -->|"propagates shared data"| node_records
node_credential -->|"initializes shared data"| node_applicant
node_credential -->|"propagates shared data"| node_records
node_moderation -->|"gathers profile"| node_applicant
node_moderation -->|"gathers credentials"| node_credential
node_moderation -->|"gathers rule results"| node_rules
node_moderation -->|"gathers records"| node_records
node_moderation -->|"posts verdicts"| node_dms
node_session -->|"sends shift results"| node_player
node_applicant -->|"reads/writes profiles"| node_applicantdb
node_credential -->|"reads/writes credentials"| node_credentialdb
node_records -->|"reads/writes records"| node_recordsdb
node_rules -->|"reads/writes rules"| node_rulesdb
node_session -->|"reads/writes shifts"| node_sessiondb
node_moderation -->|"records decisions"| node_moderationdb
node_dms -->|"reads/writes messages"| node_dmsdb
node_player -->|"reads/writes progression"| node_playerdb

click node_session "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/server-moderation-session-service"
click node_sessiondb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/session-service/init.sql"
click node_applicant "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/applicant-service"
click node_applicantdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/applicant-service/init.js"
click node_credential "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/credential-service"
click node_credentialdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/credential-service/init.js"
click node_records "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/university-record-service"
click node_recordsdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/university-record-service/init.sql"
click node_rules "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/server-rules-service"
click node_rulesdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/server-rules-service/init.js"
click node_moderation "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/moderation-service"
click node_moderationdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/moderation-service/init.sql"
click node_dms "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/discord-dms-service"
click node_dmsdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/discord-dms-service/init.js"
click node_player "https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/player-service"
click node_playerdb "https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/player-service/init.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_session,node_sessiondb toneBlue
class node_applicant,node_applicantdb,node_credential,node_credentialdb,node_records,node_recordsdb,node_rules,node_rulesdb toneAmber
class node_moderation,node_moderationdb,node_dms,node_dmsdb toneMint
class node_player,node_playerdb toneRose
class node_players,node_applicants toneIndigo
```

## Components

### Shift Coordination

- [Session Service](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/server-moderation-session-service): `services/server-moderation-session-service`
- [Session Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/session-service/init.sql): `db/session-service/init.sql`

### Applicant Evidence

- [Applicant Service](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/applicant-service): `services/applicant-service`
- [Applicant Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/applicant-service/init.js): `db/applicant-service/init.js`
- [Credential Service](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/credential-service): `services/credential-service`
- [Credential Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/credential-service/init.js): `db/credential-service/init.js`
- [University Records](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/university-record-service): `services/university-record-service`
- [Records Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/university-record-service/init.sql): `db/university-record-service/init.sql`
- [Server Rules](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/server-rules-service): `services/server-rules-service`
- [Rules Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/server-rules-service/init.js): `db/server-rules-service/init.js`

### Moderation & Communication

- [Moderation Service](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/moderation-service): `services/moderation-service`
- [Decision Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/moderation-service/init.sql): `db/moderation-service/init.sql`
- [Discord DMs Service](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/discord-dms-service): `services/discord-dms-service`
- [DM Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/discord-dms-service/init.js): `db/discord-dms-service/init.js`

### Player Progression

- [Player Service](https://github.com/mihaelaaa-23/pad-student-id-please/tree/dev/services/player-service): `services/player-service`
- [Player Store](https://github.com/mihaelaaa-23/pad-student-id-please/blob/dev/db/player-service/init.sql): `db/player-service/init.sql`

### Other components

- **Players**
- **Applicants**

## Connections

- Players → Session Service: join shifts
- Session Service → Players: publishes results
- Player Service → Session Service: coordinates joining
- Session Service → Applicant Service: requests applicants
- Session Service → Credential Service: requests credentials
- Session Service → Server Rules: requests rule checks
- Session Service → University Records: requests records
- Applicants → Applicant Service: profile input
- Applicant Service → Credential Service: propagates shared data
- Applicant Service → University Records: propagates shared data
- Credential Service → Applicant Service: initializes shared data
- Credential Service → University Records: propagates shared data
- Moderation Service → Applicant Service: gathers profile
- Moderation Service → Credential Service: gathers credentials
- Moderation Service → Server Rules: gathers rule results
- Moderation Service → University Records: gathers records
- Moderation Service → Discord DMs Service: posts verdicts
- Session Service → Player Service: sends shift results
- Applicant Service → Applicant Store: reads/writes profiles
- Credential Service → Credential Store: reads/writes credentials
- University Records → Records Store: reads/writes records
- Server Rules → Rules Store: reads/writes rules
- Session Service → Session Store: reads/writes shifts
- Moderation Service → Decision Store: records decisions
- Discord DMs Service → DM Store: reads/writes messages
- Player Service → Player Store: reads/writes progression
