*This guide is a work in progress in the feat/nico/cfs-in-backend
branch
We are migrating all the coordinator functionalities from Google Cloud Functions to an independent API application built using NestJS (Typescript) and SQLite3. This new app is located in the /packages/api
directory.
To deploy the Coordinator API locally for testing purposes you need to follow these steps:
packages/api
yarn install
(could be done globally in the root directory).env
file (you can clone it with cp .env.default .env
ADMIN_ID
is the Github username of the API adminJWT_SECRET
a seed secret for the authentication JWTsJWT_EXPIRES_IN
when the authentication JWTs expireDB_STORAGE_PATH
where the database files will be storedDB_SYNCRONIZE
if true, use the existing database filesGITHUB_CLIENT_ID
check Authentication ServiceGITHUB_SECRET
check Authentication ServiceGITHUB_CALLBACK_URL
use the API route (in local should be http://localhost:3000/auth/github/callback)GITHUB_ACCESS_TOKEN
create a personal token (for rate limiting purposes)AWS_*
keys check Amazon Web Service (AWS) account (required to use AWS S3 Storage, Lambda, SNS and EC2).yarn run start:dev
After you run the coordinator API application you will be able to interact with it using some of the CLI commands. For example to run a new ceremony:
yarn run auth:github
and follow the instructionsyarn run ceremony:create --template=configFile.json
(use the template from https://github.com/privacy-scaling-explorations/DefinitelySetup/tree/main/ceremonies#template-in-details/api/src/ceremonies/service/ceremonies.service.ts
in the startCeremony
and stopCeremony