All Engineering Reports
SYS_ID: ER-BONEngineering Report

BondCheck

Python · FastAPI · PostgresPakistan Prize Bond Checker

Executive Overview

BondCheck solves a massive operational inefficiency for retail bondholders in Pakistan by automating the checking process against decades of historical draw data.

DECISION_LOG //

The Challenge:
Millions of Pakistanis hold prize bonds but check results manually — copying numbers one by one to the official National Savings site, a painful process for anyone with more than a few bonds.

Engineering Approach

We built a privacy-first React app with an Express proxy that scrapes official draw results. Users save their bond numbers once (singles and consecutive series) and BondCheck matches every one against every draw in one click — data never leaves the browser.

System Architecture

A privacy-centric architecture where all portfolio data remains strictly in LocalStorage/IndexedDB. The backend serves purely as a high-speed data pipeline for public draw results.

Client Engine
React SPA handling heavy array-intersection logic in a Web Worker to prevent UI blocking.
Scraping Pipeline
Python/FastAPI microservice executing weekly cron jobs to scrape, parse, and clean official PDF/HTML draw results.
Database
PostgreSQL storing normalized draw data, optimized with GIN indexes for fast querying.

Engineering Challenges

Browser Memory Limits

Checking a portfolio of 10,000 bonds against 20 years of draws (millions of winning numbers) caused memory crashes. Solved by chunking the intersection algorithm and utilizing Web Workers.

Unreliable Upstream Data

The official government data sources often have formatting errors or downtime. We implemented robust error handling, historical caching, and automated anomaly detection.

Your system could be next

Let's engineer yours.

We'llreviewyourrequirements,recommendanarchitecture,andestimateeffort.Nosalespressure.