Skip to content
NIRANJANNIRANJAN
Full Stack Engineer
Yatri logo
🚧 Active Development

Yatri

Smart mobility infrastructure for public transport

NestJS
Next.js
Flutter
PostGIS
Redis

Active Development

Yatri is an enterprise-grade, realtime mobility infrastructure platform designed to modernize Nepal's public transportation ecosystem. Unlike conventional ticket booking applications, Yatri serves as a digital infrastructure layer that connects passengers, transport operators, enterprises, and government agencies through a unified, data-driven platform for intelligent mobility management. The platform focuses on solving fragmented transport operations by integrating realtime tracking, digital ticketing, fleet operations, analytics, and regulatory oversight into a single ecosystem.


The Problem

Public transportation in Nepal still relies heavily on manual operations, leading to fragmented systems and poor passenger experiences. Some of the major challenges include:

  • Manual ticket booking and operator workflows.
  • No reliable realtime vehicle tracking.
  • Lack of seat availability visibility.
  • Limited operational insights for transport operators.
  • Poor monitoring and compliance tools for regulatory authorities.
  • Revenue leakage due to disconnected systems.
  • Absence of centralized transport data for planning and decision-making.

Yatri addresses these challenges by building a unified digital infrastructure that powers the entire transportation lifecycle rather than solving only one part of the problem.


Platform Ecosystem

Yatri consists of three interconnected platforms that share a common backend infrastructure and data model.

🚍 Yatri (Passenger Platform)

The passenger application focuses on delivering a modern travel experience through:

  • Route discovery and intelligent search
  • Live GPS bus tracking
  • Accurate ETA prediction
  • Digital ticket booking
  • Seat availability visualization
  • Secure digital payments
  • QR-based boarding
  • Journey history
  • Boarding and delay notifications
  • Trip status updates

🚌 YatriX (Operator Platform)

Built for transport companies and fleet operators, YatriX provides tools for managing day-to-day operations, including:

  • Fleet management
  • Vehicle lifecycle management
  • Driver and conductor management
  • Branch management
  • Route and schedule management
  • Trip dispatching
  • Revenue monitoring
  • Booking operations
  • Pricing management
  • Operational analytics
  • Performance monitoring
  • Multi-level organization management

Agents operate within YatriX through a permission-based role system rather than as a separate platform.


🏛️ Yatri Nexus (Enterprise)

Yatri Nexus provides a centralized operational intelligence platform for enterprises and government agencies with features such as:

  • Fleet-wide monitoring
  • Compliance management
  • Transport analytics
  • Operational intelligence dashboards
  • System health monitoring
  • Organization oversight
  • Route analytics
  • Audit reporting
  • Data-driven transport planning

Its purpose is to improve transparency, operational efficiency, and policy decision-making across the transport ecosystem.


Core Features

Realtime Vehicle Tracking

One of the platform's core capabilities is realtime GPS tracking that enables passengers and operators to monitor vehicle locations with minimal latency. The tracking system supports:

  • Live vehicle positions
  • Vehicle speed and heading
  • ETA calculation
  • Geofencing
  • Route progress
  • Vehicle status updates
  • Passenger notifications
  • Realtime operational dashboards

The GPS pipeline is designed with adaptive telemetry to optimize location update frequency based on driving conditions while minimizing unnecessary network traffic.


Smart Booking System

The booking engine manages the complete reservation lifecycle, including:

  • Intelligent route search
  • Seat availability
  • Dynamic seat selection
  • Booking confirmation
  • Digital ticket generation
  • Booking lifecycle management
  • Cancellation policies
  • Payment integration

Fleet Management

Yatri enables transport operators to manage their entire fleet from a unified dashboard, including:

  • Vehicle registration
  • Driver assignments
  • Conductor assignments
  • Route scheduling
  • Fleet monitoring
  • Maintenance workflows
  • Operational reporting
  • Revenue tracking

Digital Payments

