Substation maintenance SaaS platform
A multi-tenant platform that takes maintenance records to the field, even offline, and shows them in real time on a web dashboard, integrated with a legacy ERP that cannot be exposed to the internet.
- Company
- ENDE Transmisión
- Role
- Design and development, solo
- Period
- Jul – Sep 2026
- Status
- In production
Architecture
- 01 · Offline-firstField work without a connectionThe app records to a local database and PowerSync replicates the changes to PostgreSQL on reconnect.
- 02 · Multi-tenantEach company sees only its dataFastAPI enforces RBAC and PostgreSQL filters per company with Row Level Security.
- 03 · Real timeDashboard and app in syncCentrifugo delivers process progress, notifications, presence and channels to the web dashboard and the mobile app.
- 04 · BackgroundERP and heavy jobs, non-blockingCelery-beat schedules the ERP sync over a REST API and Celery processes heavy jobs; progress arrives through Centrifugo. Redis is the cache and the queue.
A component-level reconstruction of the architecture, with no code or internal company details. Everything runs in containers with Docker Compose.
Offline-first use case
The technician records maintenance at the substation even with no signal; sync happens on its own once the connection is back.
Context
The company's ERP is a legacy system that runs on the internal network and cannot be published to the internet. Field maintenance had to be recorded where it happens, offline included, and be visible on a real-time web dashboard.
The platform modernises around the ERP instead of replacing it: a new, multi-tenant product that other companies can also use as a service, connected to the ERP through an API.
Architecture decisions
- Isolation in the database, not only in code
PostgreSQL Row Level Security policies filter every query by company.A bug in an upper layer does not expose another company's data.
- Offline-first with a dedicated sync layer
The Flutter app works on a local database and PowerSync replicates the changes.Technicians never depend on connectivity to record their work.
- Real time as a separate service
FastAPI and Celery publish events and Centrifugo delivers them over WebSocket to the dashboard and the app: progress, notifications, presence and channels.The API does not hold an open connection per user.
- Scheduled integration with the ERP
Celery and Celery-beat run the REST API sync as background jobs.The ERP stays on the internal network and the platform never waits on it.
- Heavy work outside the request
Celery runs heavy jobs and publishes their progress to Centrifugo channels; Redis serves as cache and queue.Users see live progress instead of waiting for the job to finish.
In detail
Offline sync
Real time
Stack
Backend
- FastAPI
- SQLAlchemy async
- Alembic
- Celery · Celery-beat
- Multi-tenant RBAC
Web
- React 19
- TypeScript · Vite
- TanStack · React Query
- Multi-language
Mobile
- Flutter
- Offline-first
- PowerSync
Infrastructure
- PostgreSQL · RLS
- Centrifugo
- Redis · MinIO
- Docker Compose