web admin panel working well

This commit is contained in:
Priec
2026-07-16 13:25:28 +02:00
parent 3540c028e9
commit d2ac592a49
45 changed files with 2578 additions and 30 deletions

View File

@@ -1,8 +1,12 @@
# Analytics graphs
# Web admin and analytics
A small Rust web server that logs in through `AuthService.Login`, forwards SQL
queries to `AnalyticsService.ExecuteAnalyticsQuery`, and displays the streamed
result with HTMX, Alpine.js, and ECharts.
An Axum SSR/HTMX web frontend for the existing komp_ac gRPC backend. It provides
the browser version of the client admin panel and the ECharts analytics view.
The browser never connects to gRPC directly: Axum authenticates with an
HTTP-only cookie, creates typed Tonic requests, and returns full HTML pages or
HTMX fragments.
The backend remains the authority; this crate does not add another HTTP API to it.
## Run
@@ -13,8 +17,9 @@ binary. From the parent workspace, start the server normally:
cargo run -p server -- server
```
Open <http://127.0.0.1:3000/login> to log in, then use the analytics page at
<http://127.0.0.1:3000>. The access token is kept in an HTTP-only cookie. The default gRPC endpoint is
Open <http://127.0.0.1:3000/login> to log in. The admin panel is at
<http://127.0.0.1:3000/admin> and analytics remains at <http://127.0.0.1:3000>.
The access token is kept in an HTTP-only cookie. The default gRPC endpoint is
`http://[::1]:50051`. Both addresses can be changed:
```sh
@@ -24,6 +29,25 @@ cargo run -p server -- server
```
The first SQL result column is used for category labels. Bar and line charts use
## Admin panel
The admin panel mirrors the client workflow with browser-oriented pages:
- profile, table, and physical-column browsing;
- table creation, including indexes, links, money settings, and row labels;
- Steel table-script creation;
- field validations, reusable global rules, validation sets, and set application;
- browser CSV import with live schema validation and chunked bulk insertion;
- CSV downloads for one or multiple tables;
- login, role checks, logout, and navigation to analytics.
CSV files use the same column-header convention as the client. Multi-table CSV
files include a table-name header row before the column-name row. Browser files
are read locally and submitted to Axum; the backend is accessed only through the
existing `TablesData` gRPC service.
## Analytics
all remaining columns as numeric series, pie uses the second column, and scatter
uses the first two columns. Table view displays every returned value.