Skip to content

diegoaltoworks/ts-node-api

ts-node-api

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

Features

TODO: describe

  • env: dotenvx
  • dev: pm2 and tsx
  • test: vitest
  • build: tsc
  • docker: build & deploy
  • gcloud: build & deploy

Development

TODO: description of features

TODO: environment config

  • use .env.local with dotenvx
  • dynamic secret loader with local dev key from Secret Manager

Testing

TODO: description of dev environment and features TODO: testing with github actions

Build & Deploy

Deploy to docker

Dockerfile included, modify as needed. The following commands are included for convenience, modify as needed.

  • npm run docker:build
  • npm run docker:start

Deploy to Google Cloud Platform

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

npm run gcloud:deploy will load the secrets directly to the cloud run service.

Deploy from github action to Google Cloud Platform

TODO: testing with github actions

Stack

Inspiration

TODO: give credit to helpful packages and content creators

even more TODO

  • actually complete this readme.
  • sample schemas
  • zod to openapi generation
  • openapi to docs generation

About

I know, yet another ts boilerplate, with `tRPC` and `openapi.json` auto generated docs.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors