This repository contains all the code od the Foodai app. In this doc we will cover this:
- Technology used and requirements.
- Project structure.
- How to run the project.
This Project consists in a Basic SPA with React.js and a Node.js server. We are using this technologies:
- Node.js
- Typescript for both, client and server code
- React.js for the client code with Vite bundler.
- Docker to run the local DB
- Postgres as a DB.
- Prisma as an ORM.
- Zustand as state manager.
As a requirement, you need a Node.js version higher than 18 and LTS. We are also using prettier to format the code.
├── client/src
│ └── assets
│ └── components
│ └── constants
│ └── Layouts
│ └── pages
│ └── services
│ └── session
│ └── store
└── server/
├── config/
├── controllers/
├── docker/
├── docsValidator/
├── models/
├── prisma/
├── routes/
├── tests/
├── app.ts
├── server.ts
We have two main folders client
and server
. As we are doing a monolith Architecture we have a monorepo with both frontend and backend code.
On each folder you will find more info about them in their README.md files. Only ONE IMPORNTANT THING, as we are using npm workspaces the way of installing packages is this:
# For example debug package in the server code
npm i --save debug -w server
# For example yup in the frontend
npm i --save yup -w client
Install dependencies.
npm i
Probably if you work on the backend or the client you need to add a .env
file. More info in their README.md files.
If you are going to work in the backend we recomment to install a postgres database client like DBeaver and execute this command.
npm run init:db
- Fix bingo logic
- show winner
- deploy
- frontend improvements bngo
- logout on finish
- frontend improvements create game
- Local supabase
- Testing backend
- testing frontend