Page - Storage

abstract

Developer admin panel — browse PostgreSQL tables and row counts, inspect QuestDB time-series, view Redis cache stats, and perform maintenance operations (purge, truncate, flush).

Route

PropertyValue
Path/storage
Filefrontend/src/app/storage/page.tsx
Auth RequiredNo (⚠️ admin-only in spirit)
LayoutRoot layout with sidebar
Dynamic SegmentNone

Component Tree

StoragePage (page.tsx)
├── AppHeader (title="Storage")
├── StorageOverviewCards
│   ├── PostgreSQL: DB size, table count
│   ├── QuestDB: table count, total rows
│   └── Redis: memory used, key count, hit rate
├── Tabs: "PostgreSQL" | "QuestDB" | "Redis"
│
├── Tab: PostgreSQL
│   ├── TableStatsList (table name, row count, size, last updated)
│   └── TableBrowserSheet (opens on row click)
│       └── Paginated row browser + Purge/Truncate buttons
│
├── Tab: QuestDB
│   ├── QuestDB table list with row counts
│   └── Row browser sheet with drop table button
│
└── Tab: Redis
    ├── RedisPanel (memory info, key count, hit rate)
    └── "Flush Cache" button (with confirmation dialog)

Data Layer

Server State — Direct fetch

CallAPITriggered When
PG overviewGET /api/v1/storage/postgres/overviewOn mount
PG tablesGET /api/v1/storage/postgres/tablesOn mount
PG rowsGET /api/v1/storage/postgres/tables/{t}/rowsTableBrowserSheet open
QDB tablesGET /api/v1/storage/questdb/tablesOn mount
QDB rowsGET /api/v1/storage/questdb/tables/{t}/rowsQDB row browser open
Redis infoGET /api/v1/storage/redis/infoOn mount
Flush RedisDELETE /api/v1/storage/redis/flushFlush button + confirm
Truncate PGDELETE /api/v1/storage/postgres/tables/{t}/truncateTruncate + confirm
Purge PGDELETE /api/v1/storage/postgres/tables/{t}/purgePurge + confirm

Validation & Conditions

Destructive Action Guards

ActionGuard
Redis flushConfirmation dialog required
PostgreSQL truncateConfirmation dialog required
QuestDB drop tableConfirmation dialog required
warning

Truncate, purge, and flush are irreversible. The page should enforce a confirmation dialog with the target name typed explicitly (e.g., "type table name to confirm").

RoleLink
Backend APIAPI-Storage
InfrastructureDevOps - LLMSystemTrading