Introduced a new `verify_tls` boolean option in health check configurations across various services, allowing users to specify whether to validate TLS certificates during health checks. Updated related components and services to accommodate this new option, ensuring proper handling in both the backend and frontend. Enhanced tests to validate the new functionality and ensure correct behavior with different configurations.
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
---
|
|
description: Backend API — при изменениях, затрагивающих UI, строго следовать shadcn Components/Blocks
|
|
globs: apps/api/**/*,packages/shared/**/*
|
|
alwaysApply: false
|
|
---
|
|
|
|
# Backend API + shadcn/ui
|
|
|
|
Fastify backend: `apps/api/`. Контракты — `@cfdm/shared` (Zod). Frontend — TanStack Query.
|
|
|
|
## Обязательный порядок
|
|
|
|
1. **Backend** — route, service, Vitest (`app.inject()`)
|
|
2. **Схемы** — `@cfdm/shared` (не дублировать в `apps/web/src/lib/schemas.ts`)
|
|
3. **UI** — shadcn MCP ([`shadcn-mcp.mdc`](shadcn-mcp.mdc))
|
|
|
|
## Запрещено на frontend при доработке API
|
|
|
|
- Новые raw `<table>` / `<select>` / кастомные badge-цвета
|
|
- Дублирование Zod schemas в `apps/web` — только re-export из `@cfdm/shared`
|
|
- Самописные формы без `Field` + RHF + Zod
|
|
|
|
## UI-паттерны (ReUI Frame)
|
|
|
|
| API-данные | UI |
|
|
|------------|-----|
|
|
| Список | `ResourcePage` (Frame + DataGrid + Filters) |
|
|
| Создание / редактирование | `FormSheet` + `FieldGroup` + RHF |
|
|
| Settings | `SettingsShell` + Frame + `SettingRow` |
|
|
| Статус | ReUI `Badge` / `StatusBadge` |
|
|
| Ошибка | `sonner` `toast.error` |
|
|
|
|
## Согласованность
|
|
|
|
- JSON поля — snake_case как в существующем API
|
|
- Новый endpoint → `queryOptions` в `apps/web/src/queries/`
|
|
|
|
MCP backend: [`backend-mcp.mdc`](backend-mcp.mdc) · Fastify: [`backend-fastify.mdc`](backend-fastify.mdc)
|