Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matii96/rental-system
Example managment system for items (currently movies and books) rental using Nest.js and Nx workspace.
https://github.com/matii96/rental-system
ddd docker microservices nestjs nx-workspace
Last synced: 14 days ago
JSON representation
Example managment system for items (currently movies and books) rental using Nest.js and Nx workspace.
- Host: GitHub
- URL: https://github.com/matii96/rental-system
- Owner: Matii96
- Created: 2021-10-31T20:26:54.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-13T19:30:46.000Z (over 2 years ago)
- Last Synced: 2024-11-07T07:51:06.499Z (2 months ago)
- Topics: ddd, docker, microservices, nestjs, nx-workspace
- Language: TypeScript
- Homepage:
- Size: 1.38 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rental system
![ci](https://github.com/Matii96/rental-system/actions/workflows/ci.yml/badge.svg) [![MIT Licensed](https://img.shields.io/badge/License-MIT-brightgreen)](/LICENSE)
## Description
Production-ready basic managment system for items (currently movies and books) rental using [Nest.js](https://nestjs.com) and [Nx workspace](https://nx.dev). Built as a case-study of complex problems related to distributed microservices systems and solutions for them.
The project is still in progress nevertheless most of functionalities are completed.## Requirements
- Npm v6.14 and higher
- Docker v20.10 and higher
- Docker compose v1.29 and higher
- [Tilt.dev](https://tilt.dev) - optional## Installation
```bash
$ npm install
```## Environmental variables
```bash
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=superSecretPasswordDB_DIALECT=postgres
DB_HOST=db
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_SYNCHRONIZE=true
DB_SHOW_LOGS=falseJWT_SECRET=superSecret
JWT_EXPIRES_IN=1d
```All variables defaults are in [.env](https://github.com/Matii96/rental-system/blob/master/.env) configuration file.
## Running the app
```bash
# development
$ npm run start:dev# development (tilt)
$ tilt up
```## Tests
```bash
# unit tests for all apps
$ npm run test:all# unit tests for particular app
$ nx test
```## Api documentation
Interactive [swagger.io](https://swagger.io/tools/swagger-ui/) and [graphql](https://graphql.org) documentations is available under following addresses:
- Users service: http://localhost:3001/api/docs, http://localhost:3001/graphql
- Reservations service: http://localhost:3002/api/docs
- Availability service: http://localhost:3003/api/docs
- Books service: http://localhost:3004/api/docs## Todo
- Add Movies microservice
- Implement gql in all microservices
- Add [gql federation](https://www.apollographql.com/docs/federation/) gateway## License
Rental system is [MIT licensed](LICENSE).