{"id":30190163,"url":"https://github.com/pin3dev/42_ft-transcendence","last_synced_at":"2025-10-15T04:56:02.967Z","repository":{"id":308352409,"uuid":"1005655259","full_name":"pin3dev/42_ft-Transcendence","owner":"pin3dev","description":"A full-stack web application developed with a custom backend and frontend, featuring real-time multiplayer Pong gameplay, user authentication, friend and matchmaking systems, and profile management. Designed to strengthen knowledge of modern web development practices, including WebSockets, RESTful APIs, and secure user data handling.","archived":false,"fork":false,"pushed_at":"2025-08-05T16:14:22.000Z","size":1421,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-08-12T19:43:19.816Z","etag":null,"topics":["2fa","42-transcendence","42cursus","42school","42sp","api-gateway","ddd-architecture","docker","event-driven","ft-transcendence","jwt-token","microservice","mvc-architecture","orm","redis-cache","redis-cluster","spa","sql","transcendence"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pin3dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T15:25:09.000Z","updated_at":"2025-08-05T16:14:25.000Z","dependencies_parsed_at":"2025-08-05T14:35:01.974Z","dependency_job_id":null,"html_url":"https://github.com/pin3dev/42_ft-Transcendence","commit_stats":null,"previous_names":["pin3dev/42_ft-transcendence"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pin3dev/42_ft-Transcendence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft-Transcendence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft-Transcendence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft-Transcendence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft-Transcendence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pin3dev","download_url":"https://codeload.github.com/pin3dev/42_ft-Transcendence/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft-Transcendence/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279050885,"owners_count":26093603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2fa","42-transcendence","42cursus","42school","42sp","api-gateway","ddd-architecture","docker","event-driven","ft-transcendence","jwt-token","microservice","mvc-architecture","orm","redis-cache","redis-cluster","spa","sql","transcendence"],"created_at":"2025-08-12T19:36:26.509Z","updated_at":"2025-10-15T04:56:02.962Z","avatar_url":"https://github.com/pin3dev.png","language":"TypeScript","readme":"\n\n\u003ch1 align=\"center\"\u003eft_Transcendence\u003c/h1\u003e\n\u003cp align=\"center\"\u003e \n  \u003cimg src=\"https://img.shields.io/badge/grade-115%2F125-green?style=for-the-badge\u0026logo=42\u0026labelColor=gray\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/pin3dev/42_Cursus/tree/main/library/#06-ft_transcendence\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Microservices-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/API-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/RESTful-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Full_stack-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/WebSocket-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/SPA-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Layers-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Even_Driven-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/DDD-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/ORM-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/SQL_DataBase-blue?style=for-the-badge\"/\u003e \n    \u003cimg src=\"https://img.shields.io/badge/JWT-blue?style=for-the-badge\"/\u003e \n    \u003cimg src=\"https://img.shields.io/badge/2FA-blue?style=for-the-badge\"/\u003e \n    \u003cimg src=\"https://img.shields.io/badge/Docker-blue?style=for-the-badge\"/\u003e \n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3\u003e\n  \u003cp align=\"center\"\u003e \n    \u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e • \n    \u003ca href=\"#structure\"\u003eStructure\u003c/a\u003e • \n    \u003ca href=\"#docs\"\u003eDocs\u003c/a\u003e • \n    \u003ca href=\"#cloning\"\u003eCloning\u003c/a\u003e • \n    \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e • \n    \u003ca href=\"#norms\"\u003eNorms\u003c/a\u003e • \n    \u003ca href=\"#theoretical\"\u003eTheoretical\u003c/a\u003e   \n  \u003c/p\u003e\n\u003c/h3\u003e\n\n## 🗣️ Introduction \u003ca id=\"introduction\"\u003e\u003c/a\u003e\n\n**ft_Transcendence** is a project where the main goal is to build a full-stack web application that allows users to play Pong in real time. In addition to the core functionality, the team is free to define which features the application will offer, as long as it includes at least seven major modules.\n\nThe objective of this project is to deepen the understanding of modern web development, including RESTful and WebSocket communication, secure user input handling, client-server architecture, and containerized deployment using Docker.\n\n## 🧬 Project Structure \u003ca id=\"structure\"\u003e\u003c/a\u003e\n\nThis project consists of three main parts: the `frontend`, the `backend`, and the `database`, all containerized and orchestrated via `Docker`.\n\n* **Backend**: The backend is implemented using Fastify as the server (a Node.js framework) and follows a microservices architecture. It is responsible for handling authentication, user management, game logic, real-time communication (via WebSocket), and database interactions. It exposes a RESTful API and a WebSocket gateway to serve the frontend.\n\n* **Frontend**: The frontend is a single-page application (SPA) built with Vue.js. It consumes the API exposed by the backend and manages the user interface for login, profiles, matchmaking, and gameplay.\n\n* **Database**: Each microservice uses its own dedicated SQLite database to store domain-specific data such as user information, match history, and other persistent records. Migrations and schema management are handled through an ORM (Prisma).\n\nAll services are containerized using Docker and orchestrated with Docker Compose. A Makefile is provided to automate common development tasks such as building images, running containers, and seeding the database.\n\n## 🗃️ Documentation \u003ca id=\"docs\"\u003e\u003c/a\u003e\n\nFor a detailed breakdown of how the project works, please visit the documentation link below:\n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/pin3dev/42_ft-Transcendence/wiki\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Transcendence_Docs-lightgreen?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 🫥 Cloning the Repository \u003ca id=\"cloning\"\u003e\u003c/a\u003e\n\nTo clone this repository and compile the project, run the following commands:\n\n```bash\ngit clone https://github.com/pin3dev/42_ft-Transcendence.git\ncd 42_ft-Transcendence/ft_transcendence\n```\nThis will download the project to your local machine. Once inside the `ft_transcendence` directory, you can run the provided `Makefile` to build and launch the project.\n\n\u003e [!WARNING]\n\u003e Due to macOS security restrictions, do not clone this repository into `~/Downloads` or `~/Desktop`.  \n\u003e Use a directory like `~/Documents` or `~/Projects` to ensure Docker can access the files properly.\n\n## 🕹️ Compilation and Usage \u003ca id=\"usage\"\u003e\u003c/a\u003e\n\n### Makefile\n\nThe project comes with a `Makefile` to automate the compilation process. The Makefile includes the following rules:\n\n- `all`: Compiles the server and client programs.\n- `clean`: Removes object files.\n- `fclean`: Removes object files and the executables.\n- `re`: Recompiles the entire project.\n\n- `all`: Generates environment keys, builds the static frontend, builds all Docker images, and starts the application.  \n- `keys`: Generates the .env file if it doesn't exist.\n- `static-frontend`: Builds the frontend statically using a temporary builder container.\n- `build`: Builds all Docker images.\n- `run`: Starts the containers in detached mode.\n- `stop`: Stops all running containers.\n- `iclean`: Stops containers and removes images.\n- `vclean`: Same as iclean, but also removes volumes.\n- `fclean`: Cleans up everything including Docker system cache.\n- `re`: Runs a full clean and rebuild from scratch.\n- `exec \u003cservice\u003e`: Opens an interactive shell inside the specified container.\n- `status \u003cservice\u003e`: Shows logs for the specified container.\n- `dls`, `vls`, `ils`, `nls`: Inspect Docker containers, volumes, images, and networks.\n\nTo compile the project, run:\n```bash\nmake\n```\n\u003e ⚠️ Note: On macOS, make sure Docker Desktop is running before executing make, as the build depends on the Docker daemon being active.\n\n### Basic Usage\n\nThe terminal will display the Docker build and startup logs.  \nOnce complete, all services will be up and running in the background.\n\n1. Open the application in Google Chrome by navigate to `https://localhost`. This will open the website locally.\n\n2. Feel free to register an account and navigate through the application’s features, including profile and Pong matches.\n\n\u003e [!TIP]\n\u003e To play against another player, you’ll need to use a second computer connected to the same local network, such as another 42 school machine within the same cluster.\n\n### Playing with Another Player\nTo enable secure HTTPS access from another device on the same local network, follow the steps below:\n\n🔹 On the host machine (the one running the server):\n1. After running make, locate the file named `transcendence.pem` in the root of the project directory. \n2. Share the `transcendence.pem` file with all users who will access the app from a different machine.\n3. Run the following command to get the host machine's local IP address:\n```bash\nmake ip\n```\n4. Copy the IP address shown after, and save this IP — it will be used later by secondary machines to access the site.\n```bash\n🌐 LOCAL_IP = \u003cIP\u003e\n```\n\n🔹 On each secondary machine (client):\n1. Open Google Chrome and navigate to `Settings \u003e Privacy and security \u003e Security \u003e Manage certificates`\n2. Switch to the `Authorities` tab, click `Import...`, and select the `transcendence.pem`file received from the host.\n3. In the dialog that appears, check the option `Trust this certificate for identifying websites` Then confirm and complete the import.\n4. Open Google Chrome and go to:\n```bash\nhttps://\u003chost-ip\u003e\n```\n5. Replace `\u003chost-ip\u003e` with the IP address you saved.\n\nOnce the certificate is trusted and the correct IP is used, the secondary device will be able to access the application securely, and both players can use the platform simultaneously to play together.\n\n## ⚠️ Norms and Guidelines Disclaimer \u003ca id=\"norms\"\u003e\u003c/a\u003e\n\nIn this project, the following modules were implemented with the aim of adhering to the specifications defined in the subject document:\n\n```mermaid\nmindmap\n  root((Project Overview))\n    🌟 Majors\n      🌐 Web\n        Backend framework for API exposure\n      👥 User Management\n        Persistent user sessions\n      🎮 Gameplay and UX\n        Remote multiplayer support\n      🔐 Cybersecurity\n        JWT Authentication\n        2FA Implementation\n      ⚙️ DevOps\n        Microservices architecture\n      🕹️ Server-Side Pong\n        Server-controlled game engine\n        Public API for gameplay interaction\n    🔹 Minors\n      🌐 Web\n        Frontend framework for UI and state management\n        Relational database for persistence\n      ♿ Accessibility\n        Cross-browser compatibility\n```\n\n\n## 📖 Theoretical Background \u003ca id=\"theoretical\"\u003e\u003c/a\u003e\n\nAll the theoretical material used to study and carry out this project is organized in the tags described at the beginning of this README.\nIn addition, these materials can be accessed directly via the link provided below.  \n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/pin3dev/42_Cursus/tree/main/library/#06-ft_transcendence\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Transcendence_Theory-gray?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpin3dev%2F42_ft-transcendence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpin3dev%2F42_ft-transcendence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpin3dev%2F42_ft-transcendence/lists"}