This is a GraphQL application to help you store a Tenant's payment History. This has basic features for:
- Getting Rent Payment history for Tenant's Contract Id between a Range of Dates
- Adding a Rent Payment for a Tenant's Contract Id.
- Updating a Rent Payment
- Deleting the Rent Payment.
You will need to below dependencies for running this application:
To install all dependencies run the following command:
npm install
You would need to create a .env file for the application to run. You can directly copy the values from .env.example to a new .env file.
Finally you can start the Rent Payment History Application server:
npm run start
This would be running based on docker-compose. So please install the docker-compose before running this. This would take some time, since it would build the relevant dockers and start the application. This application is based on GraphQL. Hence you can either go to the playground
The export is also provided in the repository
Currently the "Authorization" Token has been set in .env.example to 8xjM8PF9XC7KVUQ. So you would need to pass this as a header:
{"Authorization": "8xjM8PF9XC7KVUQ"}
You can run the tests with command:
npm run test
You can also see the test coverage using:
npm run test:coverage
I have tried to write tests to cover the Logical parts.
Please find the choices and rationales here