Skip to content

dgma/nodejs-web3-starter

Repository files navigation

Quality gate

automation-node-starter

Development starter kit for web3 node.js apps

Features

  • Typescript & with tsx
  • Jest for unit testing
  • linters, code formatter, pre-commit and pre-push hooks
  • Docker & Docker-compose for dev & prod.
  • Custom github action and quality gate workflow for fast CI strategy implementation
  • Flexible env configuration with encryption, thanks to dotenvx

Requirements

  • Git
    • You'll know you've done it right if you can run git --version
  • Node.js v20+
  • Make
  • Optional. Docker
    • You'll need to run docker if you want to use run production container builds locally

Installation

make

Configuration

Local development

  1. Create and modify .env and .local.secrets.env files:

    cp conf/.example.env conf/.env \
    && cp conf/.example.secrets.env conf/.local.secrets.env

Production

  1. Create and modify .env and .production.secrets.env files:

    rm conf/.production.secrets.env \
    && cp conf/.example.env conf/.env \
    && cp conf/.example.secrets.env conf/.production.secrets.env

    note: you can commit .production.secrets.env after encryption

  2. Encrypt prod secrets:

    make encrypt.prod
  3. Keep generated .env.keys safe and do not commit it into repo

Running

Without docker:

# development mode
make start.dev
# development mode, watch & debug
make start.debug
# production mode
make start.prod

With docker

# development mode, watch mode & debug
docker compose up
# production mode
make up.prod

Contributing

Contributions are always welcome! Open a PR or an issue!

Notes

And you probably already have make installed... but if not try looking here.

About

Development starter kit for web3 node.js apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published