Skip to main content
← Back to Projects

Building a Scalable Bike Sharing Platform (500K Users)

🚲 Dockless Bike Sharing Platform (500K+ Users)

🟢 Executive Summary

Designed and built a full-stack dockless bike-sharing platform, enabling over 500,000 users to rent bikes anywhere in the city.

Led architecture and product decisions across mobile, backend, and IoT systems, delivering a scalable, real-time platform with payment, geofencing, and smart lock integration.

🟡 Problem & Constraints

When I joined, the system was:

  • Station-based (no free-floating)

  • No customer-facing app

  • IoT locks unreliable and dependent on SMS-triggered heartbeats

  • High risk of theft and misuse

  • Payment infrastructure constrained to local providers

👉 The goal was to transform this into a real-time, city-scale mobility platform.

System Architecture for Real-Time IoT Platform

1. Real-time Communication (REST → WebSocket)

  • ❌ REST required SMS-triggered wake-ups → unreliable & expensive

  • ✅ Switched to WebSocket for persistent connection

Trade-off:

  • Real-time control & monitoring

  • − Increased infra complexity & connection management

2. Unlock Latency Optimization

  • Initial unlock latency: ~1800ms (network dependent)

  • Problem: noticeable delay in user experience

Solution:

  • Introduced Bluetooth fallback for local unlock

Impact:

  • Reduced perceived latency significantly

  • Improved reliability in poor network conditions

3. Wallet as a Microservice

  • Built wallet as a separate service early

Trade-off:

  • − Higher initial complexity

  • Enabled future scalability (super-app readiness)

4. Prepaid (Pay-as-you-go) Model

  • Users must charge wallet before ride

Trade-off:

  • Reduced fraud risk

  • − Added friction to onboarding

5. Cross-platform Strategy

  • Android → React Native

  • iOS → PWA

Reason:

  • Faster time-to-market under limited resources

WebSocket vs REST in IoT Systems

🟣 System Design Overview

  • Backend: Laravel + MySQL

  • API Layer: REST + WebSocket

  • IoT: SIM-enabled locks with solar charging

  • Geo-fencing: OpenStreetMap (point-in-polygon)

Flow:

User → API → WebSocket → Lock

Lock → WebSocket → Backend (location, status, battery)

🟠 Key Challenges

IoT Reliability

  • Locks previously required SMS to re-establish connection

  • Caused delays and operational overhead

👉 Solved by moving to persistent WebSocket connections

Identity Verification at Scale

  • Manual verification was not scalable

Solution:

  • OpenCV-based automation (~90% coverage)

  • Government API for validation

DevOps Scaling (Pet → Cattle problem)

  • Early infra treated servers as “pets”

  • Scaling caused instability and operational overhead

👉 Required shift toward more automated and reproducible infrastructure

🔴 Impact

  • 500,000+ users within ~1 year

  • Peak: 800+ rides/day

  • System downtime: ~3%

  • 90% automated identity verification

  • Significant reduction in IoT communication delays

⚫ My Role

  • Led a 5-person engineering team (4 backend + myself)

  • Owned:

    • System architecture

    • Product decisions

    • IoT integration strategy

  • Coordinated with remote IoT team (China)

ReactTypeScriptMySQLLaravelWebsocketIoT