# pausasecurity/pausa architecture

> Architecture diagram of the GitHub repository pausasecurity/pausa, 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/pausasecurity/pausa
- Repository: https://github.com/pausasecurity/pausa

## Overview

PauSa is a gaming-community web app for finding live play sessions and forming lasting groups or clans, with accounts, profiles, friends, messaging, ratings, and age verification. The main workflow is a player browsing a live lobby feed, filtering or joining a lobby, then coordinating in its chat; users can also create or manage groups and clans. The graph reflects sampled call paths and documented module responsibilities; several capabilities are represented by tree-supported paths whose internals were not sampled.

Main entry points: [`src/App.jsx`](https://github.com/pausasecurity/pausa/blob/main/src/App.jsx) (App shell), [`src/services/pocketbase.js`](https://github.com/pausasecurity/pausa/blob/main/src/services/pocketbase.js) (PocketBase client), [`src/context/AuthContext.jsx`](https://github.com/pausasecurity/pausa/blob/main/src/context/AuthContext.jsx) (Auth context), [`src/components/KontoTab.jsx`](https://github.com/pausasecurity/pausa/blob/main/src/components/KontoTab.jsx) (Profile and account)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_app["App shell<br/>[App.jsx]"]
  node_authctx["Auth context<br/>[AuthContext.jsx]"]
  node_verifyctx["Verification context"]
end

subgraph group_play["Play and groups"]
  node_lobbyui["Lobby views<br/>[LobbyCard.jsx]"]
  node_chatui["Lobby chat<br/>[LobbyChat.jsx]"]
  node_lobbyservice["Lobby service<br/>[lobbyService.js]"]
  node_groupui["Group views<br/>[GroupDetail.jsx]"]
  node_groupservice["Group service<br/>[groupService.js]"]
end

subgraph group_community["Community features"]
  node_profileui["Profile and account<br/>[KontoTab.jsx]"]
  node_profile["Profile service<br/>[profileService.js]"]
  node_friends["Friend service<br/>[friendService.js]"]
  node_ratings["Rating service<br/>[ratingService.js]"]
  node_messages["Messages panel<br/>[MessagesPanel.jsx]"]
  node_reports["Report service<br/>[reportService.js]"]
end

subgraph group_platform["Identity and platform"]
  node_authservice["Auth service<br/>[authService.js]"]
  node_verification["Verification service"]
  node_loginalert["Login alert service"]
  node_pbclient["PocketBase client<br/>[pocketbase.js]"]
  node_pbhooks["PocketBase hooks<br/>[main.pb.js]"]
end

node_player(("Player"))
node_pb[("PocketBase")]
node_mail["Email delivery"]

node_player -->|"uses"| node_app
node_app -->|"provides auth"| node_authctx
node_app -->|"provides verification"| node_verifyctx
node_app -->|"renders"| node_lobbyui
node_app -->|"renders"| node_chatui
node_app -->|"renders"| node_messages
node_app -->|"renders"| node_groupui
node_app -->|"renders"| node_profileui
node_app -->|"loads and joins"| node_lobbyservice
node_app -->|"loads groups"| node_groupservice
node_app -->|"loads profile"| node_profile
node_app -->|"loads ratings"| node_ratings
node_authctx -->|"authenticates"| node_authservice
node_authctx -->|"loads profile"| node_profile
node_authctx -->|"checks login location"| node_loginalert
node_authctx -->|"syncs user record"| node_pbclient
node_verifyctx -->|"reads and updates"| node_verification
node_lobbyservice -->|"reads and writes"| node_pbclient
node_groupui -->|"manages groups"| node_groupservice
node_chatui -->|"exchanges chat"| node_lobbyservice
node_messages -->|"uses relationships"| node_friends
node_profileui -->|"edits profile"| node_profile
node_profileui -->|"manages friends"| node_friends
node_profileui -->|"submits ratings"| node_ratings
node_profileui -->|"submits reports"| node_reports
node_authservice -->|"authenticates"| node_pbclient
node_friends -->|"reads and writes"| node_pbclient
node_ratings -->|"reads and writes"| node_pbclient
node_reports -->|"writes reports"| node_pbclient
node_profile -->|"reads and writes"| node_pbclient
node_loginalert -->|"calls login check"| node_pbhooks
node_pbclient -->|"API requests"| node_pb
node_pbhooks -->|"stores login history"| node_pb
node_pbhooks -->|"sends alert"| node_mail
node_pbhooks -->|"cleans expired lobbies"| node_pb

click node_app "https://github.com/pausasecurity/pausa/blob/main/src/App.jsx"
click node_authctx "https://github.com/pausasecurity/pausa/blob/main/src/context/AuthContext.jsx"
click node_verifyctx "https://github.com/pausasecurity/pausa/blob/main/src/context/VerificationContext.jsx"
click node_lobbyui "https://github.com/pausasecurity/pausa/blob/main/src/components/LobbyCard.jsx"
click node_chatui "https://github.com/pausasecurity/pausa/blob/main/src/components/LobbyChat.jsx"
click node_lobbyservice "https://github.com/pausasecurity/pausa/blob/main/src/services/lobbyService.js"
click node_groupui "https://github.com/pausasecurity/pausa/blob/main/src/components/GroupDetail.jsx"
click node_groupservice "https://github.com/pausasecurity/pausa/blob/main/src/services/groupService.js"
click node_profileui "https://github.com/pausasecurity/pausa/blob/main/src/components/KontoTab.jsx"
click node_profile "https://github.com/pausasecurity/pausa/blob/main/src/services/profileService.js"
click node_friends "https://github.com/pausasecurity/pausa/blob/main/src/services/friendService.js"
click node_ratings "https://github.com/pausasecurity/pausa/blob/main/src/services/ratingService.js"
click node_messages "https://github.com/pausasecurity/pausa/blob/main/src/components/MessagesPanel.jsx"
click node_reports "https://github.com/pausasecurity/pausa/blob/main/src/services/reportService.js"
click node_authservice "https://github.com/pausasecurity/pausa/blob/main/src/services/authService.js"
click node_verification "https://github.com/pausasecurity/pausa/blob/main/src/services/verificationService.js"
click node_loginalert "https://github.com/pausasecurity/pausa/blob/main/src/services/loginAlertService.js"
click node_pbclient "https://github.com/pausasecurity/pausa/blob/main/src/services/pocketbase.js"
click node_pbhooks "https://github.com/pausasecurity/pausa/blob/main/pocketbase/pb_hooks/main.pb.js"

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_authctx,node_verifyctx toneBlue
class node_lobbyui,node_chatui,node_lobbyservice,node_groupui,node_groupservice,node_pb toneAmber
class node_profileui,node_profile,node_friends,node_ratings,node_messages,node_reports toneMint
class node_authservice,node_verification,node_loginalert,node_pbclient,node_pbhooks toneRose
class node_player,node_mail toneIndigo
```

## Components

### App experience

- [App shell](https://github.com/pausasecurity/pausa/blob/main/src/App.jsx): `src/App.jsx`
- [Auth context](https://github.com/pausasecurity/pausa/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Verification context](https://github.com/pausasecurity/pausa/blob/main/src/context/VerificationContext.jsx): `src/context/VerificationContext.jsx`

### Play and groups

- [Lobby views](https://github.com/pausasecurity/pausa/blob/main/src/components/LobbyCard.jsx): `src/components/LobbyCard.jsx`
- [Lobby chat](https://github.com/pausasecurity/pausa/blob/main/src/components/LobbyChat.jsx): `src/components/LobbyChat.jsx`
- [Lobby service](https://github.com/pausasecurity/pausa/blob/main/src/services/lobbyService.js): `src/services/lobbyService.js`
- [Group views](https://github.com/pausasecurity/pausa/blob/main/src/components/GroupDetail.jsx): `src/components/GroupDetail.jsx`
- [Group service](https://github.com/pausasecurity/pausa/blob/main/src/services/groupService.js): `src/services/groupService.js`

### Community features

- [Profile and account](https://github.com/pausasecurity/pausa/blob/main/src/components/KontoTab.jsx): `src/components/KontoTab.jsx`
- [Profile service](https://github.com/pausasecurity/pausa/blob/main/src/services/profileService.js): `src/services/profileService.js`
- [Friend service](https://github.com/pausasecurity/pausa/blob/main/src/services/friendService.js): `src/services/friendService.js`
- [Rating service](https://github.com/pausasecurity/pausa/blob/main/src/services/ratingService.js): `src/services/ratingService.js`
- [Messages panel](https://github.com/pausasecurity/pausa/blob/main/src/components/MessagesPanel.jsx): `src/components/MessagesPanel.jsx`
- [Report service](https://github.com/pausasecurity/pausa/blob/main/src/services/reportService.js): `src/services/reportService.js`

### Identity and platform

- [Auth service](https://github.com/pausasecurity/pausa/blob/main/src/services/authService.js): `src/services/authService.js`
- [Verification service](https://github.com/pausasecurity/pausa/blob/main/src/services/verificationService.js): `src/services/verificationService.js`
- [Login alert service](https://github.com/pausasecurity/pausa/blob/main/src/services/loginAlertService.js): `src/services/loginAlertService.js`
- [PocketBase client](https://github.com/pausasecurity/pausa/blob/main/src/services/pocketbase.js): `src/services/pocketbase.js`
- [PocketBase hooks](https://github.com/pausasecurity/pausa/blob/main/pocketbase/pb_hooks/main.pb.js): `pocketbase/pb_hooks/main.pb.js`

### Other components

- **Player**
- **PocketBase**
- **Email delivery**

## Connections

- Player → App shell: uses
- App shell → Auth context: provides auth
- App shell → Verification context: provides verification
- App shell → Lobby views: renders
- App shell → Lobby chat: renders
- App shell → Messages panel: renders
- App shell → Group views: renders
- App shell → Profile and account: renders
- App shell → Lobby service: loads and joins
- App shell → Group service: loads groups
- App shell → Profile service: loads profile
- App shell → Rating service: loads ratings
- Auth context → Auth service: authenticates
- Auth context → Profile service: loads profile
- Auth context → Login alert service: checks login location
- Auth context → PocketBase client: syncs user record
- Verification context → Verification service: reads and updates
- Lobby service → PocketBase client: reads and writes
- Group views → Group service: manages groups
- Lobby chat → Lobby service: exchanges chat
- Messages panel → Friend service: uses relationships
- Profile and account → Profile service: edits profile
- Profile and account → Friend service: manages friends
- Profile and account → Rating service: submits ratings
- Profile and account → Report service: submits reports
- Auth service → PocketBase client: authenticates
- Friend service → PocketBase client: reads and writes
- Rating service → PocketBase client: reads and writes
- Report service → PocketBase client: writes reports
- Profile service → PocketBase client: reads and writes
- Login alert service → PocketBase hooks: calls login check
- PocketBase client → PocketBase: API requests
- PocketBase hooks → PocketBase: stores login history
- PocketBase hooks → Email delivery: sends alert
- PocketBase hooks → PocketBase: cleans expired lobbies
