- Install Docker (https://www.docker.com)
- Pull from my Docker Hub Repository (https://hub.docker.com/r/bduaa/demyst/tags)
- run
docker pull bduaa/demyst:demyst-frontend
- run
docker pull bduaa/demyst:demyst-backend
- then run both images
- run
- Or run
docker-compose up
under root folder to build and run both images - Navigate to http://localhost:3000
- Run Backend Server Unit Tests:
- run
npm install
npm test
command under demyst-backend folder
- run
- Run Frontend Unit Tests:
- run
npm install
npm test
command under demyst-frontend folder
- run
-
- Final approved loan amount will be displayed at the bottom
Use ReactJs and Material UI to develop the frontend application
- /demyst-frontend/src/App.js implements the main app
- /demyst-frontend/src/helpers implements helper functions and constants
- /demyst-frontend/src/components implements function components for balance sheet and form display
Follow test-driven development practice by creating unit tests before implementing the API server
- Create unit tests using Mocha (https://mochajs.org/)
- Unit tests are under demyst-backend/test/server.js
- The unit tests cover all APIs and 20, 60, 100 "preAssessment" values
- Implement web server using Express (https://expressjs.com/)
- /demyst-backend/app/server.js implements 3 APIs for frontend
- GET /initiateAppplication: initiates a new application
- GET /getBalanceSheet: gets the balance sheet based on the accounting provider type
- POST /requestDecision: sends data to decision engine and get the final result
- /demyst-backend/app/accounting.js simulates the accounting software APIs
- /demyst-backend/app/decision.js simulates the decision engine APIs
- /demyst-backend/app/server.js implements 3 APIs for frontend
- Move backend server to Serverless Function / Lambda to increase scalability
- Use Kubernetes for automating deployment, scaling, and management of the containerized applications
- References:
- https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/sample-apps/blank-nodejs
- https://kubernetes.io/