Claimr technical assignment. Task description
API is hosted on Railway. Visit interactive documentation
Warning
Later description is outdated. There is bun, elysia, new IOC and configs, tests are broken
- Clone this repository
- Install Docker
- Copy
config.docker.template.yaml
file asconfig.docker.yaml
- (Optional) Provide
.env
file to change MySQL credentials indocker-compose.yml
. Reflect changes toconfig.docker.yaml
- Run
docker compose up -d
- Done! Visit documentation
- REST server via Fastify
- validation and documentation from one source via typebox
- JWT authentification
- rate limiting
- pagination, filtering, and sorting for list queries
- comprehensive error handling
- graceful shutdown
- Logging via pino
- Simple inverse on control container
- MySQL & Drizzle ORM
- describe database schema
- powerful query builder
- typescript types via inference
- generate and run migrations
- Email sender via NodeMailer
- emails are sent from Ethereal, so they won't be delivered to the end user!
- check emails
- login:
[email protected]
- password:
8WAQYgceSW5MghHU7Y
- login:
- Redis & BullMQ
- persistent scheduling of notifications
- Unit tests via Vitest
- Deployment via Github Actions. Workflow
- Install Volta
- Install Node.js:
volta install node
- Install pnpm:
volta install pnpm
- Install dependencies:
pnpm install
- Copy
config.template.yaml
file asconfig.yaml
- Setup MySQL and Redis, edit hosts and credentials in
config.yaml
- Run project:
pnpm start
or launch debug in vscode - Run unit tests:
pnpm test
- Generate SQL migrations from database schemas:
pnpm migrate