This API contains basic operations for client to hire contractor. Using NodeJS + TypeScript + ExpressJS + Sqlite
- Get single Contract detail by id
- Get all Contract detail of client/contractor
- Get all unpaid job by client/contractor
- Pay contractor
- Deposit money to client wallet
- Admin - get best contractor's profession by top earnings
- Admin - get best client by top paid jobs
- Node v18.17.1 (LTS)
- TypeScript
- NPM or YARN (package manager)
- ExpressJS
- Sqlite Database
-
Clone this repository to your local machine.
-
Open a terminal and navigate to the cloned repository's root directory.
-
Install project dependency using
npm install
oryarn install
-
Run the following command to start the server: (this will also create Sqlite database in root directory with data)
npm start or yarn start
- From the root directory execute
npm test
oryarn test
- For test watch mode execute
npm test:watch
- To check the code coverage execute
npm test:coverage
You can find all the endpoint's detailed configuration from this POSTMAN Collection
Two admin endpoints /admin/best-profession?start=<date>&end=<date>
& /admin/best-clients?start=<date>&end=<date>&limit=<integer>
should be authenticated with admin credentials. Currently it allows without any auth methods in this demo.