feat(admin-ui): minimal React+Vite+TanStack scaffolding

- Vite 7 + React 19 + TanStack Router (file-based) + TanStack Query
- Tailwind v4 (CSS-first config, OKLCH brand colors)
- i18next + react-i18next с RU/EN switcher в header
- Axios client с Accept-Language interceptor + JWT placeholder
- 2 pages: /dictionaries (list cards) + /dictionaries/$name (records table)
- Dockerfile (node build + nginx serving + API proxy)
- README + .gitignore

Backend:
- Новый GET /api/v1/dictionaries в read-api (DictionaryListController),
  фильтрует по доступному scope через ScopeContext
- DictionaryListItem DTO без heavy schema_json

routeTree.gen.ts — stub; реальное содержимое генерится Vite plugin'ом при
первом 'pnpm dev'.
This commit is contained in:
Александр Зимин
2026-05-04 00:55:04 +03:00
parent adc5315948
commit 1eba2ee59b
20 changed files with 609 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Ordinis Admin UI
React 19 + Vite 7 + TanStack Router + TanStack Query + Tailwind v4 + i18next.
## Локально
```bash
cd ordinis-admin-ui
pnpm install
# .env.local: VITE_API_PROXY=http://localhost:8081 (port-forward read-api)
pnpm dev
```
## Контракт API
- `GET /api/v1/dictionaries` (read-api) — список справочников
- `GET /api/v1/{dictionaryName}/records` (read-api) — записи с локализацией
- `POST /api/v1/dictionaries` (writer) — создание справочника (TODO в UI)
- `POST /api/v1/dictionaries/{name}/records` (writer) — создание записи (TODO в UI)
## Сборка / Docker
```bash
docker build -t repo.nstart.cloud/terravault/ordinis-admin-ui:dev .
docker run --rm -p 8088:80 repo.nstart.cloud/terravault/ordinis-admin-ui:dev
# → http://localhost:8088
```
В кластере nginx проксирует `/api/v1/*` в `ordinis-read-api` (GET) и
`ordinis-app` (POST/PUT/PATCH/DELETE).