Dibya Sarothi
Dibya Sarothi
Full-Stack ApplicationsBeta LiveOctober 2026

Bhara Koto

Crowdsourced Public Transit Fare & Route Reference Platform

Empowering everyday commuters across Bangladesh with transparent, verified public transit fare references.

Bhara Koto overview
Bhara Koto preview 1
Project Overview

Bhara Koto ('How much is the fare?') is an open civic tech platform created to resolve the rampant lack of fare transparency across Bangladesh's public transportation network. Commuters can look up government-approved and crowdsourced fares for buses, Metro Rail, CNGs, and local transport, backed by a community consensus verification pipeline.

Problem Statement

Millions of commuters across Dhaka and regional corridors experience daily disputes and overcharging due to unannounced fare hikes and lack of accessible fare charts. Official fare guidelines are published as fragmented PDF circulars that are impossible to search on a mobile phone during a transit commute.

Engineering Rationale

Fare transparency directly protects daily wage earners, students, and urban commuters from predatory pricing. Public transport is essential infrastructure; civic tools must be lightweight, instant, and work on spotty 3G/4G cellular connections.

Engineering Objectives

Digitize and normalize official transit fare circulars across bus routes, Metro Rail, and regional trains.
Build a crowdsourced contribution workflow with moderation checks to capture local route pricing.
Provide an instant route lookup requiring minimal bandwidth and under 100ms response times.
Deliver a localized mobile-first interface optimized for Bangla-speaking commuters.
Integrate interactive transit maps showing bus stop sequences and fare stages.
Architecture Blueprint

System Architecture

The platform couples a high-performance Django REST API with a reactive Next.js client. Transit stops and corridors are modeled as directed graphs in PostgreSQL, allowing fast stage calculation and distance-based fare approximations. Redis caches popular commuter routes.

01

Graph-Based Transit Staging

Routes are represented as ordered sequence nodes, calculating base fare, per-kilometer rates, and minimum allowable pricing.

02

Consensus-Driven Community Approvals

Crowdsourced fare updates undergo an automated consensus verification engine before human moderator approval.

03

Sub-50ms Cached Route Lookup

Frequently queried origin-destination pairs are cached in Redis with pre-calculated fare bands.

Core & Backend Implementation

  • Django REST Framework endpoints for route discovery, stage calculating, and fare querying.
  • Community contribution pipeline with IP-based rate limiting and reputation weighting.
  • Admin moderation dashboard for verifying community submissions against official transport circulars.
  • Automated database benchmark suite measuring query latency under synthetic commuter load.
  • Geo-coordinate spatial data indexing for locating nearby bus stops.

Client & Interface Layer

  • Next.js App Router with instantaneous client-side stop filtering.
  • MapLibre GL / OpenStreetMap integration for visual route previews without expensive proprietary map APIs.
  • Tailwind CSS mobile-first responsive layout with tactile touch targets.
  • Bilingual support (Bangla & English) with zero performance overhead.
  • Progressive offline caching of recent fare lookups in browser LocalStorage.

Data & Schema Design

Engine / Tier: PostgreSQL with spatial indexing

Relational transit models connecting transit lines, route variants, ordered stops, and fare matrices.

Core Models & Entities
TransitMode (Bus, Metro, Train, CNG, Leguna)TransitRoute & RouteVariantTransitStop & RouteStopSequenceFareMatrix & FareContributionUserModerationVote & TransitCircular

Authentication & Security Controls

Auth Model: Token-based contributor authentication with anonymous read access
  • Anti-spam bot protection and IP throttling on fare contribution submissions.
  • Role-based moderation permissions for transit community leads.
  • Rigorous input validation preventing erroneous fare outlier entries.

Engineering Challenges & Technical Decisions

Key Challenges Solved

Challenge: Handling complex bus route variations where routes diverge based on time of day.
Engineering Solution: Structured routes with sub-variants and conditional stop sequences in the relational schema.
Challenge: Maintaining high availability during peak morning/evening rush hours on modest server resources.
Engineering Solution: Implemented aggressive Redis caching for top 200 route pairs and optimized PostgreSQL compound indexes on (origin_stop_id, destination_stop_id).

Trade-Off Decisions

Decision: OpenStreetMap & MapLibre over Google Maps API
Architectural Rationale: Eliminates prohibitive API billing risks while preserving complete data sovereignty and fast vector tile rendering.
Decision: Two-Tier Verification (Consensus + Moderator)
Architectural Rationale: Prevents rogue contributors from corrupting fare data while keeping the platform responsive to real-world price changes.

Testing & Verification Methodology

Frameworks & Approach: Pytest, Django Test Suite, Vitest
  • Benchmark load tests simulating 1,000 concurrent commuter route queries.
  • Mathematical verification of Dhaka Metro Rail fare formula versus stage stops.
  • Cross-browser mobile compatibility verification.

Results & Engineering Takeaways

Learned how graph-like data structures can be effectively modeled in relational schemas.
Gained deep empathy for low-bandwidth mobile optimization for developing markets.
Validated the civic impact of engineering transparent public information tools.