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.0Once node and npm are installed via Volta you can install pnpm
$ volta install pnpm@10.6.0You 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 bootstrapThis will build all submodules, install dependencies and build the application.
Many commands are mapped onto the root package.json but for any other pnpm commands you can run them via
$ pnpm run run:app <command># 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:prodNOTE: Running with start and start:debug will spin up dockerized dependencies (e.g. postgres) and run database migrations
# spin up complete docker environment
$ pnpm run run:app docker:up:test
# spin down complete docker environment
$ pnpm run run:app docker:down:testNOTE: Running this spins up services in a different container from the one used in pnpm run start and is used for Quiet E2E tests.
# 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
# migrate database with existing migrations
$ pnpm run run:app migrate:up# unit tests
$ pnpm run run:app test
# e2e tests
$ pnpm run run:app test:e2e
# test coverage
$ pnpm run run:app test:covWe 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- To override package versions that are imported by other dependencies (e.g. overriding a package version imported by LFA) you must put the overrides in the
pnpm-workspace.yamlfile and notpackage.json(for more details see the PNPM docs)