mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
1.1 KiB
1.1 KiB
AGENTS.md
Must-follow constraints
- Use
bunonly. Do not usenpmorpnpm. - Do not start the dev server (
bun run dev); assume it is already running. - If you change
prisma/schema.prisma, runbun run db:generate. - In App Router dynamic routes, keep
paramstyped asPromise<...>andawait paramsin handlers/pages.
Validation before finishing
- Run
bun run check.
Repo-specific conventions
- Use
auth()from@/lib/authfor server-side session reads. - Use
checkProjectAccess()/checkWorkspaceAccess()for authorization instead of ad-hoc role checks. - For API responses, use
successResponse/apiErrorsfrom@/lib/api-response. - Keep API and UI imports on
@/aliases when available.
Important locations
- Custom SQL not managed by Prisma migrations:
prisma/migrations/*.sqland runnerscripts/db-extras.ts. - Shared API response helpers:
lib/api-response.ts. - Auth + access-control helpers:
lib/auth.ts.
Change safety rules
- Prefer backward-compatible API changes unless explicitly asked to break contracts.
- For multi-step DB writes, use Prisma transactions.