You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GridSense — Smart Power Grid Analytics & Fault Management
A polyglot-persistence platform for real-time monitoring, fault analysis, and billing of smart power grid infrastructure.
Technology Stack
Layer
Technology
Role
Time-series
Apache Cassandra 4.1
Sensor readings (50 K+)
Graph
Neo4j 5 Community
Network topology & fault traversal
Documents
MongoDB 7
Equipment catalogue
Relational
PostgreSQL 15
Consumer billing & accounts (ACID)
Cache / Pub-Sub
Redis 7
Cached summaries, real-time alerts
API
FastAPI + Python 3.11
Single REST gateway
Getting Started
# 1. Set up environment variables
cp .env.example .env
# Edit .env and fill in passwords# 2. Start all services (first run: allow ~3–5 min for Cassandra to initialise)
docker compose up --build
# 3. Load seed data (in a separate terminal)
docker compose run --rm seed
The API will be available at http://localhost:8000
Interactive docs (Swagger UI): http://localhost:8000/docs
Neo4j Browser: http://localhost:7474
API Endpoints
Sensors — Cassandra
Method
Path
Description
POST
/sensors/readings
Ingest a batch of sensor readings
GET
/sensors/{sensor_id}/readings
Retrieve last N readings for a sensor
GET
/sensors/{sensor_id}/summary
Cached min/max/avg summary (Redis TTL 30 s)
Grid Topology — Neo4j
Method
Path
Description
GET
/grid/fault-impact/{node_id}
All downstream nodes that lose supply if node_id trips