Develop a full-stack Single Page Application with several features such as an online multi-player game, as a chat or a social page
NestJS(server), Prisma(ORM), Postgresql(DB), Redis(Cache DB), Sagger(API Doc)
React(Framework/Library), Vite(Tooling)
Docker-compose, Github(CI/CD)?
This project need a .env file to work. Here is an example: .envexample. All variables in the example file are necessary.
Need genuine .key and .crt files in the backend directory to make https working. Or you might want to disable the "httpsOptions" and remove the file reading part in main.ts.
(Is set disabled for now.)
-
Clone this repo.
via ssh:git@github.com:JAS0NHUANG/ft_transcendenc.git
via https:https://github.com/JAS0NHUANG/ft_transcendenc.git
-
Create the .env file in the project root directory from .envexample and set all the variables inside.
-
make
npm install --save-dev eslint prettier @typescript-eslint/eslint-plugin eslint-plugin-prettier eslint-config-prettier lint-staged husky
No need to run npx eslint --init
since the .eslintrc.js was created automaticly by nestjs and react-vite
add following config into package.json:
{
"lint-staged": {
"backend/**/*.{ts,tsx}": [
"eslint ./backend --fix",
"prettier --write ./backend"
],
"frontend/**/*.{ts,tsx}": [
"eslint ./frontend --fix",
"prettier --write ./frontend"
]
}
}
add following config into package.json:
"scripts": {
"configure-husky": "npx husky install && npx husky add .husky/pre-commit \"npx --no-install lint-staged\""
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
npm run config-husky