Backend of a time tracker application for employees of a company. In this MVP, you can input hours of work per day and see statistics of hours worked and overtime hours for each user.
The first thing was to use as a scaffold my personal repository of scaffolding for Node.js, which contains the basic configuration to start working with Node.js and not lose time. It contains the following:
- nvm integration
- ESLint + Prettier configuration
- EditorConfig integration
- husky and lint-staged configuration
This backend is based on a hexagonal architecture applied to Node.js and using SOLID principles whenever possible.
- Node.js v14.17.0 or later
- Docker and Docker Compose
The recommendation is to execute the containers with docker-compose
to deploy both server and MongoDB
instances:
$ docker-compose build
$ docker-compose up
$ npm i
There is a configuration management by environment (based on the environment variable NODE_ENV
). There are several environments:
default
(for development)production
docker
(container deployment)
$ npm start
$ npm t