PCRinus / mero-technical-assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mero Calendar Assignment

This is a small demo application that was made for the given assignment

Prerequisites for running locally

  • 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

Installing

Just run pnpm install

Setting up the database

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

Running the app locally

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.

Exploring the data

Prisma provides a easy to use database GUI, that can be accessed using

pnpm prisma studio

NPM published package

This app was not published to npm, but the publishing command was tested with

npm publish --dry-run=true

Improvement directions and missing features

  • 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

About


Languages

Language:TypeScript 96.9%Language:JavaScript 3.1%