Bridge Monitor MVP
After a few brainstorming sessions with @patitonar and @fvictorio we came up with the following proposal for a new (enhanced) version of the Bridge Monitor. We consider this to be the initial release of a much more rich, complex and easy to extend project.
Basic set of features
- Make it work by just creating the
.env
file and doing npm start
(assuming the backing DB is on)
- Be able to see all the information that is already showing, but without having to manually go to specific URLs (a simple navbar should do the trick here).
- No real time yet, but reloading the page should show new information (meaning, no need to manually trigger anything)
Stack
- Backend: Koa. It's nicer than express for smaller projects and it's better in many aspects.
- Frontend: Koa views for now. We can consider moving to React if the UI gets complex. JSON responses will be supported as well.
- Database: Mongo. We don't exactly have relationships between data and we already have functions that process data as JSONs. Besides, we could easily save a collection of "points" in time for when we add the "history" feature.
Pages
- Home: Balances & stuck transfers, if any
- Validators: Validators
- Events: Events stats
We don't need anything fancy in the UI: just showing the data in any way that
it's not a raw JSON will be an improvement.
Data processing
Since this is an MVP and the application is small (for now), just having a worker started by the server should be enough. Meaning: we don't need to decouple the server from the worker that updates the data periodically. The server is straightforward: just serving the content in the DB. The worker is also simple: it has to do the same that the checkWorker
s scripts we have now, and save it to the DB.
Tasks breakdown:
- Server boilerplate: create endpoints that show mock data, or data from the DB that we insert manually.
- Worker: fetch the data and save it in the proper document.
Further features
Features to be added in a later on (post-MVP stage)
- Real time updates
- Show historical data
- Alerting system
- ...