3.9 KiB
3.9 KiB
Auth Portal — Руководство для ИИ
Стек
- Monorepo:
apps/web+apps/api(@authportal/api, Fastify + SQLite/better-sqlite3) +packages/ui(@authportal/ui) +packages/db+packages/shared - Vite + React + TanStack + shadcn base-nova + ReUI Frame
- App Switcher: CFDM / vps / bgp / fw / dns (Technitium)
- Auth: JWT fragment SSO для своих SPA и OIDC IdP для внешних RP (Technitium)
OIDC
- Endpoints:
/.well-known/openid-configuration,/.well-known/jwks.json,/oauth/authorize,/oauth/token,/oauth/userinfo - Admin UI:
/admin/oidc - Docs:
docs/integrate-technitium.md
UI
- Hierarchy: ReUI PRO > shadcn
- Surface: frame
- Contract:
docs/ui-design-contract.md - Docs: Introduction · llms.txt · MCP · Agent Skills
- Skill:
.claude/skills/reui(68f0e6fa91, 27 free components) - Rules:
.cursor/rules/reui-mcp.mdc,frontend-shadcn.mdc,frontend-ui-patterns.mdc,shadcn-mcp.mdc,shadcn-ui-production.mdc - Primary MCP:
user-reui; primitives:plugin-shadcn-shadcn - Chrome: header AppsMenu → SystemMonitorPopover; NavUser in sidebar footer (theme segmented); no ModeToggle in header
- Kit:
KpiStatGrid,QuickActionGrid(SoT markup = EvoBGP + IconTile); lists =AdminUsersGrid/ PageShell + Frame + DataGrid
License
REUI_LICENSE_KEY in apps/web/.env.local + Bearer in apps/web/components.json.
Команды
pnpm install
pnpm --filter web dev
pnpm --filter web build
pnpm --filter @authportal/api test
CI / Docker
Gitea: .gitea/workflows/{ci,cd,quality}.yaml. Образы: deploy/docker (node:22-alpine, bake + registry cache). Теги authportal + drop-in auth-portal. Не корневой Dockerfile. Подробнее: docs/releasing.md, .gitea/README.md.
ReUI design rules (every UI edit, follow-ups included)
This project uses an existing design system: ReUI on shadcn/ui. Keep its look. Generic frontend advice (vary fonts or themes, gradients, page-load or staggered reveals, "2-3 intentional motions", Framer Motion) does not apply here, and other design skills lose where they disagree.
- Use installed components first (
components/ui,components/reui): tablesdata-grid, filteringfilters, boardskanban, modalsDialogorAlertDialog, toastssonner. Never set height, radius, padding, shadow or motion on them; usesize,variant,spacing. - Color: semantic tokens. State:
<Badge variant="success-light">from@/components/reui/badgeat default size, or Alert variants. Raw palette only for categorical identity, with itsdark:pair. - Spacing:
gap-*on the parent:gap-1togap-2in a row,gap-3togap-4between groups,gap-6togap-8between sections. Type:text-smbody,text-xsmeta, nothing smaller; never resize FrameTitle or CardTitle. - Motion: installed parts already animate; never retime them. Yours: hover
transition-colors; revealduration-200 ease-[cubic-bezier(0.22,1,0.36,1)]; transform and opacity only; nevertransition-all, bounce, or a stagger on table rows or lists of 20+; at most 1 entrance per view;MotionConfig reducedMotion="user"plusmotion-reduce:. - Every data region: empty state with an action,
Skeletonloading, inline error with Retry. - Before UI code, write the plan from
.agents/skills/reui/SKILL.mdin your reply. Before you finish, run its self-check on the files you changed and fix every hit (2 rounds at most). Full rules:.agents/skills/reui/SKILL.md. If that folder is missing, call thereuiMCP toolget_agent_skill.
Managed by the ReUI installer. Edits between the markers are replaced on the next run.