Iot Platform

fastapi
react
tanstack
mongodb
postgresql
mqqt
modbus

IoT platform

Technical details

The backend is built on FastAPI framework, providing high-performance asynchronous API endpoints. We leverage Pydantic for payload validation and automatic OpenAPI/Swagger documentation. Key API routes include device management, real-time data streaming, and batch operations. For the persistence layer, we’ve implemented a hybrid database layer:

  • PostgreSQL (with asyncpg driver):

    • Device metadata and configurations
    • User management and authentication
    • Device relationship graphs
  • MongoDB (time-series collections):

    • High-frequency telemetry
    • Performance metrics
  • FastApi Backend:

Supported protocols

Modbus

  • Implemented TCP support
  • Asynchronous register reading using pymodbus

MQTT

  • Broker: Eclipse Mosquitto
  • Hierarchy of topics: /device/{device_id}/{metric_type}

Frontend

The frontend architecture is built around the TanStack framework ecosystem, providing a robust foundation for our application frontend:

  • TanStack Router, TanStack Query, TanStack Table and TanStack Form.

Deployment

The entire application runs in Docker containers:

  • Separate containers for React Aplication, FastAPI Backend, Postgres, MongoDB and MQTT broker.

© 2024 Portfolio. All rights reserved.

Design inspired from.

Made with 💓 By Jan. Powered by Astro.