# ayoubelazami/projetrencontregamification architecture

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

- Interactive diagram: https://gitdiagram.com/ayoubelazami/projetrencontregamification
- Repository: https://github.com/ayoubelazami/projetrencontregamification

## Overview

This is a dating and matchmaking application: users create profiles, browse recommendations, send likes, form matches, and interact through match conversations. The frontend is a Next.js client and the backend is a Symfony API, with separate matchmaking, gamification, notification, and moderation capabilities. The excerpts and SOURCE INDEX support several backend service and entity relationships; frontend-to-API wiring and some unsampled subsystem internals are not shown, so those links are marked unverified or omitted.

Main entry points: [`frontend/lib/api.ts`](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/lib/api.ts) (API client), [`matchmaking-backend/src/Entity/User.php`](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/User.php) (User profile), [`matchmaking-backend/src/Controller/Matchmaking/InteractionController.php`](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Matchmaking/InteractionController.php) (Interaction API), [`matchmaking-backend/src/Service/MatchService.php`](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/MatchService.php) (Match service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_browse["Browse &amp; profile<br/>[page.tsx]"]
  node_swipe["Swipe deck<br/>[SwipeDeck.tsx]"]
  node_profile["Profile page<br/>[page.tsx]"]
  node_likes["Likes page<br/>[page.tsx]"]
  node_matchpage["Match conversation<br/>[page.tsx]"]
  node_leaderboard["Leaderboard page<br/>[page.tsx]"]
  node_clientapi["API client<br/>[api.ts]"]
end

subgraph group_api["API controllers"]
  node_usersapi["User &amp; profile API<br/>[UserController.php]"]
  node_profileapi["Profile API"]
  node_interactions["Interaction API"]
  node_matchesapi["Matches API"]
  node_gamificationapi["Gamification API"]
  node_notificationsapi["Notifications API"]
  node_reportsapi["Reports API"]
  node_adminapi["Admin API"]
end

subgraph group_domain["Domain services"]
  node_recommendations["Recommendations"]
  node_matchservice["Match service<br/>[MatchService.php]"]
  node_gamification["Gamification service"]
  node_notificationservice["Notification service"]
  node_moderation["Moderation service"]
  node_media["Media service<br/>[MediaService.php]"]
end

subgraph group_data["Domain data"]
  node_userentity["User profile<br/>[User.php]"]
  node_requestentity["Match requests<br/>[MatchRequest.php]"]
  node_matchentity["Matches &amp; messages<br/>[UserMatch.php]"]
  node_notificationentity["Notifications<br/>[Notification.php]"]
  node_reportentity["Reports<br/>[Report.php]"]
  node_tagentity["Profile tags<br/>[ProfileTag.php]"]
  node_badgeentity["User badges<br/>[UserBadge.php]"]
  node_questentity["User quests<br/>[UserQuest.php]"]
end

node_user(("App user"))

node_user -->|"browses"| node_browse
node_user -->|"edits profile"| node_profile
node_browse -.->|"uses"| node_swipe
node_swipe -.->|"sends actions"| node_clientapi
node_profile -.->|"loads profile"| node_clientapi
node_likes -.->|"loads likes"| node_clientapi
node_matchpage -.->|"loads match"| node_clientapi
node_leaderboard -.->|"loads rankings"| node_clientapi
node_clientapi -.->|"HTTP requests"| node_usersapi
node_clientapi -.->|"HTTP requests"| node_interactions
node_clientapi -.->|"HTTP requests"| node_matchesapi
node_clientapi -.->|"HTTP requests"| node_gamificationapi
node_clientapi -.->|"HTTP requests"| node_notificationsapi
node_usersapi -->|"uses"| node_recommendations
node_profileapi -->|"uploads avatars"| node_media
node_interactions -->|"creates requests"| node_matchservice
node_interactions -->|"awards activity"| node_gamification
node_matchesapi -->|"awards activity"| node_gamification
node_matchservice -->|"creates notifications"| node_notificationservice
node_notificationsapi -->|"serves notifications"| node_notificationservice
node_reportsapi -->|"creates reports"| node_moderation
node_adminapi -->|"reviews reports"| node_moderation
node_matchservice -->|"manages requests"| node_requestentity
node_matchservice -->|"creates matches"| node_matchentity
node_matchservice -->|"creates notifications"| node_notificationentity
node_notificationservice -->|"reads and updates"| node_notificationentity
node_moderation -->|"manages reports"| node_reportentity
node_moderation -->|"moderates users"| node_userentity
node_gamification -->|"awards badges"| node_badgeentity
node_gamification -->|"tracks quests"| node_questentity
node_gamification -->|"updates XP"| node_userentity
node_usersapi -->|"reads users"| node_userentity
node_profileapi -->|"updates profile"| node_userentity
node_profileapi -->|"manages tags"| node_tagentity
node_interactions -->|"loads target"| node_userentity
node_interactions -->|"lists likes"| node_requestentity
node_notificationsapi -->|"serializes records"| node_notificationentity
node_reportsapi -->|"loads target"| node_userentity
node_adminapi -->|"loads reports"| node_reportentity
node_gamificationapi -->|"reads scores"| node_userentity

click node_browse "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/page.tsx"
click node_swipe "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/components/SwipeDeck.tsx"
click node_profile "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/profile/page.tsx"
click node_likes "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/likes/page.tsx"
click node_matchpage "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/matches/%5Bid%5D/page.tsx"
click node_leaderboard "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/leaderboard/page.tsx"
click node_clientapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/lib/api.ts"
click node_usersapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/User/UserController.php"
click node_profileapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/User/ProfileController.php"
click node_interactions "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Matchmaking/InteractionController.php"
click node_matchesapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Matchmaking/MatchController.php"
click node_gamificationapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Gamification/GamificationController.php"
click node_notificationsapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Notification/NotificationController.php"
click node_reportsapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Moderation/ReportController.php"
click node_adminapi "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Admin/AdminController.php"
click node_recommendations "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/RecommendationService.php"
click node_matchservice "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/MatchService.php"
click node_gamification "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/GamificationService.php"
click node_notificationservice "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/NotificationService.php"
click node_moderation "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/ModerationService.php"
click node_media "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/MediaService.php"
click node_userentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/User.php"
click node_requestentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/MatchRequest.php"
click node_matchentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/UserMatch.php"
click node_notificationentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/Notification.php"
click node_reportentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/Report.php"
click node_tagentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/ProfileTag.php"
click node_badgeentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/UserBadge.php"
click node_questentity "https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/UserQuest.php"

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_browse,node_swipe,node_profile,node_likes,node_matchpage,node_leaderboard,node_clientapi,node_user toneBlue
class node_usersapi,node_profileapi,node_interactions,node_matchesapi,node_gamificationapi,node_notificationsapi,node_reportsapi,node_adminapi toneAmber
class node_recommendations,node_matchservice,node_gamification,node_notificationservice,node_moderation,node_media toneMint
class node_userentity,node_requestentity,node_matchentity,node_notificationentity,node_reportentity,node_tagentity,node_badgeentity,node_questentity toneRose
```

## Components

### Web client

- [Browse & profile](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Swipe deck](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/components/SwipeDeck.tsx): `frontend/components/SwipeDeck.tsx`
- [Profile page](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/profile/page.tsx): `frontend/app/profile/page.tsx`
- [Likes page](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/likes/page.tsx): `frontend/app/likes/page.tsx`
- [Match conversation](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/matches/%5Bid%5D/page.tsx): `frontend/app/matches/[id]/page.tsx`
- [Leaderboard page](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/app/leaderboard/page.tsx): `frontend/app/leaderboard/page.tsx`
- [API client](https://github.com/ayoubelazami/projetrencontregamification/blob/master/frontend/lib/api.ts): `frontend/lib/api.ts`

### API controllers

- [User & profile API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/User/UserController.php): `matchmaking-backend/src/Controller/User/UserController.php`
- [Profile API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/User/ProfileController.php): `matchmaking-backend/src/Controller/User/ProfileController.php`
- [Interaction API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Matchmaking/InteractionController.php): `matchmaking-backend/src/Controller/Matchmaking/InteractionController.php`
- [Matches API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Matchmaking/MatchController.php): `matchmaking-backend/src/Controller/Matchmaking/MatchController.php`
- [Gamification API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Gamification/GamificationController.php): `matchmaking-backend/src/Controller/Gamification/GamificationController.php`
- [Notifications API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Notification/NotificationController.php): `matchmaking-backend/src/Controller/Notification/NotificationController.php`
- [Reports API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Moderation/ReportController.php): `matchmaking-backend/src/Controller/Moderation/ReportController.php`
- [Admin API](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Controller/Admin/AdminController.php): `matchmaking-backend/src/Controller/Admin/AdminController.php`

### Domain services

- [Recommendations](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/RecommendationService.php): `matchmaking-backend/src/Service/RecommendationService.php`
- [Match service](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/MatchService.php): `matchmaking-backend/src/Service/MatchService.php`
- [Gamification service](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/GamificationService.php): `matchmaking-backend/src/Service/GamificationService.php`
- [Notification service](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/NotificationService.php): `matchmaking-backend/src/Service/NotificationService.php`
- [Moderation service](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/ModerationService.php): `matchmaking-backend/src/Service/ModerationService.php`
- [Media service](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Service/MediaService.php): `matchmaking-backend/src/Service/MediaService.php`

### Domain data

- [User profile](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/User.php): `matchmaking-backend/src/Entity/User.php`
- [Match requests](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/MatchRequest.php): `matchmaking-backend/src/Entity/MatchRequest.php`
- [Matches & messages](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/UserMatch.php): `matchmaking-backend/src/Entity/UserMatch.php`
- [Notifications](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/Notification.php): `matchmaking-backend/src/Entity/Notification.php`
- [Reports](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/Report.php): `matchmaking-backend/src/Entity/Report.php`
- [Profile tags](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/ProfileTag.php): `matchmaking-backend/src/Entity/ProfileTag.php`
- [User badges](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/UserBadge.php): `matchmaking-backend/src/Entity/UserBadge.php`
- [User quests](https://github.com/ayoubelazami/projetrencontregamification/blob/master/matchmaking-backend/src/Entity/UserQuest.php): `matchmaking-backend/src/Entity/UserQuest.php`

### Other components

- **App user**

## Connections

- App user → Browse & profile: browses
- App user → Profile page: edits profile
- Browse & profile → Swipe deck: uses
- Swipe deck → API client: sends actions
- Profile page → API client: loads profile
- Likes page → API client: loads likes
- Match conversation → API client: loads match
- Leaderboard page → API client: loads rankings
- API client → User & profile API: HTTP requests
- API client → Interaction API: HTTP requests
- API client → Matches API: HTTP requests
- API client → Gamification API: HTTP requests
- API client → Notifications API: HTTP requests
- User & profile API → Recommendations: uses (evidence: `matchmaking-backend/src/Controller/User/UserController.php`)
- Profile API → Media service: uploads avatars (evidence: `matchmaking-backend/src/Controller/User/ProfileController.php`)
- Interaction API → Match service: creates requests (evidence: `matchmaking-backend/src/Controller/Matchmaking/InteractionController.php`)
- Interaction API → Gamification service: awards activity (evidence: `matchmaking-backend/src/Controller/Matchmaking/InteractionController.php`)
- Matches API → Gamification service: awards activity (evidence: `matchmaking-backend/src/Controller/Matchmaking/MatchController.php`)
- Match service → Notification service: creates notifications (evidence: `matchmaking-backend/src/Service/MatchService.php`)
- Notifications API → Notification service: serves notifications (evidence: `matchmaking-backend/src/Controller/Notification/NotificationController.php`)
- Reports API → Moderation service: creates reports (evidence: `matchmaking-backend/src/Controller/Moderation/ReportController.php`)
- Admin API → Moderation service: reviews reports (evidence: `matchmaking-backend/src/Controller/Admin/AdminController.php`)
- Match service → Match requests: manages requests (evidence: `matchmaking-backend/src/Service/MatchService.php`)
- Match service → Matches & messages: creates matches (evidence: `matchmaking-backend/src/Service/MatchService.php`)
- Match service → Notifications: creates notifications (evidence: `matchmaking-backend/src/Service/MatchService.php`)
- Notification service → Notifications: reads and updates (evidence: `matchmaking-backend/src/Service/NotificationService.php`)
- Moderation service → Reports: manages reports (evidence: `matchmaking-backend/src/Service/ModerationService.php`)
- Moderation service → User profile: moderates users (evidence: `matchmaking-backend/src/Service/ModerationService.php`)
- Gamification service → User badges: awards badges (evidence: `matchmaking-backend/src/Service/GamificationService.php`)
- Gamification service → User quests: tracks quests (evidence: `matchmaking-backend/src/Service/GamificationService.php`)
- Gamification service → User profile: updates XP (evidence: `matchmaking-backend/src/Service/GamificationService.php`)
- User & profile API → User profile: reads users (evidence: `matchmaking-backend/src/Controller/User/UserController.php`)
- Profile API → User profile: updates profile (evidence: `matchmaking-backend/src/Controller/User/ProfileController.php`)
- Profile API → Profile tags: manages tags (evidence: `matchmaking-backend/src/Controller/User/ProfileController.php`)
- Interaction API → User profile: loads target (evidence: `matchmaking-backend/src/Controller/Matchmaking/InteractionController.php`)
- Interaction API → Match requests: lists likes (evidence: `matchmaking-backend/src/Controller/Matchmaking/InteractionController.php`)
- Notifications API → Notifications: serializes records (evidence: `matchmaking-backend/src/Controller/Notification/NotificationController.php`)
- Reports API → User profile: loads target (evidence: `matchmaking-backend/src/Controller/Moderation/ReportController.php`)
- Admin API → Reports: loads reports (evidence: `matchmaking-backend/src/Controller/Admin/AdminController.php`)
- Gamification API → User profile: reads scores (evidence: `matchmaking-backend/src/Controller/Gamification/GamificationController.php`)
