Giter VIP home page Giter VIP logo

ft_transcendence's Introduction

Welcome to ft_transcendance !

Folder stucture

We have 3 main folders:

  • api that contains the Nest.js application, which is the API backend of our application
  • front that contains the React.js application, which is the frontend UI for our application
  • db that contains nothing for now but might contains the database schema specifications (tables and all)

Each of the api and front directories have their own directions on how to start their application so you can check there for more informations.

How to run the project

There is two main ways to launch this application, one for development and one for production, and everything can be done with Docker and the Makefile

The Dev environment

In order to start the project with the objective to develop something either on the API or on the front you can run make dev.
This will automaticaly build the images for you and launch the project and the containers with everything.
You can now open your favourite code editor and start coding some feature (I see you, start working now).

The Prod environment

If you want to start the project in its final and optimized form in order to ship it for production on a server, go ahead and type make prod
This will compile and start the project with everything ready for production.
Be aware that in this environment you CANNOT dynamically change files to modify the render. If you want to change something you need to rebuild the application.

Usefull commands for the project

There is some commands to help you visualize what is happening inside the containers. I'll let you check more in depth the Makefile for more infos but here is it works in general:
When you see %.something, this means that the rule is available for both dev and prod environment. But you need to add dev or prod before all of your commands.
Let's take the example of the %.logs command. If you started your environment in dev mode with make dev you need to use the command make dev.logs in order to see the logs of your containers. If you want to cleanup your environment you will do make dev.clean.
And its the same for every command

ft_transcendence's People

Contributors

b-ki avatar leobesnard avatar bilaboz avatar pastequee avatar nthimoni avatar

Watchers

 avatar

Forkers

nthimoni

ft_transcendence's Issues

Auth module tests

Write the test architecture. Test file for :

  • module
  • controller
  • service

User module tests

Write the test architecture. Test file for :

  • module
  • controller
  • service

Setup the project and the Docker stuff

Need to create the React projet and the Nest.js project to be able to start each end of the development.
Also need to setup the docker-compose to launch either in production and in development

Modify useApi() to use parameters such as 'enabled'

useQuery can use a parameter 'enabled: boolean', with a condition that triggers the query or not (example : don't do request if no token, enabled: !!token)
useApi() uses useQuery but we can't provide { enabled: condition } in it.

Ajouter l'ID et le createdAt du channel pour l'event `youJoined`

Actuellement après avoir créé un channel, l'event youJoined est trigger, or il ne contient que les champs name et type. Alors que pour channelList et joinedList il y a aussi l'id et le createdAt ce qui est vraiment pratique. Ça rends les return values tres incohérentes.

La structure d'un message n'est pas harmonisée

Les requetes history et message ne return pas la meme stucture de donnée pour un message ce qui est très embetant.
history retourne:

interface MessageType {
  id: number;
  creadtedAt: string;
  content: string;
  channelId: number;
  authorId: number;
  author: User;
}

Alors que si on listen sur message ça retourne:

interface MessageType2 {
  content: string;
  channel: string;
  user: User;
}

Resultat tres embetant pcq du coup je ne peux pas stocker un tableau d'un type MessageType puisque la structure change en fonction de comment je recupere l'info

Regroup all tests in the test/ folder

project-root/
├── src/
│ ├── app.module.ts
│ ├── ...
├── test/
│ ├── app.e2e-spec.ts
│ ├── user/
│ │ ├── user.service.spec.ts
│ │ ├── user.controller.spec.ts
│ └── ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.