This demo purpose application is used to create movies and corresponding comments. This page only has information related to project development.
- Install NodeJS
- Run
npm install
in the project root
To build the project, run npm run build
.
To run the project, run npm run start
.
To run the tests, run npm run test
.
Deployment to Heroku will be performed automatically after a push to the specific git branch:
- dev - deployment to dev environment
- staging - deployment to staging environment
- master - deployment to production environment
Warning: Deployment process is not implemented yet.
services is a collection of functionality dedicated to a specific domain. Services include all the business logic of the app. The main part of the application.
database is a layer that contains all required database entities and repositories. It should not contain any business logic.
gateway is a layer that provides endpoints (routes) connected to services (business logic). It should not contain any business logic.
Movie service
- Creation, reading, updating of movie.
Comment service
- Creation, reading of movie comment.
VHS backend is exposed via HTTP gateway using NestJS as a framework.
Warning: Please neither make any other non-HTTP-related code dependent on NestJS nor implement business logic in the gateway layer.
Swagger documentation (/api/v1/docs/
) can be used as a low-level GUI.
-
Services can only use serializable data structures for communication with each other: this assures that services can be pulled into separate servers easily.
-
All dependencies must be declared explicitly and should not be imported directly. Please adhere to the dependency inversion principle.
-
Persistence layers (in most cases, database connections) should be treated as external services. One should hide persistence-related implementation details.
Testing was done only for services that contain all required logic. Gateway and Database layers will be tested in the future.