Complete overview of MassAI Digital Twin Designer services, ports, and communication flows with PostgreSQL time-series storage.
docker-compose up -dnpm run dev (Frontend)uvicorn app.main:app --reload (Backend)mosquitto_pub -h localhost -t topic -m "message"psql -h localhost -U massai -d massaiReact application with PrimeReact UI components
http://localhost:3000Python REST API with async support
http://localhost:8000Digital Twin platform for IoT devices (internal service)
Application database for assets, lines, Metrics, and time-series data
http://localhost:8083 (pgAdmin)Web interface for managing Ditto Things and Policies
http://localhost:8082Reverse proxy for Ditto API - REQUIRED ONLY for Ditto UI (not for your application)
http://localhost:8081MQTT message broker for IoT communication
mqtt://localhost:1883REQUIRED to synchronize MQTT data with Digital Twins - Bridges real IoT world with the system
NoSQL database used ONLY by Eclipse Ditto for internal persistence
internal Docker serviceWeb UI for inspecting Ditto internal persistence
http://localhost:8083Identity and Access Management
http://localhost:8180timeseries_dataExample: org.massai:conveyor_beltExample: speedExample: m/sExample: 22.5Example: 22.5SELECT timestamp, value, units
FROM timeseries_data
WHERE thing_id = 'org.massai:conveyor_belt'
AND feature_id = 'speed'
AND timestamp >= NOW() - INTERVAL '24 hours'
ORDER BY timestamp ASC;SELECT
COUNT(value), MIN(value), MAX(value), AVG(value)
FROM timeseries_data
WHERE thing_id = 'org.massai:conveyor_belt'
AND feature_id = 'speed'
AND timestamp >= NOW() - INTERVAL '24 hours';/api/timeseries/history and /api/timeseries/stats endpoints (backed by PostgreSQL)Web Browser → localhost:3000 (Frontend)Frontend (3000) ↔ Backend API (8000)Backend (8000) ↔ Nginx Proxy (8081)Backend (8000) ↔ PostgreSQL (5432)Nginx (8081) ↔ Ditto (8080 internal)MQTT Bridge ↔ Mosquitto (1883)MQTT Bridge ↔ Ditto (8081)MQTT Bridge ↔ PostgreSQL (5432)Ditto ↔ internal persistence (27017) - Thing statePostgreSQL ↔ timeseries_data - Historical dataMosquitto ↔ IoT Devices (1883)NEXT_PUBLIC_BACKEND_URLhttp://localhost:8000NEXT_PUBLIC_KEYCLOAK_URLhttp://localhost:8180NEXT_PUBLIC_KEYCLOAK_REALMmassaiNEXT_PUBLIC_KEYCLOAK_CLIENT_IDmassai-frontendDITTO_URLhttp://localhost:8081DITTO_USERNAMEdevopsDITTO_PASSWORDfoobarDATABASE_URLpostgresql+asyncpg://massai:massai_dev@localhost:5432/massaiMQTT_BROKERlocalhostMQTT_PORT1883MQTT_BROKERmosquittoMQTT_PORT1883DITTO_URLhttp://ditto-nginx:80BACKEND_URLhttp://backend:8000DATABASE_URLpostgresql://massai:massai_dev@postgres:5432/massai