Skip to main content

Overview

JSON files are ingested through the admin website. On upload, the file is parsed, patched by the admin user and stored in S3. Then the API triggers a recalculation of KPIs for the drivers in the file, which triggers enriched KPIs and finally rankings & global scores for all drivers (rankings are generated by the API). The process takes around 10 minutes currently. Once the rankings are generated, they are viewable on the user webapp. Through the Admin page, you can edit the drivers, and merge 2 drivers into 1, that are erroneously counted as different people.

Components

Admin Webapp

User Webapp

Lambdas

There are 3 lambdas. The rough flow is: API (file import) → SNS → SQS → Lambda 1 → SNS → SQS → Lambda 2 → SNS → SQS → Lambda 3 → API (rankings). When an event is FKL, it generates extra enriched KPIs & rankings into a separate collection (note: stage 3 enriched KPIs, and stage 1/2 KPIs are not duplicated for FKL). At stage 4, 5 & 6 the enriched KPIs and rankings are duplicated. Lambda 3 gets 2 separate invocations from lambda 2 in the case of an FKL event. Lambdas are run on drivers in batches rather than waiting for all calculations of the previous stage to finish.
Lambdas Drawio

API

JSONs Bucket

All the events imported are kept at the talentid-global-json bucket. No backups are made. The file stored is the patched version after it’s edited in the admin webapp.

Running Locally

To run locally, set up the API, database, admin webapp and user webapp. To set up the API, you need Docker Compose (which may require virtualisation enabled, and WSL installed/updated). Extract db-setup.zip (Windows only)
Run
You can connect to it with Studio 3T with a new connection with URI
You can use Studio 3T or Mongo Tools to restore the latest backup, found at https://talentid-mongo-backups.s3.eu-west-2.amazonaws.com/TalentId-Global_DEV.gz If you want the actual current version, you need to export it using the EC2 workstation. Check the README on the lambdas repo for information on how to run. Expect it to take several hours to run each stage, since it generates the KPIs on all drivers locally. To run the user & admin webapps, do

Known Issues

Updating a driver in the admin webapp does not edit the JSONs the driver is in (whereas a merge does)
Last modified on August 24, 2026