Skam Docs

Contributing Guidelines

Branch naming, PR rules, and AI code generation standards.

Branch Naming Convention

Format
[author]/[type]/[app]/[short-description]
fix

A bug fix

devname/fix/dashboard/header-bug
chore

Deps, refactoring, tooling

devname/chore/discord-bot/update-deps
feature

A new feature

devname/feature/web/add-streaks

AI Code Generation Rules

If you use an AI assistant, it must follow these rules.

Critical Constraints
Security: Never expose SUPABASE_SERVICE_ROLE_KEY in client-side code.
Type Safety: All Supabase queries must use generated Database types.
Monorepo Integrity: Never fetch data in packages/ui. Pure props only.
Performance: Use <Image /> from next/image. Lazy load heavy components.

Architectural Rules

ComponentsShared UI in packages/ui, Web in apps/web/components, Dashboard in apps/dashboard/components.
MutationsMust use Server Actions (apps/*/actions). No API routes for forms.
FetchingPrefer React Server Components (RSC) accessing Supabase directly.
ImportsUse workspace aliases: @skam/ui, @skam/shared. No ../../../ paths.

Token Efficiency

No fluffJust output the code block, no preamble.
Partial updatesUse // ... existing code ... for unchanged sections.
ComponentsUse functional components with interface Props.
Client directive"use client" only when hooks or events are needed.

Code Ownership

All changes are automatically reviewed by @seifelesllamseif via .github/CODEOWNERS.