RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/annnsvm/buro-de

Cursor rule

.cursor/rules/auth-and-roles.mdc

Auth та ролі — JWT, cookie, student/teacher

Cursor rules

Quality

39/100

Scores the file, not the repository.

Length

210 words

4 headings · 0 code blocks

Repository

3

— · pushed 103 days ago

Last changed

3 days ago

First indexed 3 days ago.
annnsvm/buro-de/.cursor/rules/auth-and-roles.mdcRawGitHub
1---
2globs: "buero-backend-api/src/**/auth/**/*,buero-backend-api/src/**/guards/**/*,buero-backend-api/src/**/strategies/**/*,buero-backend-api/src/**/*.ts"
3description: "Auth та ролі — JWT, cookie, student/teacher"
4---
5 
6# Auth та ролі — buero.de
7 
8## Джерела
9 
10- **docs/auth-spec.md** — повна специфікація (реєстрація = логін, cookie, refresh у Postgres, logout).
11- **docs/auth-config.md** — конфігурація (TTL, назви cookie).
12 
13## Ключові правила
14 
15- **Токени в cookie**, не в тілі JSON: `access_token`, `refresh_token`. Опційно приймати access з заголовка `Authorization: Bearer` для клієнтів, які не відправляють cookie.
16- **Refresh** зберігається в БД (таблиця **refresh_tokens**); при logout — **revoke** (revoked_at або видалення). Ротація refresh при виклику /refresh.
17- **Ролі:** тільки **student** та **teacher**. Немає ролі admin; для адміністративних дій використовувати окремий механізм поза MVP якщо знадобиться.
18- **Guards:** JwtAuthGuard для захищених ендпоінтів; RolesGuard з **@Roles('student' | 'teacher')** де потрібна перевірка ролі (наприклад тільки teacher може POST /api/courses).
19- **Студент:** доступ до **матеріалів курсу** — лише за умови наявності запису в **user_course_access** для цього курсу (trial з trial_ends_at > now(), купівля або активна підписка на курс). Каталог курсів — всі опубліковані; перевірка user_course_access — при GET матеріалів та прогресу.
20- **Вчитель:** будь-який вчитель може створювати/редагувати/видаляти **будь-який** курс і матеріали (не обмежувати за teacher_id для доступу).
21 
22## Реєстрація та логін
23 
24- Реєстрація: створення user + відповідного профілю (student_profiles або teacher_profiles); після успішної реєстрації одразу видавати пару токенів у cookie (не вимагати окремий login).
25- Логін: перевірка email + password (bcrypt); видача access + refresh у cookie.
26 

Sections

  • Auth та ролі — buero.de
  • Джерела
  • Ключові правила
  • Реєстрація та логін

What it covers

security

Stack — with the evidence

typescript

(1.00)

prisma

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

nestjs

(0.70)

tailwind

(0.70)

vite

(0.70)

vitest

(0.70)

jest

(0.70)

playwright

(0.70)

javascript

(0.60)

Glob targeting

  • buero-backend-api/src/**/auth/**/*
  • buero-backend-api/src/**/guards/**/*
  • buero-backend-api/src/**/strategies/**/*
  • buero-backend-api/src/**/*.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
annnsvm
Language
—
License
—
Archived
no

All configs in this repo

Also in annnsvm/buro-de

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
annnsvm/buro-de.cursor/rules/api-patterns.mdc · 3Cursor rulestypescriptprisma+10styleapi48/1003 days ago
annnsvm/buro-de.cursor/rules/coding-style.mdc · 3Cursor rulestypescriptprisma+10lint-format48/1003 days ago
annnsvm/buro-de.cursor/rules/database-patterns.mdc · 3Cursor rulestypescriptprisma+10database52/1003 days ago
annnsvm/buro-de.cursor/rules/frontend-patterns.mdc · 3Cursor rulestypescriptprisma+10securityapi39/1003 days ago
annnsvm/buro-de.cursor/rules/git-workflow.mdc · 3Cursor rulestypescriptprisma+10gitagent-behaviour25/1003 days ago
annnsvm/buro-de.cursor/rules/project-structure.mdc · 3Cursor rulestypescriptprisma+10no sections44/1003 days ago
annnsvm/buro-de.cursor/rules/stripe-and-access.mdc · 3Cursor rulestypescriptprisma+10no sections39/1003 days ago
annnsvm/buro-de.cursor/rules/testing-api.mdc · 3Cursor rulestypescriptprisma+10testtesting-strategydatabase48/1003 days ago
Diff against .cursor/rules/api-patterns.mdc Diff against .cursor/rules/coding-style.mdc Diff against .cursor/rules/database-patterns.mdc Diff against .cursor/rules/frontend-patterns.mdc Diff against .cursor/rules/git-workflow.mdc Diff against .cursor/rules/project-structure.mdc Diff against .cursor/rules/stripe-and-access.mdc Diff against .cursor/rules/testing-api.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack