Thank you for your interest in contributing! This document covers code standards, workflow, and how to get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/AI-SCERN.git - Install dependencies:
cd frontend && npm install --legacy-peer-deps - Copy
.env.example→.env.localand fill in values - Start dev server:
npm run dev
- Create a feature branch:
git checkout -b feat/your-feature - Make changes with clear, atomic commits
- Run type check:
npm run type-check(ornpx tsc --noEmit) - Open a Pull Request against
main
Follow Conventional Commits:
feat(detection): add audio deepfake confidence bands
fix(upload): reject SVG files in MIME allowlist
chore(deps): bump next to 15.2.0
docs(readme): update benchmark table
Types: feat, fix, chore, docs, refactor, test, perf, security
- Strict mode on — no
anyunless absolutely unavoidable (useunknown+ type narrowing) - All API route handlers typed with
NextRequest/NextResponse - Interfaces over
typefor objects;typefor unions/primitives
- Use App Router (no Pages Router)
- Server components by default;
'use client'only when state/effects needed - No hardcoded secrets in any file — use
process.env.* SUPABASE_SERVICE_ROLE_KEYmust never be prefixed withNEXT_PUBLIC_
- Never return stack traces or SQL errors to the client
- All file uploads must go through
lib/security/fileValidation.ts - All POST/PUT/DELETE/PATCH routes must validate CSRF via
lib/security/csrf.ts - All API routes must authenticate via
creditGuardor explicit Clerkauth()
- Tailwind CSS only (no inline styles except for dynamic values)
- Mobile-first responsive design
- Touch targets ≥ 44px
- Base font ≥ 16px (prevents iOS auto-zoom)
-
npx tsc --noEmitpasses - No secrets committed (run
git diff --stagedand verify) - Mobile responsive (check iPhone SE viewport)
- All new API routes have auth + rate limiting
- New file upload paths use
fileValidation.ts
Use the Bug Report template.
Use the Feature Request template.
See SECURITY.md — do not file a public issue.
See CODE_OF_CONDUCT.md.