# yuuki-p/tcc architecture

> Architecture diagram of the GitHub repository yuuki-p/tcc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yuuki-p/tcc
- Repository: https://github.com/yuuki-p/tcc

## Overview

ATCC is a corporate-management mobile/web client backed by a modular NestJS REST API. The main user flow is signing in or activating an account, persisting a session token, then using authenticated API features such as employee and task management, chat, meetings, wellbeing, and work records. The API also includes company administration, dashboard, occurrence, audit, backup, mail, and health capabilities. Source excerpts show several controller-to-service calls and authentication internals; links for unsampled modules are limited to documented or indexed references.

Main entry points: [`Backend/src/app.module.ts`](https://github.com/yuuki-p/tcc/blob/main/Backend/src/app.module.ts) (NestJS application), [`Backend/src/auth/permissions.guard.ts`](https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/permissions.guard.ts) (Authorization guards), [`Backend/src/auth/auth.controller.ts`](https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/auth.controller.ts) (Authentication routes), [`frontend/services/auth.ts`](https://github.com/yuuki-p/tcc/blob/main/frontend/services/auth.ts) (Session and auth client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_login_screen["Login screen<br/>[index.tsx]"]
  node_session_auth["Session and auth client<br/>[auth.ts]"]
  node_api_config["API configuration<br/>[config.ts]"]
end

subgraph group_identity["Identity and access"]
  node_auth_routes["Authentication routes<br/>[auth.controller.ts]"]
  node_auth_service["Authentication service<br/>[auth.service.ts]"]
  node_access_control["Authorization guards"]
end

subgraph group_workforce["Workforce operations"]
  node_users["User management<br/>[users.service.ts]"]
  node_companies["Company management<br/>[company.service.ts]"]
  node_dashboard["Dashboard"]
  node_tasks["Task management<br/>[tasks.service.ts]"]
  node_wellbeing["Employee wellbeing"]
  node_work_records["Work records<br/>[work.service.ts]"]
  node_occurrences["Occurrences"]
end

subgraph group_collaboration["Collaboration"]
  node_chat["Internal chat<br/>[chat.service.ts]"]
  node_meetings["Meetings"]
end

subgraph group_platform["Platform services"]
  node_api_app["NestJS application<br/>[app.module.ts]"]
  node_audit["Audit logging<br/>[audit.service.ts]"]
  node_backup["Backup and restore<br/>[backup.service.ts]"]
  node_mail["Mail delivery<br/>[mail.services.ts]"]
  node_health["Health check"]
end

node_employee(("Employee or admin"))

node_employee -->|"starts session"| node_login_screen
node_login_screen -->|"uses auth"| node_session_auth
node_session_auth -->|"uses API URL"| node_api_config
node_session_auth -.->|"sends auth requests"| node_auth_routes
node_api_app -.->|"registers module"| node_auth_routes
node_api_app -->|"registers module"| node_users
node_api_app -->|"registers module"| node_companies
node_api_app -->|"registers module"| node_dashboard
node_api_app -->|"registers module"| node_tasks
node_api_app -->|"registers module"| node_wellbeing
node_api_app -->|"registers module"| node_work_records
node_api_app -->|"registers module"| node_occurrences
node_api_app -->|"registers module"| node_chat
node_api_app -->|"registers module"| node_meetings
node_api_app -->|"registers module"| node_audit
node_api_app -->|"registers module"| node_backup
node_api_app -->|"registers module"| node_mail
node_api_app -->|"registers module"| node_health
node_auth_routes -->|"delegates"| node_auth_service
node_auth_service -->|"records events"| node_audit
node_auth_service -->|"sends reset email"| node_mail
node_auth_routes -.->|"uses guards"| node_access_control
node_users -.->|"secured by"| node_access_control
node_tasks -.->|"secured by"| node_access_control
node_chat -.->|"secured by"| node_access_control
node_meetings -->|"secured by"| node_access_control

click node_login_screen "https://github.com/yuuki-p/tcc/blob/main/frontend/app/index.tsx"
click node_session_auth "https://github.com/yuuki-p/tcc/blob/main/frontend/services/auth.ts"
click node_api_config "https://github.com/yuuki-p/tcc/blob/main/frontend/services/config.ts"
click node_api_app "https://github.com/yuuki-p/tcc/blob/main/Backend/src/app.module.ts"
click node_auth_routes "https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/auth.controller.ts"
click node_auth_service "https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/auth.service.ts"
click node_access_control "https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/permissions.guard.ts"
click node_users "https://github.com/yuuki-p/tcc/blob/main/Backend/src/users/users.service.ts"
click node_companies "https://github.com/yuuki-p/tcc/blob/main/Backend/src/company/company.service.ts"
click node_dashboard "https://github.com/yuuki-p/tcc/blob/main/Backend/src/dashboard/dashboard.service.ts"
click node_tasks "https://github.com/yuuki-p/tcc/blob/main/Backend/src/tasks/tasks.service.ts"
click node_wellbeing "https://github.com/yuuki-p/tcc/blob/main/Backend/src/wellbeing/wellbeing.service.ts"
click node_work_records "https://github.com/yuuki-p/tcc/blob/main/Backend/src/work/work.service.ts"
click node_occurrences "https://github.com/yuuki-p/tcc/blob/main/Backend/src/occurrences/occurrences.service.ts"
click node_chat "https://github.com/yuuki-p/tcc/blob/main/Backend/src/chat/chat.service.ts"
click node_meetings "https://github.com/yuuki-p/tcc/blob/main/Backend/src/meetings/meetings.service.ts"
click node_audit "https://github.com/yuuki-p/tcc/blob/main/Backend/src/audit/audit.service.ts"
click node_backup "https://github.com/yuuki-p/tcc/blob/main/Backend/src/backup/backup.service.ts"
click node_mail "https://github.com/yuuki-p/tcc/blob/main/Backend/src/mail/mail.services.ts"
click node_health "https://github.com/yuuki-p/tcc/blob/main/Backend/src/health/health.controller.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_screen,node_session_auth,node_api_config toneBlue
class node_auth_routes,node_auth_service,node_access_control toneAmber
class node_users,node_companies,node_dashboard,node_tasks,node_wellbeing,node_work_records,node_occurrences toneMint
class node_chat,node_meetings toneRose
class node_api_app,node_audit,node_backup,node_mail,node_health,node_employee toneIndigo
```

## Components

### Client

- [Login screen](https://github.com/yuuki-p/tcc/blob/main/frontend/app/index.tsx): `frontend/app/index.tsx`
- [Session and auth client](https://github.com/yuuki-p/tcc/blob/main/frontend/services/auth.ts): `frontend/services/auth.ts`
- [API configuration](https://github.com/yuuki-p/tcc/blob/main/frontend/services/config.ts): `frontend/services/config.ts`

### Identity and access

- [Authentication routes](https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/auth.controller.ts): `Backend/src/auth/auth.controller.ts`
- [Authentication service](https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/auth.service.ts): `Backend/src/auth/auth.service.ts`
- [Authorization guards](https://github.com/yuuki-p/tcc/blob/main/Backend/src/auth/permissions.guard.ts): `Backend/src/auth/permissions.guard.ts`

### Workforce operations

- [User management](https://github.com/yuuki-p/tcc/blob/main/Backend/src/users/users.service.ts): `Backend/src/users/users.service.ts`
- [Company management](https://github.com/yuuki-p/tcc/blob/main/Backend/src/company/company.service.ts): `Backend/src/company/company.service.ts`
- [Dashboard](https://github.com/yuuki-p/tcc/blob/main/Backend/src/dashboard/dashboard.service.ts): `Backend/src/dashboard/dashboard.service.ts`
- [Task management](https://github.com/yuuki-p/tcc/blob/main/Backend/src/tasks/tasks.service.ts): `Backend/src/tasks/tasks.service.ts`
- [Employee wellbeing](https://github.com/yuuki-p/tcc/blob/main/Backend/src/wellbeing/wellbeing.service.ts): `Backend/src/wellbeing/wellbeing.service.ts`
- [Work records](https://github.com/yuuki-p/tcc/blob/main/Backend/src/work/work.service.ts): `Backend/src/work/work.service.ts`
- [Occurrences](https://github.com/yuuki-p/tcc/blob/main/Backend/src/occurrences/occurrences.service.ts): `Backend/src/occurrences/occurrences.service.ts`

### Collaboration

- [Internal chat](https://github.com/yuuki-p/tcc/blob/main/Backend/src/chat/chat.service.ts): `Backend/src/chat/chat.service.ts`
- [Meetings](https://github.com/yuuki-p/tcc/blob/main/Backend/src/meetings/meetings.service.ts): `Backend/src/meetings/meetings.service.ts`

### Platform services

- [NestJS application](https://github.com/yuuki-p/tcc/blob/main/Backend/src/app.module.ts): `Backend/src/app.module.ts`
- [Audit logging](https://github.com/yuuki-p/tcc/blob/main/Backend/src/audit/audit.service.ts): `Backend/src/audit/audit.service.ts`
- [Backup and restore](https://github.com/yuuki-p/tcc/blob/main/Backend/src/backup/backup.service.ts): `Backend/src/backup/backup.service.ts`
- [Mail delivery](https://github.com/yuuki-p/tcc/blob/main/Backend/src/mail/mail.services.ts): `Backend/src/mail/mail.services.ts`
- [Health check](https://github.com/yuuki-p/tcc/blob/main/Backend/src/health/health.controller.ts): `Backend/src/health/health.controller.ts`

### Other components

- **Employee or admin**

## Connections

- Employee or admin → Login screen: starts session (evidence: `frontend/app/index.tsx`)
- Login screen → Session and auth client: uses auth (evidence: `frontend/app/index.tsx`)
- Session and auth client → API configuration: uses API URL (evidence: `frontend/services/auth.ts`)
- Session and auth client → Authentication routes: sends auth requests
- NestJS application → Authentication routes: registers module
- NestJS application → User management: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Company management: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Dashboard: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Task management: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Employee wellbeing: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Work records: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Occurrences: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Internal chat: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Meetings: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Audit logging: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Backup and restore: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Mail delivery: registers module (evidence: `Backend/src/app.module.ts`)
- NestJS application → Health check: registers module (evidence: `Backend/src/app.module.ts`)
- Authentication routes → Authentication service: delegates (evidence: `Backend/src/auth/auth.module.ts`)
- Authentication service → Audit logging: records events (evidence: `Backend/src/auth/auth.service.ts`)
- Authentication service → Mail delivery: sends reset email (evidence: `Backend/src/auth/auth.service.ts`)
- Authentication routes → Authorization guards: uses guards
- User management → Authorization guards: secured by
- Task management → Authorization guards: secured by
- Internal chat → Authorization guards: secured by
- Meetings → Authorization guards: secured by (evidence: `Backend/src/meetings/meetings.controller.ts`)
