

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# API Patterns — NestJS backend buero.de78## Структура модуля910- Модуль: `*.module.ts` (imports, exports, providers).11- Контролер: `*.controller.ts` — тільки HTTP (параметри, виклик сервісу, повернення).12- Сервіс: `*.service.ts` — бізнес-логіка, робота з Prisma (інжекція PrismaService).13- DTO: окремі файли або папка dto; class-validator + class-transformer; Swagger @ApiProperty / @ApiPropertyOptional.1415## Аутентифікація та авторизація1617- Захист ендпоінтів: **JwtAuthGuard** (Passport JWT). Токен з cookie або заголовка `Authorization: Bearer`.18- Ролі: **RolesGuard** + декоратор **@Roles('student' | 'teacher')**. Адмін-ролі немає.19- Поточний користувач: декоратор типу **@CurrentUser()** або **req.user** (payload JWT: id, role, email тощо).20- Деталі: docs/auth-spec.md (токени в cookie, refresh у Postgres, revoke при logout).2122## Контролери2324- Swagger: **@ApiTags**, **@ApiOperation**, **@ApiResponse**; для захищених — **@ApiBearerAuth()** або опис cookie.25- Валідація: **ValidationPipe** глобально; DTO з декораторами class-validator.26- Помилки: **HttpException** з відповідним статусом (400, 401, 403, 404); не витікати внутрішні деталі.27- Доступ до контенту (курси, матеріали): перевіряти активну підписку або trial для студента (модуль Subscriptions / student_profiles.trial_ends_at).2829## DTO та валідація3031- **@IsString()**, **@IsEmail()**, **@IsUUID()**, **@IsEnum()**, **@IsOptional()**, **@Min()**, **@Max()**, **@ValidateNested()**, **@Type()** (class-transformer).32- Swagger: **@ApiProperty({ description, example })** для обов'язкових; **@ApiPropertyOptional()** для опціональних.33- Не повертати в response поля типу password_hash; при потребі **@Exclude()** та class-transformer.3435## Робота з БД3637- Єдиний доступ до БД через **PrismaService** (інжекція в сервіси).38- Складні операції (кілька записів, консистентність) — **транзакції** Prisma.39- Перевіряти існування сутностей перед оновленням/видаленням (наприклад курс, матеріал, user); 404 якщо не знайдено.40- Не використовувати Redis у MVP; сесія = JWT + refresh у Postgres.41
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| annnsvm/buro-de.cursor/rules/auth-and-roles.mdc · 3 | Cursor rules | security | 39/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/coding-style.mdc · 3 | Cursor rules | lint-format | 48/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/database-patterns.mdc · 3 | Cursor rules | database | 52/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/frontend-patterns.mdc · 3 | Cursor rules | securityapi | 39/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/git-workflow.mdc · 3 | Cursor rules | gitagent-behaviour | 25/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/project-structure.mdc · 3 | Cursor rules | no sections | 44/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/stripe-and-access.mdc · 3 | Cursor rules | no sections | 39/100 | 14 days ago | |
| annnsvm/buro-de.cursor/rules/testing-api.mdc · 3 | Cursor rules | testtesting-strategydatabase | 48/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/annnsvm-buro-de-cursor-rules-api-patterns)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.