Loading repository dataβ¦
Loading repository dataβ¦
cydeorg / repository
π Production-ready boilerplate with query validation and dynamic typing with Typescript. A highly scalable foundation API, with focus on security, and best practices. Below a live example :
The project required Node.js v16 or later.
To clone the repository, use the following commands:
git clone https://github.com/Cyril-Deschamps/fastify-typescript-prisma-boilerplate.git
mv fastify-typescript-prisma-boilerplate your-project-name
cd your-project-name
yarn install
watch - start project in dev mode with hot reload,start - start JS Project,build - transpile TypeScript to ES6,prepare - to install husky hooks,migrate - migrate Prisma schema to remote database,npm-run-all lint-check:\* - Process eslint and prettier checks,npm-run-all lint-fix:\* - Process eslint, prettier checks and try to resolve,Secrets are stored in github secrets. For a local environment, you can use the .env file to store the secret (see .env.example).
| Variable | Description | Exemple |
|---|---|---|
APP_SECRET | The secret used for the cookies (32 chars recommended) | UΒ£,rGtD~Fm;1TY9!Zmpz&R7q&0Sdz@2H |
APP_CORS_ORIGIN | List of the CORS in the shape | http://localhost,https://cyrildeschamps.fr |
| Variable | Description | Example |
|---|---|---|
DEVELOPMENT_APP_BACKEND_PUBLIC_URL | HTTP API address | https://boilerplate.cyrildeschamps.fr |
DEVELOPMENT_APP_FRONTEND_PUBLIC_URL | Web application address | https://boilerplate.cyrildeschamps.fr |
DEVELOPMENT_APP_DATABASE_URL | Database URL | mysql://user:password@hostname:ip/dbname?schema=public |
DEVELOPMENT_HOST | Deployment server IP | 66.254.114.41 |
DEVELOPMENT_PORT | Deployment server SSH port | 22 |
DEVELOPMENT_SSHKEY | SSH key for connecting to the server | See server's .ssh/id_... file |
DEVELOPMENT_USERNAME | Username for connecting to the server | debian |
DEVELOPMENT_DOCKER_IMAGES_PATH | Name of the folder where the project is stored on the server | /home/debian/docker-container-images |
DEVELOPMENT_DOCKER_LOCAL_IP | Local IP (nginx) of the container | 172.0.0.18 |
| Variable | Description | Example |
|---|---|---|
PRODUCTION_APP_BACKEND_PUBLIC_URL | HTTP API address | https://cyrildeschamps.fr |
PRODUCTION_APP_FRONTEND_PUBLIC_URL | Web application address | https://cyrildeschamps.fr |
PRODUCTION_APP_DATABASE_URL | Database URL | mysql://user:password@hostname:ip/dbname?schema=public |
PRODUCTION_HOST | Deployment server IP | 66.254.114.41 |
PRODUCTION_PORT | Deployment server SSH port | 22 |
PRODUCTION_SSHKEY | SSH key for connecting to the server | See server's .ssh/id_... file |
PRODUCTION_USERNAME | Username for connecting to the server | debian |
PRODUCTION_DOCKER_IMAGES_PATH | Name of the folder where the project is stored on the server | /home/debian/docker-container-images |
PRODUCTION_DOCKER_LOCAL_IP | Local IP (nginx) of the container | 172.0.0.19 |
You can support this project by contributing to it, by posting issues and proposing pull request.
Licensed under the APLv2. See the LICENSE file for details.