All work
PIIndustrial IoT · Digital TwinIndustrial IoTCase study

PortCrane Intelligence Platform

Gives a port operator one live view of every crane, operator and safety event in the fleet.

Enterprise industrial-crane intelligence platform: real-time fleet telemetry, AI fatigue detection, safety & maintenance management, analytics and reporting — with a live digital-twin simulation engine that swaps to real PLC hardware without API changes.

Source private
PortCrane Intelligence Platform interface
Industry
Ports & Heavy Industry
Role
Architect & Full-Stack Engineer
Type
SaaS Platform
Year
2025
Status
Delivered
Real-time
Telemetry
6
RBAC Roles
5
Containerized Services

Overview

PortCrane is a multi-tenant SaaS platform that gives port and heavy-industry operators a single, live view of their entire crane fleet. It streams telemetry from every asset, scores operators on productivity and safety, surfaces AI-driven fatigue events, and manages the full safety, maintenance and alerting lifecycle.

The system is built around an event-driven core: a FastAPI backend ingests and broadcasts telemetry over WebSockets fanned out through Redis pub/sub, time-series data lands in a TimescaleDB hypertable, and a Next.js 15 dashboard renders live KPIs, gauges and trends with no page refresh.

Because real crane hardware is rarely available during development, the platform ships a built-in simulation engine that continuously generates realistic telemetry, alerts, fatigue and activity events. Integrating real hardware later is a matter of replacing the simulator's producers with PLC/telemetry adapters and camera-analytics feeds — the API, schema and realtime layers stay unchanged.

The problem

Crane fleets are monitored manually and reactively — operators lack real-time visibility into utilization, safety incidents are caught after the fact, and maintenance is schedule-blind. There was also no hardware available to build against during development.

Discovery

Mapped the operating model down to organizations → sites → cranes → operators, and the data each role (super admin, org admin, site manager, supervisor, operator, viewer) actually needs to act on in real time.

The solution

Built an event-driven, multi-tenant platform: FastAPI ingests telemetry and broadcasts it over WebSockets via Redis pub/sub, time-series data is stored in a TimescaleDB hypertable, and a Next.js 15 dashboard renders live KPIs, safety scoring, AI fatigue events and maintenance — all behind 6-role RBAC.

Technical stack

Frontend

  • Next.js 15
  • TanStack Query
  • Zustand

Backend

  • FastAPI
  • Python 3.12
  • WebSockets
  • SQLAlchemy 2.0

Data

  • PostgreSQL
  • TimescaleDB
  • Redis

Infrastructure

  • Docker

System architecture

  1. 1

    Next.js 15 (App Router) frontend ↔ FastAPI backend over REST + WebSockets, with TanStack Query for data and Zustand for client state

  2. 2

    PostgreSQL for domain data + a TimescaleDB hypertable purpose-built for high-frequency telemetry

  3. 3

    Redis as cache, session store and the pub/sub event bus for realtime fan-out

  4. 4

    FastAPI WebSocket connection manager ⟷ Redis pub/sub broadcasts live telemetry/alerts/activity to every connected client

  5. 5

    Simulation engine (asyncio background tasks) generates realistic telemetry, alerts, fatigue and activity — swappable for real PLC/camera adapters with no API change

  6. 6

    Docker Compose orchestrates 5 services with Alembic migrations and seeded demo data

Engineering challenges

Challenge

High-frequency telemetry would overwhelm a standard relational table.

How I solved it

Stored time-series data in a TimescaleDB hypertable, keeping queries fast while domain data stayed in PostgreSQL.

Challenge

Many dashboards needed the same live updates without polling.

How I solved it

Used a WebSocket connection manager fed by Redis pub/sub so a single event fans out to all subscribed clients instantly.

Challenge

No physical crane hardware was available to develop or demo against.

How I solved it

Wrote a simulation engine that produces lifelike telemetry/alerts/fatigue; production hardware plugs in by replacing the producers, leaving the API and realtime layers untouched.

Core features

  • Multi-tenant organizations → sites → cranes → operators with data isolation
  • JWT auth with access + refresh tokens and 6-role RBAC
  • Live fleet dashboard — utilization, productivity & status KPIs
  • Real-time crane monitoring with live telemetry gauges and history
  • AI fatigue detection from cabin-camera events with confidence scores
  • Safety management — overloads, e-stops, near-misses, per-asset scores
  • Maintenance schedules with overdue tracking and service history
  • Alert acknowledge/resolve workflow with severity & source filtering
  • Analytics with multi-metric trend analysis and crane comparison
  • Reports with PDF/Excel export and a continuously updating activity feed
  • WebSocket + Redis pub/sub — everything live, no refresh required
  • Simulation engine that swaps to real PLC/camera feeds unchanged

Results & impact

Operators get a single live view of the whole fleet — utilization, safety scoring, fatigue alerts and maintenance — replacing manual, reactive monitoring with proactive, real-time intelligence. The hardware-agnostic design means a production rollout reuses the entire software stack.

Screenshots

PortCrane Intelligence Platform screenshot 1
PortCrane Intelligence Platform screenshot 2
PortCrane Intelligence Platform screenshot 3
PortCrane Intelligence Platform screenshot 4
PortCrane Intelligence Platform screenshot 5
PortCrane Intelligence Platform screenshot 6
PortCrane Intelligence Platform screenshot 7
PortCrane Intelligence Platform screenshot 8

What I learned

  • Decoupling ingestion behind a simulation boundary makes a hardware-dependent product buildable and demoable today.
  • Choosing a time-series database early (TimescaleDB) avoids painful re-architecture as telemetry volume grows.
  • An event-driven core (WS + Redis pub/sub) keeps realtime features simple to add.

Related work

All projects
Next step

Have a system like this to build?

I take projects from the first conversation through to production, and stay on for the support that follows.