This is the backend system for the TartanHacks software suite.
- Create a Doppler Account here.
- Get an invite to the ScottyLabs Doppler workspace by reaching out to David Hwang
- Install the Doppler CLI by following the installation instructions here.
- Login to doppler with the CLI by running
doppler login --scope ~/project-dir
- Run
npm install
to install packages - Run
npm run build
- Run
npm run dev
to run the project in dev mode. - See the swagger endpoint documentation by visiting
/docs
https://www.figma.com/file/TXPqZa0vUg3BNw9fHGn9vT/TartanHacks-Model?node-id=1%3A6
Please install Prettier
in your VS Code workspace. The workspace has configuration files for helping
you adhere to the project style guidelines. Before commits, please make sure
that your code is formatted correctly by running npm run lint
We are using Jest for testing.
For any functions or endpoints you write, please write the appropriate tests
in the tests
folder. Before committing, please make sure that all tests
pass.
We also have CI configured through GitHub actions. These will show you if your commit builds and passes all tests.
If you need to create any new environment variables, add an example to .env.template
and make sure to add it as well to .github/workflows/main.yml
so that CI
passes
To view code coverage, run npm run coverage
In order to configure a new email template, create a folder under email-templates
.
In that folder, create your mjml templates. Also,
create a file called index.ts
which exports the rendered html by calling
mjml2html on your template file
and indexing on the html
field. See email-templates/verification
for an example.
In email-templates/index.ts
, make sure to include your folder in the default
export so that the email service can detect your newly added template.