Transcendence is a full-stack web application built as part of the 42 curriculum. It combines a real-time multiplayer game (Pong) with social features like chat, friends, and user profiles.
This README provides an overview of the project setup and guidelines for developers working on the codebase.
- Real-time multiplayer Pong game with matchmaking.
- Social features: chat system, friend list, and user profiles.
- User authentication with OAuth2.
- Modern web technologies for a responsive and dynamic user experience.
- Frontend: React, TypeScript
- Backend: NestJS, TypeScript
- Database: PostgreSQL
- Real-Time Communication: WebSockets (via Socket.io)
- Deployment: Docker & Docker Compose
- Node.js (LTS recommended)
- Docker and Docker Compose
- Make
-
Clone the repository:
git clone https://github.com/eunbi0308/Transcendence.git cd Transcendence -
Set up environment variables:
- Create a
.envfile in the root directory. - Use the
.env.examplefile as a template.
- Create a
-
Start the application using the
Makefile:make up
This builds and starts the application.
-
Access the application:
- Frontend:
http://f1r3s12:3001 - Backend API:
https://f1r3s12:3000
- Frontend:
-
Stop the application:
make stop
-
For clean-up:
make clean
frontend/: Contains the React application (frontend code).backend/: Contains the NestJS application (backend code).
.env: Environment variables (backend/frontend).docker-compose.yml: Docker configuration for the project.Makefile: Simplified commands for developers.
# Start the application
makeThat's it! The Makefile handles the setup and runs the application.
- Code Style: Follow the existing code conventions. Use ESLint and Prettier for consistency.
- Environment Variables:
- Backend: Configure OAuth credentials, database connection strings, and WebSocket settings in the
.envfile. - Frontend: Update the API URL if necessary.
- Backend: Configure OAuth credentials, database connection strings, and WebSocket settings in the
- Database:
- Migrations are handled automatically during Docker initialization.
- For manual updates, check the
db/folder.