/thcd-web-frontend

Sample Web App

Primary LanguageJavaScriptMIT LicenseMIT

THCD Web Frontend

This is a proof of concept web app given to me as a programming challenge. The acronym stands for Terminal Handling Charge Distribution. Don't ask me why, it was the best name I could come up with.

This is my first react application, so please be mindful of that if you end up reviewing some code.

About the application

Front-end and back-end is completely split into two different repositories:

The front-end is deployed to github pages with gh-pages, and can be found in production on:

The backend is run as a node.js - express based microservice with a nginx server doing TLS termination and routing.

The complete separation of front-end and back-end code is a conscious architectural decision. The intended effect is better decoupling, testability, and scalability of development effort. Development teams can have completely separate release schedules and focus on integration- and end-to-end testing when doing QA, similar to integrating with an external API source.

About testing

I've not prioritized implementing tests at this stage. There are three reasons for this:

  1. I wanted to focus on getting the actual solution done, not spend too much time on ceremonies and formalities.

  2. One can argue that the cost of investing in extensive unit-testing in the exploratory phase of development, where only one, or a small team (2-3) of developers, are working on the code is not worth it.

    Rather it would be most efficient to defer extensive investment in testing until the size and complexity of the application warranted it.

  3. I'm lazy, and it's boring, and it feels like waste, when I want to continue doing the fun stuff, which is learning a new framework and finding my way around how to make the application work.

See the mocha-chai based tests in the backend repository, though. I added that as an example of how I would have done it in real life.