Quiet Storage Service (QSS)
The Node engine is managed via Volta and should be installed prior to running anything in this README. Instructions for installing volta can be found here.
NOTE: Because QSS uses pnpm
you should add VOLTA_FEATURE_PNPM=1
to an environment file in your shell (e.g. .zshrc
).
Once Volta is installed navigating to this directory should automatically install and use the correct versions of node
and npm
but as a first time setup you can manually install both
$ volta install node@22.14.0
$ volta install npm@10.9.0
Once node
and npm
are installed via Volta you can install pnpm
$ volta install pnpm@10.6.0
You must install Docker
to run QSS locally as we rely on it to run dependencies like Postgres
.
Follow the instructions for your distribution on the Docker website here.
You can either install via Docker Desktop or through brew:
$ brew install docker
$ brew install docker-compose
$ brew install colima
$ colima start
### Dependencies and building the app
```bash
$ pnpm run bootstrap
This will build all submodules, install dependencies and build the application.
# local
$ pnpm run start
# local with debug on
$ pnpm run start:debug
# runs against development databases/services
# NOTE: Don't use this locally if you don't know what you're doing!
$ pnpm run start:dev
# runs against production databases/services
# NOTE: Don't use this locally if you don't know what you're doing!
$ pnpm run start:prod
NOTE: Running with start
and start:debug
will spin up dockerized dependencies (e.g. postgres) and run database migrations
# runs client against local server (you must start the server in a separate terminal!)
$ pnpm run start:client
# runs client against development server in AWS
$ pnpm run start:client:dev
# create a new migration
$ pnpm run migrate:create
# migrate database with existing migrations
$ pnpm run migrate:up
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
We use eslint
and prettier
to format code as well as a husky
precommit hook to verify formatting on commits.
# run prettier
$ pnpm run format
# run prettier with auto-fix
$ pnpm run format:fix
# run eslint
$ pnpm run lint
# run eslint with auto-fix
$ pnpm run lint:fix
# run prettier and eslint -> NOTE: this is run as the precommit hook via husky and lint-staged
$ pnpm run format:lint
# run prettier and eslint with auto-fix
$ pnpm run format:lint:fix