Yet another ts boilerplate. With tRPC and openapi.json auto generated docs.
My aim was to create something,
- simple and flexible
- maximum reusability
- minimal configuration
- with as few dependencies as possible
TODO: describe
- env: dotenvx
- dev: pm2 and tsx
- test: vitest
- build: tsc
- docker: build & deploy
- gcloud: build & deploy
TODO: description of features
TODO: environment config
- use .env.local with dotenvx
- dynamic secret loader with local dev key from Secret Manager
TODO: description of dev environment and features TODO: testing with github actions
Dockerfile included, modify as needed. The following commands are included for convenience, modify as needed.
- npm run docker:build
- npm run docker:start
The following commands are included for convenience, modify as needed.
- npm run gcloud:build
- npm run gcloud:deploy
Recommended steps
- Use Secret Manager to store environment variables
- Create a service account with the necessary permissions
- grant this account
- secret manager secret acessor
- cloud run user
- service account user
- grant this account
npm run gcloud:deploy will load the secrets directly to the cloud run service.
TODO: testing with github actions
- typescript
- gts (eslint / prettify without bikeshedding)
- express
- pm2
- zod
- vitest
- supertest
- docker
- winston
- sentry
- newrelic
TODO: give credit to helpful packages and content creators
- actually complete this readme.
- sample schemas
- zod to openapi generation
- openapi to docs generation