didi-lot2-backend/backend/admin-dashboard
2026-07-10 03:39:53 -07:00
..
e2e livrare lot 2 2026-07-10 03:39:53 -07:00
public livrare lot 2 2026-07-10 03:39:53 -07:00
scripts livrare lot 2 2026-07-10 03:39:53 -07:00
src livrare lot 2 2026-07-10 03:39:53 -07:00
.env.example livrare lot 2 2026-07-10 03:39:53 -07:00
Dockerfile livrare lot 2 2026-07-10 03:39:53 -07:00
Dockerfile.dev livrare lot 2 2026-07-10 03:39:53 -07:00
INDEX.md livrare lot 2 2026-07-10 03:39:53 -07:00
nginx-ssl.conf livrare lot 2 2026-07-10 03:39:53 -07:00
nginx.conf livrare lot 2 2026-07-10 03:39:53 -07:00
package-lock.json livrare lot 2 2026-07-10 03:39:53 -07:00
package.json livrare lot 2 2026-07-10 03:39:53 -07:00
playwright.config.ts livrare lot 2 2026-07-10 03:39:53 -07:00
README.md livrare lot 2 2026-07-10 03:39:53 -07:00
tsconfig.json livrare lot 2 2026-07-10 03:39:53 -07:00

Admin Dashboard

React admin interface for the DIDI misinformation detection platform.

Stack

React 19, Material UI 7, TypeScript, Keycloak auth (PKCE S256).

Run

# Build image
docker build -t didi-admin:latest .

# Deploy (container defined in data-layer compose)
cd ../services/data-layer && docker compose up -d --force-recreate didi-admin

Access: https://10.11.10.12:3000 (self-signed cert, STAGING_MODE bypasses auth)

Pages

Route Page What it does
/admin Services Dashboard Health check grid for all containers
/admin/framework Framework Config CRUD for techniques, verdicts, weights, claims, sources
/admin/llm-components LLM Components Stage assignments, scoring params, prompts per component
/admin/history Analysis History Browse/delete analysis sessions (admin view)
/admin/users User Management Users list, plans, email verification
/admin/providers Providers LLM providers, models, API keys

Architecture

Nginx serves the React SPA and proxies API calls:

  • /framework/ → didi-framework:3005
  • /agent-v3/ → didi-agent-v3:24803
  • /health-check/* → direct to service containers

Health checks use Docker container state via framework API (GET /api/admin/containers).

Key Files

src/
├── services/api.ts              # API client, health checks, container mapping
├── components/
│   ├── services/ServiceCard.tsx  # Service card with Logs button
│   ├── services/LogsModal.tsx    # Docker logs viewer (colorized)
│   ├── AnalysisHistory/          # Analysis sessions table + detail modal
│   ├── UserManagement/           # Users + subscription plans
│   ├── LLMComponentsConfig/      # LLM config per component + VerdictConfig
│   └── framework/CrudDataTable.tsx  # Generic CRUD table for framework params
├── config/serviceGroups.ts       # Service grouping for dashboard layout
└── contexts/AuthContext.tsx      # Keycloak auth (bypass in staging mode)

Environment

Build-time vars (baked into JS at docker build):

  • REACT_APP_STAGING_MODE — bypasses Keycloak auth
  • REACT_APP_HOST — used for service UI URLs

Runtime vars (from docker-compose):

  • REACT_APP_KEYCLOAK_URL, REACT_APP_KEYCLOAK_REALM, REACT_APP_KEYCLOAK_CLIENT_ID