Files
DataStack/core/Database/manifest.md
T
Team Dark Devil 367dd819f8 docs: update architecture documentation and manifests
Refine technical documentation to reflect current architecture, component structure, and routing conventions for the vcon console.
2026-11-17 21:22:55 +06:00

15 lines
1.0 KiB
Markdown

# Database Engine Manifest
## Purpose
Manages the shared PostgreSQL connection pool (`pg.Pool`), automatic metadata table initialization, and live database health probes (`core/Database/database.ts`).
## Managed PostgreSQL Tables
PostgreSQL is dedicated strictly to platform metadata and security state:
1. `admin_users`: Administrator account credentials (scrypt password hashes).
2. `admin_login_attempts`: Brute-force login attempt counters and lockout timestamps.
3. `client_sdks`: Registered SDK clients, signed JWT tokens, rate limits, status (`active` / `revoked`), and event counters.
4. `admin_settings`: Global runtime settings (`max_events_per_sec`, `max_payload_size_kb`, `batch_flush_threshold`, `batch_flush_interval_ms`, `file_rotation_mb`, `jwt_secret`, `enable_idempotency`, `auto_prune_days`).
## Storage Separation Rule
Collected event streams are **never** inserted per-row into PostgreSQL; they are written exclusively in batches to partitioned CSV files under `/storage/data/{clientId}/{YYYY-MM-DD}.csv`.