This repository is a showcase of various technologies, architectural principles and libraries. It utilizes:
- languages:
- frameworks
- architecture:
- Domain-driven Design (DDD) to separate business logic from framework and libraries, improve readability, extendability and maintainability, and to enforce SOLID principles
- Hexagonal Architecture for better code organizing (this goes hand in hand with DDD)
- Command and Query Responsibility Segregation (CQRS) to create clear interfaces to read and modify data
- Value Objects to enforce data integrity througout the application and provide easier means to add functionality and/or validation
- libraries:
- @nestjs/mongoose and mongoose as an ODM for storing and retrieving data
- @nestjs/swagger to generate API documentation from the code
- class-validator to validate requests/user inputs before the data goes to the controllers
- date-fns to make work with dates easier
- purify-ts to provide a funcional (and more readable) way of handling and avoiding null values and nested conditions
- uuid to generate IDs and primary keys for entities, commands, events and queries
- Bootstrap and React Bootstrap UI kit, so we don't have to write our own components
- React Query for easier communication between components
- Axios for API calls
- command line utilities:
- install Docker https://docs.docker.com/engine/install/
- install Task https://taskfile.dev/installation (optional)
- if you don't want to use Task, you will need to type docker commands and their arguments manually
- run
task up- this will spin up all docker containers, imports database seed, runs
npm i, so it might take a minute or two - if you wish to see the progess, run
taks logsor tail logs of specific containers until everything is ready
- this will spin up all docker containers, imports database seed, runs
- run
task down up logsto restart the project and start tailing logs from all containers
- Frontend http://localhost:3000
- Swagger API documentation http://localhost:3001/api
- Mongo Express http://localhost:8081
- error handling (e.g. POST /jobs when a mongoose connection fails)
- asynchronous command and event processing
- correlation and causation ids
- event sourcing
- tests
- add graphql (as an alterantive to REST API)
- websockets (for auto-updates after creating/updating/deleting a job)
