A web-based Digital Twin platform for power-network simulation using SimBench and OpenDSS/pandapower networks.
DT/
├── Backend/ # FastAPI REST API + simulation engine
├── Frontend/ # React + Vite web application
└── Conversion/ # OpenDSS → pandapower conversion pipeline (Nando_final)
| Tool | Version | Notes |
|---|---|---|
| Python | 3.10.11 (exact) | Backend & simulation pipeline |
| Node.js | 18+ | Frontend |
| Docker Desktop | latest | Runs the PostgreSQL database |
docker run -d \
--name dtlab-postgres \
-e POSTGRES_USER=simbench \
-e POSTGRES_PASSWORD=simbench \
-e POSTGRES_DB=simbench \
-p 5432:5432 \
postgres:16Default connection string:
postgresql+psycopg2://simbench:simbench@localhost:5432/simbench
Configured inBackend/.env— edit if your credentials differ.
cd Backend
pip install -r requirements.txtKey packages:
| Package | Version | Purpose |
|---|---|---|
fastapi |
0.136.1 | REST API framework |
uvicorn |
0.46.0 | ASGI server |
pandapower |
2.14.11 | Power flow simulation |
simbench |
1.5.3 | SimBench network loader |
dss-python |
0.12.1 | OpenDSS engine |
LightSim2Grid |
0.10.3 | Fast power flow solver |
plotly |
4.14.3 | Interactive topology plots |
SQLAlchemy |
2.0.49 | Database ORM |
psycopg2-binary |
2.9.12 | PostgreSQL driver |
python-jose |
3.5.0 | JWT authentication |
numpy |
1.26.4 | Numerical computing |
pandas |
2.3.3 | Data processing |
Create or edit Backend/.env:
DATABASE_URL=postgresql+psycopg2://simbench:simbench@localhost:5432/simbench
JWT_SECRET_KEY=change-me-in-production
JWT_EXPIRE_HOURS=24
SEED_USER_PASSWORD=DtLab2025!cd Backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000- API: http://localhost:8000
- Interactive docs: http://localhost:8000/docs
On first startup the backend automatically creates all database tables and seeds the default users.
cd Frontend
npm installnpm run devApp available at http://localhost:5173 (or the port printed in the terminal).
npm run buildKey packages:
| Package | Version | Purpose |
|---|---|---|
react |
19.2.0 | UI framework |
@tanstack/react-router |
1.168.0 | File-based routing |
@tanstack/react-query |
5.83.0 | Server state |
tailwindcss |
4.2.1 | Styling |
recharts |
3.8.1 | Charts |
lucide-react |
0.575.0 | Icons |
sonner |
2.0.7 | Toast notifications |
The Conversion/ folder contains the OpenDSS → pandapower conversion pipeline (Nando_final). It is invoked automatically by the backend when a user runs a conversion from the UI.
No manual setup is required beyond the Backend dependencies.
1. docker run ... ← PostgreSQL (port 5432)
2. cd Backend && uvicorn main:app --reload --host 0.0.0.0 --port 8000
3. cd Frontend && npm run dev
Default login credentials (seeded on first backend startup):
| Password | Role | |
|---|---|---|
| admin@dtlab.io | DtLab2025! | Admin |
| elena.marchetti@dtlab.io | DtLab2025! | Researcher |
| (other seeded users) | DtLab2025! | Student |
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql+psycopg2://simbench:simbench@localhost:5432/simbench |
PostgreSQL connection string |
JWT_SECRET_KEY |
change-me-in-production |
JWT signing key |
JWT_EXPIRE_HOURS |
24 |
Token expiry in hours |
SEED_USER_PASSWORD |
DtLab2025! |
Default password for seeded users |