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
+46
View File
@@ -0,0 +1,46 @@
import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'
import LanguageDetector from 'i18next-browser-languagedetector'
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: 'ru-RU',
supportedLngs: ['ru-RU', 'en-US'],
interpolation: { escapeValue: false },
resources: {
'ru-RU': {
translation: {
'app.title': 'Ordinis НСИ ЦУОД',
'nav.dictionaries': 'Справочники',
'header.scope': 'Доступный scope',
'dict.empty': 'В этом справочнике пока нет записей',
'dict.col.businessKey': 'Бизнес-ключ',
'dict.col.scope': 'Scope',
'dict.col.validFrom': 'Действует с',
'dict.col.locale': 'Локаль',
'dict.list.records': 'записей',
'loading': 'Загрузка...',
'error.failed': 'Не удалось загрузить данные',
},
},
'en-US': {
translation: {
'app.title': 'Ordinis MDM',
'nav.dictionaries': 'Dictionaries',
'header.scope': 'Allowed scope',
'dict.empty': 'No records in this dictionary yet',
'dict.col.businessKey': 'Business key',
'dict.col.scope': 'Scope',
'dict.col.validFrom': 'Valid from',
'dict.col.locale': 'Locale',
'dict.list.records': 'records',
'loading': 'Loading...',
'error.failed': 'Failed to load data',
},
},
},
})
export default i18n