This is a small demo application that was made for the given assignment
- You need NodeJS installed on your machine. If you use nvm to manage your NodeJS versions, you can use the version already committed in the
.nvmrc
file. - pnpm is the package manager of choice
Just run pnpm install
This app uses Prisma alongside with an in-memory SQLite 3 database. To create the database file and apply the migrations, just run
pnpm prisma migrate dev
In case you need to generate just the types provided by prisma, run
pnpm prisma generate
To run locally, you can use the pnpm start
or pnpm start:dev
scripts. This will open a server at localhost:3000
.
There is a Swagger instance running at localhost:3000/api
to directly test the API.
Prisma provides a easy to use database GUI, that can be accessed using
pnpm prisma studio
This app was not published to npm, but the publishing command was tested with
npm publish --dry-run=true
- Authentication for the API
- Logging, currently none is added
- Repository layer, currently we call the prisma service directly in the service layer
- Better error handling using some sort of interceptor, currently we throw errors in a chaotic way
- Better unit testing coverage and add some e2e tests