iaurg / 42-transcendence Goto Github PK
View Code? Open in Web Editor NEWSoon, you will realize that you already know things that you thought you didn’t
Home Page: https://www.42transcendence.me
License: GNU Affero General Public License v3.0
Soon, you will realize that you already know things that you thought you didn’t
Home Page: https://www.42transcendence.me
License: GNU Affero General Public License v3.0
This study plan outlines the steps to develop a Pong game using websockets and the Socket.IO library within the NestJS framework. The goal is to create a real-time multiplayer Pong game where players can compete against each other online.
Familiarize yourself with the basics of NestJS (relates to #19)
Study websockets and Socket.IO:
Design the architecture of your Pong game:
Implement the backend:
Build the frontend:
Test and debug:
Precisamos de pelo menos 1 encontro de 30min na semana para que possamos avançar no projeto de forma organizada. Podemos desenvolver de modo assíncrono depois que tivermos tudo organizado.
Step 1: Setting up NestJS Prisma with PostgreSQL
app.module.ts
Step 2: Setting up the Websockets Gateway
$ nest g gateway app
app.gateway.ts
file with the necessary codeStep 3: Creating the NestJS Controller and Service
app.service.ts
file with the necessary codeapp.controller.ts
file with the necessary codeStep 4: Implement socket connection events:
Add .github/workflows/[action_name].yml
file with unit tests from nest
Code with Vlad
https://www.youtube.com/@CodeWithVlad/videos
NestJs Course for Beginners - Create a REST API
https://www.youtube.com/watch?v=GHTA143_b-s
NestJS in 100 Seconds
https://www.youtube.com/watch?v=0M8AYU_hPas
docs nestjs
https://docs.nestjs.com/
Analisar component implementado com lógica em loop
get User Data from 42 API
Create controllers and DTOs about the user.
After a user logs in (after Intra's Oauth2), there has to be a way to persist the session for a period of time in order to prevent constant login.
This is solved by generating a JWT and giving to the user to save somewhere (cookies, basically) and use in the transactions with our application.
In the backend, there needs to be the following:
@iaurg Blocked issue, @caio-vinicius has to be added to the repo as a maintainer.
Originally posted by @vcwild in #20 (comment)
expected format:
[
{
name: "example",
avatar: "https://url.data.co.uk",
wins: 1,
isFriend: false,
},
]
https://docs.nestjs.com/techniques/database
You can also directly use any general purpose Node.js database integration library or ORM, such as MikroORM (see MikroORM recipe), Sequelize (see Sequelize integration), Knex.js (see Knex.js tutorial), TypeORM, and Prisma (see Prisma recipe), to operate at a higher level of abstraction.
PDF rules
General:
Security:
User Account:
Chat:
Game:
Modelos:
https://excalidraw.com/#room=65733053a2453906890f,U0koJjBm_okx7N2PbnrWGQ
https://excalidraw.com/#room=fb6fae1d831e045fdafd,YYe9KxHGi8MoupYT0ZtAYQ
Set up the development environment: Install and configure the required software tools and libraries, including NestJS, TypeScript framework, and PostgreSQL database.
Design the user interface: Create wireframes and mockups of the website's user interface, including the game interface, chat, user profiles, and login page.
Implement the user authentication: Integrate the OAuth system of 42 intranet for user login, and implement password hashing and server-side validation for forms and user input.
Implement user account features: Allow users to choose a unique name and upload an avatar, enable two-factor authentication, and allow users to add friends and view their profiles and match history.
Design and implement the chat functionality: Create chat rooms with public, private, and password-protected channels, allow direct messages between users, and implement blocking, kicking, and muting features for channel administrators.
Design and implement the game functionality: Create a responsive Pong game with matchmaking, customization options, and multiplayer capabilities.
Test the website thoroughly: Ensure the website is compatible with the latest stable versions of Google Chrome and one additional web browser, and test for security vulnerabilities, errors, and warnings.
Deploy the website: Launch the website with a single call to docker-compose up --build, and ensure it is running smoothly on the production environment.
Maintenance and updates: Monitor the website for issues and updates, and ensure it remains up-to-date with the latest stable versions of the software tools and libraries used in the project.
Send an authentication code to the email received from the 42 API /user/me.
Validate the code.
Victor GPT tip:
Sure, here is a brief list of the roles for the team:
Backend Developer - responsible for developing the backend of the website using NestJS and PostgreSQL, ensuring security and handling server-side validation.
Frontend Developer - responsible for developing the frontend of the website using a TypeScript framework of their choice, ensuring a nice user interface and compatibility with multiple web browsers.
DevOps Engineer - responsible for setting up the server environment and deploying the website using Docker and docker-compose.
Authentication and User Account Developer - responsible for implementing the OAuth system of 42 intranet for user login, user account management, and match history features.
Chat and Game Developer - responsible for implementing the chat system, matchmaking system, and the live Pong game with customizable options.
We need to set the initial project milestones.
These milestones might be synced with the !project/1 weekly deliveries and are subject to change.
Relates to #10
The backend of Authentication with Intra's Oauth2 is functional and emits JWT to handle auth along the app.
The frontend is not yet connected to the authentication system.
Add chat components to front-end
TODO:
Create flow of creation and retrieval of users assuming that authentication with 42 Intra is already done.
We can use tools to ease up the CSS development like Tailwind, ChakraUI, Patternfly and use its components or styles on top of our own wireframe.
Pages:
Tentei iniciar o projeto em uma maquia "zerada" no campus da 42 instalando tudo e tentando rodar o dev container na última versão 0.304.0 | 8/4/2023 porem ele não funciona
Precisei rodar o seguinte comando para instalar uma versão passada e fazer
code --install-extension [email protected]
It is required that the user authenticates with 42's Intra Oauth2.
This requires an Authorization Code Flow (AKA web auth).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.