This project has been created as part of the 42 curriculum by braelino, eralambo, nyrandri, rmamisoa, yandriam.
Project name: ft_agar.io (ft_transcendence)
ft_agar.io is a full-stack multiplayer web application inspired by agar-style gameplay. Players can authenticate, join real-time matches, interact socially (friends/chat/profile), and track long-term progression through persistent statistics and match history.
Key features
- Real-time multiplayer game over WebSocket
- User management (register/login/logout, OAuth 2.0)
- Social features (profiles, friends, private chat)
- Persistent game stats, history, and achievements
- Multilingual UI (EN/FR/ES)
- Docker Engine + Docker Compose
- GNU Make
- (Optional local tooling) Node.js 20+ and npm 10+
- Clone repository
git clone <repository-url>cd project
- Copy environment file
cp .env.example .env- Update environment values if needed.
- Copy mock data (demo mode)
- Copy
mock_data/intobackend/before startup.
- Copy
- Start stack
make up
Note: mock_data/ (user seed data for demo) is not committed to the repository. To run the project with pre-populated demo accounts, copy the mock_data/ folder to backend/ before running make up.
- App URL: https://localhost:8443
- API is proxied by nginx through the same HTTPS entrypoint.
- Demo users are seeded from
backend/mock_data/users_credentials.mdwhen demomock_data/is provided. - Example demo account:
- Email:
dylan.drift@ftmock.dev - Password:
MockPass!01
- Email:
- Stop:
make down - Rebuild cleanly:
make re - Browser tests (from frontend):
npm run test:browsers
| Member (login) | Role | Responsibilities |
|---|---|---|
| rmamisoa | Product Owner (PO), Frontend Dev | Product vision, backlog priorities, feature acceptance, profile/stats/leaderboard UI |
| braelino | Project Manager (PM), Dev | Sprint planning, task tracking, risk follow-up, chat/realtime integration |
| yandriam | Tech Lead, Dev | Architecture decisions, quality gates, integration reviews, i18n/testing/infra support |
| nyrandri | Backend & Game Dev | Core game engine, room lifecycle, persistence pipeline, gameplay balancing |
| eralambo | Developer | Authentication, OAuth flow, responsive frontend work, social interactions |
Work was organized with a feature-first roadmap: authentication → profile/friends/chat → game loop → persistence → hardening/tests.
Process used
- Task slicing in short, reviewable increments
- Feature branches + pull-request review before merge
- Mandatory scope delivered first, modules validated afterward
Collaboration tools
- GitHub (issues/PRs/branch history)
- Discord (daily coordination and blocker resolution)
- Shared planning board (task status and ownership tracking)
- React + TypeScript + Vite: component-based architecture, fast dev cycle, static typing safety.
- Tailwind CSS: rapid, consistent styling and responsive utility-first UI.
- Socket.IO client: real-time events for gameplay and live presence.
- NestJS: modular structure, strong DI pattern, scalable API and gateway organization.
- Prisma ORM: type-safe DB access and reliable migration workflow.
- PostgreSQL: relational consistency for social graph + match persistence.
- Socket.IO: bi-directional low-latency communication for game state.
- Docker + Docker Compose: reproducible environment and one-command startup.
- Nginx + HTTPS: single secure entrypoint and reverse proxy for frontend/backend.
Source of truth: backend/prisma/schema.prisma
| Entity | Key fields (examples) | Main relations |
|---|---|---|
| Users | id, email, username, passwordHash, googleId, createdAt |
1→1 with profile data (implemented in user record), 1→N friendships/messages/games |
| Profiles | displayName, avatarUrl, bio, onlineStatus, stats fields |
In this project, profile attributes are stored with Users and exposed through profile services |
| Friendships | id, requesterId, addresseeId, status, createdAt |
N→1 to Users (requester/addressee), 1→N Messages |
| Messages | id, friendshipId, senderId, content, createdAt |
N→1 Friendship, N→1 User (sender) |
| Games | id, status, mode, startedAt, endedAt, settings |
1→N GamePlayers |
| GamePlayers | id, gameId, userId, rank, kills, maxMass, survivalTime |
N→1 Games, N→1 Users |
| Achievements | id, key, title, description |
N↔N Users via UserAchievements |
| UserAchievements | id, userId, achievementId, unlockedAt |
N→1 Users, N→1 Achievements |
| Feature | Description | Implemented by |
|---|---|---|
| Local authentication | Register/login/logout with JWT guards and protected routes | eralambo |
| OAuth 2.0 login | Google OAuth flow and callback integration | eralambo |
| User profile | Profile retrieval/update, avatar and account settings | eralambo, rmamisoa |
| Friends system | Request/accept/reject/remove/block friendship actions | eralambo, yandriam |
| Private chat | Friendship-scoped messaging and history retrieval | braelino, eralambo |
| Presence | Online/offline and live activity updates | braelino, nyrandri |
| Multiplayer gameplay | Real-time movement, collisions, growth, win resolution | nyrandri |
| Remote players | Cross-client synchronized sessions over network | nyrandri, yandriam |
| AI opponent | Bot behavior integrated into game sessions | nyrandri |
| Stats & match history | Persistent results and profile progression views | rmamisoa, yandriam |
| Achievements | Unlock logic and user achievement display | nyrandri, rmamisoa |
| Internationalization | EN/FR/ES translations and runtime language switch | yandriam, eralambo |
| Browser compatibility | Multi-browser validation with Playwright | yandriam |
| Category | Module | Type | Points | Status | Justification |
|---|---|---|---|---|---|
| Web | Framework for frontend + backend | Major | 2 | Complete | React + NestJS core architecture |
| Web | Frontend framework | Minor | 1 | Complete | React frontend implementation |
| Web | Backend framework | Minor | 1 | Complete | NestJS backend implementation |
| Web | Real-time features (WebSockets) | Major | 2 | Complete | Socket-based live game + presence updates |
| Web | Allow users to interact (chat/profile/friends) | Major | 2 | Complete | Full social interactions between users |
| Web | ORM | Minor | 1 | Complete | Prisma with typed queries and migrations |
| User Management | Standard user management/authentication | Major | 2 | Complete | Profile updates, auth, friend and status support |
| User Management | OAuth 2.0 | Minor | 1 | Complete | Google login implemented |
| Gaming & UX | Complete web-based game | Major | 2 | Complete | Playable multiplayer cell game |
| Gaming & UX | Remote players | Major | 2 | Complete | Real-time matches on separate machines |
| Gaming & UX | Multiplayer game (3+ players) | Major | 2 | Complete | Multiplayer support beyond two players |
| Artificial Intelligence | AI Opponent | Major | 2 | Complete | Bot opponent integrated into gameplay loop |
| Accessibility & I18n | Multiple languages (EN/FR/ES) | Minor | 1 | Complete | Full translation resources and language switcher |
| Accessibility & I18n | Additional browsers support | Minor | 1 | Complete | Chromium/Firefox/WebKit smoke compatibility |
- Major modules: 8 × 2 = 16
- Minor modules: 6 × 1 = 6
- Total = 22 points
- Defined product vision and feature priority order.
- Validated sprint outcomes and acceptance criteria.
- Built/co-built profile and progression screens.
- Co-implemented leaderboard and user-facing stats flows.
- Coordinated planning, cadence, and blocker tracking.
- Structured task ownership and delivery checkpoints.
- Implemented/co-implemented chat and realtime presence features.
- Contributed to social/game integration testing.
- Set architecture standards and integration conventions.
- Led quality hardening across backend/frontend boundaries.
- Co-implemented social flows, i18n, stats/history display.
- Built browser compatibility tests and defense-readiness fixes.
- Built the core game engine and real-time gameplay mechanics.
- Implemented room/match lifecycle and result persistence.
- Contributed to socket orchestration and performance tuning.
- Integrated AI player behavior and achievement-related hooks.
- Implemented authentication (local + JWT) and OAuth integration.
- Built/co-built profile and friendship interaction workflows.
- Improved responsive frontend behavior.
- Co-implemented i18n and UI polish for key user flows.
- NestJS: https://docs.nestjs.com/
- Prisma: https://www.prisma.io/docs
- React: https://react.dev/
- TypeScript: https://www.typescriptlang.org/docs/
- Vite: https://vite.dev/guide/
- Tailwind CSS: https://tailwindcss.com/docs
- Socket.IO: https://socket.io/docs/v4/
- Playwright: https://playwright.dev/docs/intro
- PostgreSQL: https://www.postgresql.org/docs/
- Nginx: https://nginx.org/en/docs/
AI assistance was used for:
- Refactoring suggestions and boilerplate acceleration
- Debugging support (error triage and alternative fixes)
- Test scenario drafting and checklist generation
- Documentation structure/compliance review
All AI-assisted outputs were manually reviewed, edited, and validated by team members before merge.