The platform integrates Nepal's leading payment gateways, enabling secure cashless transactions through:

  • Khalti
  • eSewa
  • Fonepay

Notifications

A centralized notification system keeps passengers and operators informed through:

  • Boarding reminders
  • Delay notifications
  • Cancellation alerts
  • Trip status updates
  • Operational announcements
  • Email and realtime notifications

AI & Smart Transport

The platform is designed to support intelligent transport capabilities, including:

  • ETA prediction
  • Demand forecasting
  • Route optimization
  • Operational analytics
  • Transport intelligence
  • Business insights

System Architecture

Yatri follows an API-first, realtime-first, and event-driven architecture built around a modular monolith.

Key architectural principles include:

  • Modular Monolith Architecture
  • Event-Driven Communication
  • Realtime-first Design
  • Organization-scoped Multi-tenancy
  • Infrastructure-grade Observability
  • Defense-in-depth Security
  • API-first Development
  • Operational Simplicity

Instead of prematurely adopting microservices, the platform is designed to scale by extracting services only when operational demands justify the additional complexity.


Technical Highlights

During development, I have been designing and implementing several core engineering systems, including:

Realtime Infrastructure

  • WebSocket-based communication
  • Live vehicle tracking
  • Realtime passenger updates
  • Live operator dashboards
  • Event broadcasting
  • Redis-backed scaling

Geospatial Computing

  • Location indexing
  • Route management
  • Geofencing
  • Distance calculations
  • Nearby vehicle search
  • PostGIS spatial queries

Backend Engineering

  • Modular backend architecture
  • Event-driven processing
  • Queue-based background jobs
  • Secure authentication
  • Multi-tenant organization management
  • Role-based authorization
  • Audit logging
  • REST API development

Performance Engineering

  • Redis caching
  • Background workers
  • Queue processing
  • Optimized database queries
  • Adaptive telemetry
  • Rate limiting
  • Session management

Security

  • JWT authentication
  • HttpOnly cookie sessions
  • Refresh token rotation
  • Argon2 password hashing
  • Organization isolation
  • Permission-based RBAC
  • Audit trails
  • Secure API architecture

Observability

The platform is built with production-grade monitoring from day one:

  • Application metrics
  • Distributed tracing
  • Centralized logging
  • Error monitoring
  • Performance dashboards
  • Health monitoring
  • Queue monitoring

Technology Stack

Backend

  • NestJS
  • TypeScript
  • PostgreSQL
  • PostGIS
  • Redis
  • BullMQ
  • Socket.IO

Frontend

  • Next.js
  • React
  • Tailwind CSS
  • ShadCN UI

Mobile

  • Flutter
  • Riverpod

Infrastructure

  • Docker
  • Docker Compose
  • Nginx

Observability

  • Prometheus
  • Grafana
  • Loki
  • OpenTelemetry
  • Sentry
  • Uptime Kuma

Payments

  • Khalti
  • eSewa
  • Fonepay

Authentication

  • JWT
  • Argon2id
  • HttpOnly Cookies
  • Refresh Token Rotation
  • RBAC

Engineering Challenges

Some of the most interesting engineering problems being addressed include:

  • Designing a scalable realtime transport infrastructure.
  • Building low-latency GPS tracking pipelines.
  • Managing geospatial data efficiently using PostGIS.
  • Implementing adaptive telemetry for efficient GPS updates.
  • Supporting multiple user types within a single multi-tenant architecture.
  • Maintaining secure organization-level data isolation.
  • Building reliable event-driven workflows for bookings, tracking, and notifications.
  • Creating production-ready observability for monitoring application health and system performance.

Vision

The long-term goal of Yatri is to become the digital foundation for public transportation by enabling safer journeys, smarter fleet operations, intelligent transport planning, and data-driven governance. The platform is designed to evolve from a corridor-based transport solution into a national mobility infrastructure that can scale across Nepal and other emerging markets. As described in the project documentation, "Yatri is infrastructure, not an app."

Built by Niranjan Sah