NodeJS backend is used for the main API.
Use Typescript
Just do it, minimize any. Ask a fellow developer for our tsconfig.json.
Testing
Tests are split up into 2 categories:
Unit tests
Unit tests adhere to the following rules:
- The result is database independent. Database changes should not change test outcomes.
- Avoid using async unit tests. Most async functions use a database or network request, making it an integration test instead of a unit test.
Integration tests
Integration tests should be run periodically. These test take longer and test the whole API, from GraphQL schema to database.
lower-kebab-case filenames
All files should be lower-kebab-case. NPM doesn’t allow uppercase letters in package names.
Database models are Entities
The contract that is stored in the database is called ContractEntity in a file named contract.entity.ts.