prisca-c / mind-reader

Website that allows users to play a mind reader game. The game is simple, one user have a word given and the other person have to guess the word using other words.
GNU Affero General Public License v3.0
0 stars 1 forks source link

[FEAT] : Make API typesafe and sync it to frontend #3

Open prisca-c opened 6 days ago

prisca-c commented 6 days ago

[FEAT] : Make API typesafe and sync it to frontend

The application is a all-in-one app which include Backend and Frontend in the same root. The issue here is frontend does not have any idea about what's happening in our Backend.

Description

Right now, API calls in the frontend use a custom class which require, when used, a type. This type have to be created and what would be "better" since Frontend and Backend are in the same place and that we use Inertia, is to generate these types from our API route directly and keep them sync with API when updated.

Possible Solution

To achieve this, you can use Tuyau , take a look at each sections except OpenApi since it's only experimental for now and probably wont be left in the package .

bullseye4703 commented 6 days ago

i would love to contribute to this repo please assign this to me.

prisca-c commented 6 days ago

Sure, i assign you this issue !