/PayloadObservation

Backend demo for observing the service payload status

Primary LanguageTypeScript

title author date
Craft Demo readme
Yiwei Zhu
Apr, 25th, 2022

Craft Demo

Description

It's the repository for intuit A4A craft demo interview. Using nestjs as backend framework. Requirements see here.

Tech stack

backend: nestjs

view: handlebar

database: postgresql

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Visit localhost:3000 to see the webpage.

Test

# unit tests
$ npm run test

More detailed black box tests see postman.

Endpoints

Type Endpoint Description
Get /v1/service_id/info Get a services's aggregated information
Post /v1/service_id/data Add payload to service
Get /v1/aggregate?time=5 Return a html table of aggregated information of records in specific time

AWS test database

host: crafttestdb.ctriu0r3rcfj.us-east-1.rds.amazonaws.com

port: 5432

user: postgres

password: 12345678

database: test

Dockerize

Docker Hub: yiweizhu/craft-demo:1.0

Backend design

Database entity design:

Two tables: records_v1, services_v1

database entity design

Backend MVC workflow:

MVC workflow

License

Nest is MIT licensed.