transcendence's Issues
:lock: Securely Store Application Secrets
Problem
Currently, our application's secrets for databases and other sensitive data are hard-coded in our codebase. This is a security risk and goes against best practices. We need a way to securely store these secrets and share them with the team.
Proposed Solution
Implement a file to store all our secrets. This file should not be committed to the repository. Instead, we will replace all secrets in our codebase with references to these environment variables.
To-Do
- Create a file and add it to .gitignore
- Replace all hard-coded secrets with environment variables in both databases and Python services
- Update Docker Compose files to use environment variables
- Share file with the team via Discord
.env.example file
To help with the setup, we will also create a .env.example file. This file will contain all the necessary environment variables but with placeholder values. When a developer clones the repository, they can copy this file to a local .env file and replace the placeholders with real values. The .env.example file will be committed to the repository.
Tournament backend misspelled
The field for "tournement_name" is misspelled it should be "tournament_name"
It is in the api: /create-and-list
Enable testing from outside the school network
We need to be able to test the application from outside the school network, as the team is distributed and not always on the network. One possible solution could be to use ngrok or a similar tool to expose our local server to the internet. Additionally, we should automate this process in our Docker Compose setup.
make the game logic of the game works in the server
see how we can connect the logic with websockets in the server
test1
test
Create spa router in vanilla js
I will create the client side router such and a little test showing that the pages change with each link. I will try and make it serve just one html file and I will add browser history navigation functionality as well.
๐ง Automated Testing Improvements
Description:
We need to improve our automated testing strategy. Here are some tests we could implement, ranging from easy to more complex but useful:
-
Ping Test for (Easy): A simple script that pings the and checks if it's responsive.
-
HTTP Request to the Pages (Medium): Tests that send HTTP requests to our pages and check the responses. This can be done using tools like or HTTP libraries in most programming languages.
-
Service Health Checks (Medium): If our application exposes a health check endpoint, we can write tests that check this endpoint.
-
Browser Automation Tests (Hard): Tools like Selenium, Puppeteer, or Playwright can automate a real web browser and interact with our pages as a user would. They can be configured to accept self-signed SSL certificates. These tools can be used for end-to-end testing of our application.
Tasks:
- Implement the Ping Test for
- Implement the HTTP Request to the Pages
- Implement the Service Health Checks
- Implement the Browser Automation Tests
Tournament match details
Implement tournament details to see the match settings for each tournament -> is there an api endpoint for this info?
Create API endpoints for game service
See page 26 of the subject:
โฆ Design and implement the API endpoints to support game initialization, player
controls, and game state updates.
Generate tournament brackets
Potentially use threejs to make cool circular tournament brackets
Portainer Disconnection Issue
๐ Portainer Disconnection Issue
Problem:
Portainer CE disconnects after 5 minutes of activity due to the creation of an account. This behavior is not ideal for our use case.
Expected Behavior:
Portainer should remain connected beyond the 5-minute mark, even after an account has been created.
Proposed Solution:
Implement a mechanism to automatically create an account from environment variables if none exists. This should prevent the disconnection issue.
Steps to Reproduce:
- Start Portainer CE using the Dockerfile in
srcs/requirements/portainer/Dockerfile
. - Create an account.
- Wait for 5 minutes.
- Observe that Portainer disconnects.
Environment:
- Portainer version: CE (exact version can be found in
srcs/requirements/portainer/Dockerfile
) - LOCAL_IP: ${LOCAL_IP}
- CODESPACE_URL: ${CODESPACE_URL}
TODO:
- In your Dockerfile for Portainer, add an
ARG
directive for the admin password:ARG ADMIN_PASSWORD
. - In the command that starts Portainer, use the
--admin-password
flag with theADMIN_PASSWORD
argument:CMD ["portainer", "--admin-password", "${ADMIN_PASSWORD}"]
. - In your
docker-compose.yml
file, add theargs
directive under thebuild
directive for the Portainer service. Set theADMIN_PASSWORD
argument to the bcrypt hash of your password. - Deploy the updated Dockerfile or docker-compose file.
- Verify that Portainer remains connected beyond the 5-minute mark after an account has been automatically created.
Labels: enhancement
Assignee: ""
Make docker-compose run on codespace and school
Add rule to makefile to export XDG_RUNTIME_DIR if it is empty that way it always runs
production-mode-broken
The react app in production mode is broken. It doesn't have any svgs or images for some reason.
pending_username from signup page
in def verify_one_time_code() there is no pending_username on session when the request sent by signup page.
Front-end desyncrhonization during remote gameplay
During the game play, when the ball is reset to the middle the second player will experience a "disconnection".
He cannot see the paddles moving, however the webscoket connection is still working (we can see his paddle move from the other player's perspective)
Temporal fix: If the ball is reseted again the player resynchronize ?!?!
fix the ball-paddle collisions
the ball goes into the paddle a little
add a mode that play with BOT
play against the machine in the client
make background in tha game
try to put a background with three.js
๐ Fix Redirection and Docker Compose Configuration
Description:
While adding the possibility to access through codespace to the code, we are entering the local IP (for e.g.: 12.50.20.2) it doesn't redirect properly anymore. The file RemoteGame.js
from react-app
has to be fixed.
Temporary Fix:
In RemoteGame.js
, use the following line:
const io_url =`://:9443`
Also, the Docker Compose configuration for react-dev
is broken.
Docker Compose Temporary Fix:
In docker-compose.yml
, use the following labels for react-dev
:
labels:
- "traefik.enable=true"
- "traefik.http.routers.react-dev.rule=Host(``)"
- "traefik.http.routers.react-dev.entrypoints=websecure"
- "traefik.http.routers.react-dev.service=reactDevService"
- "traefik.http.routers.react-dev.tls.certresolver=myresolver"
- "traefik.http.services.reactDevService.loadbalancer.server.port=8033"
Tasks:
- Fix redirection issue in
RemoteGame.js
- Fix Docker Compose configuration for
react-dev
Create document for each endpoint in the Read.me
See page 21 of subject:
โฆ Implement communication mechanisms between microservices, such as REST-
ful APIs or message queues, to facilitate data exchange and coordination.
See 42 api docs:
https://api.intra.42.fr/apidoc
fill out options page
Create the outline of the options page. Potentially connecting with amandas api. Even if nothing is in place I can just send something to test that it works. For example a setting that changes the color of the ball.
:bug: WebSocket Connection Issue
Problem: The frontend attempts to establish a WebSocket connection (wss://) to https://game.localhost:9443, but this fails initially because the game.localhost certificate isn't trusted by the browser. Solution: Manually navigating to https://game.localhost:9443 to accept the certificate allows the WebSocket connection to proceed. We need to find a way to trust the certificate automatically to improve the user experience. ๐ค
Fix server/client game loops behavior
GDPR minor module
Data Processing Purpose and Consent:
+explicit consent from users for collecting and processing personal data
+user data anonymization
+account deletion
encrypt email address on db
Create function for frontend api requests
I'm going to create a simple function that everyone will use for all api requests in react. It will support GET, POST, DELETE and PUT. I will be using the axios library because it is simpler and more intuitive in my opinion.
add text in game window
Add the score and other text such as "WIN!" and "LOSE!" and "GAME OVER!" -> see how it can be done in ThreeJS
Connect tournament API
let there be collisions
:gear: Production Access Issue
Problem: For production, we need to change so that we do not need to access production.localhost but redirects to localhost directly. Task: This task is to implement this change to improve the production environment.
fix-variant-ball-speed
Make sure the ball speed is the same on all devices and that React with threeJS is not implemented in an inefficient way.
end-points-for-tournament
Have to create any endpoints for the tournaments, the endpoints are detail in figma
Make multiple concurrent multiplayer matches
Either let the frontend initiate the match or create a map of matches
Setup API Auth Between Backend Services
We need to setup a good way of authenticating all inter-service api communication that way we can be sure that the api requests come from our services rather than a malicious actor.
Do data validation on login
Make sure proper data validation is done on login and handle visual response to invalid data.
Front-end-tournament-connection
We have to create a fetch function to connect the API backend to the frontend in vanilla java script
Front-End-For-Tournament-Backend
Do data validation for tournament api requests
Make sure proper data validation is done and handle visual response to invalid data
Login Page Frontend
add a timout mode and score mode
In a mode the game can last 2 minutes for example and the player that have more points will win
And the score mode the player that have 10 points for example wins
fix the new pure java game client
๐ง Improvement: Override LOCAL_IP and CODESPACE_URL in Makefile
Description:
When the Makefile is running, each time we add LOCAL_IP and CODESPACE_URL. So they keep adding up infinitely! We want to always override both LOCAL_IP and CODESPACE_URL.
Possible Solution:
One solution could be to modify the script that writes to the .env file to first remove any existing LOCAL_IP and CODESPACE_URL entries before adding the new ones. This way, we ensure that we always have the latest values for both variables.
Here's a pseudocode representation of what that might look like:
- Open the .env file
- Read the file line by line
- If a line starts with LOCAL_IP= or CODESPACE_URL=, remove that line
- Write the new LOCAL_IP and CODESPACE_URL values to the file
Tasks:
- Modify the script to remove existing LOCAL_IP and CODESPACE_URL entries in the .env file
- Test the solution to ensure it works as expected
Create Profile Page frontend
See page 12 of the subject:
- Users can select a unique display name to play the tournaments.
- Users can update their information.
- Users can upload an avatar, with a default option if none is provided.
- Users can add others as friends and view their online status.
- User profiles display stats, such as wins and losses.
- Each user has a Match History including 1v1 games, dates, and relevant
details, accessible to logged-in users.
Create 2FA options for SMS and authenticator apps
We misunderstood the subject! You need to implement email, sms and authenticator options.
Protect the Routes of the Website
Make sure that users can't access the website when not logged in. Also make sure each API is validating the user token and sending 403 unauthorized if not logged in.
Protect against SQL injections
See page 7 in the subject: Your website must be protected against SQL injections/XSS
2FA - major module
tmp_for_auth branch is done with JWT(with 'username'), now it is sending cookies with jwt when user log in.
this branch is for 2FA (email-based verification)
Add bind mounts to game for instant updates
Add bind mounts to game/ folder and also ssl/ folder so that updates apply instantaneously
:whale: Docker Compose Configuration Issue
Problem: We need to move the Traefik information from the Docker compose files to the traefik.yml config file. Task: This task is to implement this change to improve the organization and readability of our Docker configuration.
Landing page frontend
Create Play, Login and Options menu
:whale: Docker Compose Configuration Issue
Problem: We need to check if Docker opts can be removed safely at school because of rootless mode. Importance: This is important to ensure that our Docker compose setup is as clean and efficient as possible, and doesn't include unnecessary configuration. ๐ ๏ธ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.