# avanessazc/ft_transcendence--vuejs3-nestjs-postgresql architecture

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

- Interactive diagram: https://gitdiagram.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql
- Repository: https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql

## Overview

This is a Vue single-page Pong and social-gaming application backed by NestJS, Socket.IO and PostgreSQL/Prisma. The main user journey runs from signup/signin and profile setup to chat, matchmaking and real-time Pong, with ranking, achievements, friendships and invitations as supporting features. The graph includes major README capabilities even where their source was not sampled; those links are dashed when wiring is unverified. Relationships among sampled modules are based on the excerpts and SOURCE INDEX.

Main entry points: [`back/src/prisma/prisma.service.ts`](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/prisma/prisma.service.ts) (PostgreSQL), [`front/src/router/index.ts`](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/router/index.ts) (Page routing), [`back/src/auth/local/auth.local.service.ts`](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/local/auth.local.service.ts) (Authentication flows), [`back/src/user/user.service.ts`](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/user/user.service.ts) (User operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue client"]
  node_spa["SPA shell<br/>[App.vue]"]
  node_routes["Page routing<br/>[index.ts]"]
  node_userstore["User state<br/>[user.ts]"]
  node_chatview["Chat interface<br/>[ChatView.vue]"]
  node_pongview["Pong interface<br/>[PongView.vue]"]
  node_socketclient["Socket client"]
  node_profileview["Profile interface<br/>[ProfileView.vue]"]
  node_ranking["Ranking view<br/>[RankingView.vue]"]
end

subgraph group_identity["Identity and profiles"]
  node_authflows["Authentication flows"]
  node_googleauth["Google sign-in"]
  node_marvin["Marvin sign-in"]
  node_userapi["User API<br/>[user.controller.ts]"]
  node_users["User operations<br/>[user.service.ts]"]
end

subgraph group_social["Social features"]
  node_chatapi["Chat API"]
  node_chatlogic["Channel and messages"]
  node_friendship["Friendships"]
  node_privateinvites["Private channel invites"]
  node_achievements["Achievements"]
end

subgraph group_game["Pong gameplay"]
  node_pongapi["Pong API<br/>[pong.controller.ts]"]
  node_ponglogic["Match engine<br/>[pong.service.ts]"]
end

subgraph group_persistence["Persistence"]
  node_db[("PostgreSQL<br/>[prisma.service.ts]")]
end

node_player(("Player"))

node_player -->|"uses"| node_spa
node_spa -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_chatview
node_routes -->|"routes to"| node_pongview
node_routes -->|"routes to"| node_profileview
node_routes -->|"routes to"| node_ranking
node_spa -->|"loads user"| node_userstore
node_spa -->|"registers socket"| node_socketclient
node_player -.->|"signs in"| node_authflows
node_authflows -->|"looks up users"| node_users
node_googleauth -->|"uses token service"| node_authflows
node_marvin -->|"uses token service"| node_authflows
node_marvin -->|"generates nickname"| node_googleauth
node_player -.->|"chats"| node_chatview
node_chatview -->|"uses socket"| node_socketclient
node_chatapi -->|"calls"| node_chatlogic
node_chatlogic -->|"uses user operations"| node_users
node_player -.->|"plays matches"| node_pongview
node_pongview -->|"uses socket"| node_socketclient
node_pongapi -->|"calls"| node_ponglogic
node_ponglogic -->|"uses user operations"| node_users
node_player -.->|"manages profile"| node_profileview
node_userapi -->|"calls"| node_users
node_player -.->|"manages friendships"| node_friendship
node_player -.->|"invites to channels"| node_privateinvites
node_player -.->|"views achievements"| node_achievements
node_player -.->|"views rankings"| node_ranking
node_users -->|"reads and writes"| node_db
node_authflows -->|"uses database"| node_db
node_chatlogic -->|"uses database"| node_db
node_ponglogic -->|"uses database"| node_db
node_achievements -->|"uses database"| node_db
node_friendship -->|"uses database"| node_db
node_privateinvites -->|"uses database"| node_db

click node_spa "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/App.vue"
click node_routes "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/router/index.ts"
click node_userstore "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/store/user.ts"
click node_chatview "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/ChatView.vue"
click node_pongview "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/PongView.vue"
click node_socketclient "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/services/socketio.service.ts"
click node_profileview "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/ProfileView.vue"
click node_authflows "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/local/auth.local.service.ts"
click node_googleauth "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/google/auth.google.service.ts"
click node_marvin "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/marvin/auth.marvin.service.ts"
click node_userapi "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/user/user.controller.ts"
click node_users "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/user/user.service.ts"
click node_chatapi "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/messages/messages.controller.ts"
click node_chatlogic "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/messages/messages.service.ts"
click node_friendship "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/friendship/friendship.controller.ts"
click node_privateinvites "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/privateChanInvitation/privateChanInvitation.controller.ts"
click node_achievements "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/achievements/achievements.controller.ts"
click node_pongapi "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/pong/pong.controller.ts"
click node_ponglogic "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/pong/pong.service.ts"
click node_ranking "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/RankingView.vue"
click node_db "https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/prisma/prisma.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_spa,node_routes,node_userstore,node_chatview,node_pongview,node_socketclient,node_profileview,node_ranking toneBlue
class node_authflows,node_googleauth,node_marvin,node_userapi,node_users toneAmber
class node_chatapi,node_chatlogic,node_friendship,node_privateinvites,node_achievements toneMint
class node_pongapi,node_ponglogic toneRose
class node_db,node_player toneIndigo
```

## Components

### Vue client

- [SPA shell](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/App.vue): `front/src/App.vue`
- [Page routing](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/router/index.ts): `front/src/router/index.ts`
- [User state](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/store/user.ts): `front/src/store/user.ts`
- [Chat interface](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/ChatView.vue): `front/src/views/ChatView.vue`
- [Pong interface](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/PongView.vue): `front/src/views/PongView.vue`
- [Socket client](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/services/socketio.service.ts): `front/src/services/socketio.service.ts`
- [Profile interface](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/ProfileView.vue): `front/src/views/ProfileView.vue`
- [Ranking view](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/front/src/views/RankingView.vue): `front/src/views/RankingView.vue`

### Identity and profiles

- [Authentication flows](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/local/auth.local.service.ts): `back/src/auth/local/auth.local.service.ts`
- [Google sign-in](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/google/auth.google.service.ts): `back/src/auth/google/auth.google.service.ts`
- [Marvin sign-in](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/auth/marvin/auth.marvin.service.ts): `back/src/auth/marvin/auth.marvin.service.ts`
- [User API](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/user/user.controller.ts): `back/src/user/user.controller.ts`
- [User operations](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/user/user.service.ts): `back/src/user/user.service.ts`

### Social features

- [Chat API](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/messages/messages.controller.ts): `back/src/messages/messages.controller.ts`
- [Channel and messages](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/messages/messages.service.ts): `back/src/messages/messages.service.ts`
- [Friendships](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/friendship/friendship.controller.ts): `back/src/friendship/friendship.controller.ts`
- [Private channel invites](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/privateChanInvitation/privateChanInvitation.controller.ts): `back/src/privateChanInvitation/privateChanInvitation.controller.ts`
- [Achievements](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/achievements/achievements.controller.ts): `back/src/achievements/achievements.controller.ts`

### Pong gameplay

- [Pong API](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/pong/pong.controller.ts): `back/src/pong/pong.controller.ts`
- [Match engine](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/pong/pong.service.ts): `back/src/pong/pong.service.ts`

### Persistence

- [PostgreSQL](https://github.com/avanessazc/ft_transcendence--vuejs3-nestjs-postgresql/blob/main/back/src/prisma/prisma.service.ts): `back/src/prisma/prisma.service.ts`

### Other components

- **Player**

## Connections

- Player → SPA shell: uses
- SPA shell → Page routing: renders routes (evidence: `front/src/App.vue`)
- Page routing → Chat interface: routes to (evidence: `front/src/router/index.ts`)
- Page routing → Pong interface: routes to (evidence: `front/src/router/index.ts`)
- Page routing → Profile interface: routes to (evidence: `front/src/router/index.ts`)
- Page routing → Ranking view: routes to (evidence: `front/src/router/index.ts`)
- SPA shell → User state: loads user (evidence: `front/src/App.vue`)
- SPA shell → Socket client: registers socket (evidence: `front/src/App.vue`)
- Player → Authentication flows: signs in
- Authentication flows → User operations: looks up users (evidence: `back/src/auth/local/auth.local.service.ts`)
- Google sign-in → Authentication flows: uses token service (evidence: `back/src/auth/google/auth.google.service.ts`)
- Marvin sign-in → Authentication flows: uses token service (evidence: `back/src/auth/marvin/auth.marvin.service.ts`)
- Marvin sign-in → Google sign-in: generates nickname (evidence: `back/src/auth/marvin/auth.marvin.service.ts`)
- Player → Chat interface: chats
- Chat interface → Socket client: uses socket (evidence: `front/src/views/ChatView.vue`)
- Chat API → Channel and messages: calls (evidence: `back/src/messages/messages.controller.ts`)
- Channel and messages → User operations: uses user operations (evidence: `back/src/messages/messages.service.ts`)
- Player → Pong interface: plays matches
- Pong interface → Socket client: uses socket (evidence: `front/src/views/PongView.vue`)
- Pong API → Match engine: calls (evidence: `back/src/pong/pong.controller.ts`)
- Match engine → User operations: uses user operations (evidence: `back/src/pong/pong.service.ts`)
- Player → Profile interface: manages profile
- User API → User operations: calls (evidence: `back/src/user/user.controller.ts`)
- Player → Friendships: manages friendships
- Player → Private channel invites: invites to channels
- Player → Achievements: views achievements
- Player → Ranking view: views rankings
- User operations → PostgreSQL: reads and writes (evidence: `back/src/user/user.service.ts`)
- Authentication flows → PostgreSQL: uses database (evidence: `back/src/auth/local/auth.local.service.ts`)
- Channel and messages → PostgreSQL: uses database (evidence: `back/src/messages/messages.service.ts`)
- Match engine → PostgreSQL: uses database (evidence: `back/src/pong/pong.service.ts`)
- Achievements → PostgreSQL: uses database
- Friendships → PostgreSQL: uses database
- Private channel invites → PostgreSQL: uses database
