livrare lot 2
This commit is contained in:
commit
8ecc78e729
763 changed files with 164593 additions and 0 deletions
64
backend/admin-dashboard/README.md
Normal file
64
backend/admin-dashboard/README.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Admin Dashboard
|
||||
|
||||
React admin interface for the DIDI misinformation detection platform.
|
||||
|
||||
## Stack
|
||||
|
||||
React 19, Material UI 7, TypeScript, Keycloak auth (PKCE S256).
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
# 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`
|
||||
Loading…
Add table
Add a link
Reference in a new issue