-
Notifications
You must be signed in to change notification settings - Fork 5
High Level Architecture
Development Tracker has the following key components:
- an open public API (provided by OIPA)
- a Ruby Sinatra application that consumes the API and serves HTML pages
- Javascript on the front end to support AJAX queries
The open public API is provided for DevTracker by Zimmerman & Zimmerman in Amsterdam, using the publicly available OIPA API. The DevTracker code in this repository points to public and private hosted versions of OIPA (see setup instructions).
This API has access to the entire IATI dataset (all data that is referenced on the IATI Registry), including data from UK Government Departments and our NGO, private sector and multilateral partners.
The major challenges we faced in adapting the API were mainly due to the fact that DFID projects have a hierarchy of Project and Component level, with financial information (budgets and transactions) being held at hierarchy 2 level. This makes aggregation of financial data more challenging than with a single-tier structure. We modified our IATI data to aggregate some elements which then makes the API easier to use.
OIPA returns IATI data in JSON format, which is easily consumed by the Ruby Sinatra application.
The core of DevTracker is a Ruby application built using the Sinatra lightweight framework. Ruby gems permit parsing of the JSON feed from the OIPA API.
The Sinatra framework provides the Embedded Ruby (ERB) templating system to build the dynamic web pages that make up DevTracker.
Some static content not available through IATI (e.g. country descriptions) are held in separate JSON files and accessed in the ERB page templates.
Javascript is used in the front end to support the following functions:
- graphs using C3
- mapping using Leaflet
- dynamic AJAX calls to the API to support filtering and pagination
Running a live version of DevTracker has the following architectural components (which are not available in this repo, for obvious reasons)
- A Varnish cache between the Sinatra app and the API, to improve performance.
- Continuous Integration to support easy deployment
See a short blog post on the new DevTracker architecture.