Develop, debug, and ship T3 Stack applications using Next.js + TypeScript with better-auth, Prisma, tRPC, and Tailwind CSS. Use when implementing new fullstack features, auth/session flows, API procedures, database schema changes, high-quality frontend UI work with Tailwind, bug fixes, refactors, performance work, or GitHub-ready release preparation for this stack.
package-lock.json, pnpm-lock.yaml, yarn.lock).npm run lintnpm run typechecknpm run checkscripts/t3_stack_audit.sh for fast stack validation when onboarding a repo.npm run check.A01 Broken Access Control: Enforce authorization in server procedures and DB filters; never rely on client-side checks.A02 Security Misconfiguration: Keep secure defaults, disable debug exposure, and load all secrets from environment variables.A03 Software Supply Chain Failures: Pin dependency versions, review lockfile changes, and run dependency audit in CI.A04 Cryptographic Failures: Use modern algorithms and managed libraries; never create custom crypto implementations.A05 Injection: Validate all untrusted inputs with Zod and use Prisma parameterized queries/ORM patterns only.A06 Insecure Design: Add threat-aware acceptance criteria for new features and define misuse cases before implementation.A07 Authentication Failures: Use better-auth best practices, strict session validation, secure cookie settings, and short-lived tokens where needed.A08 Software or Data Integrity Failures: Verify build/deploy integrity, protect CI/CD secrets, and require trusted artifact sources.A09 Security Logging and Alerting Failures: Log security-relevant events with request/user context and create actionable alerts.A10 Mishandling of Exceptional Conditions: Fail securely on exceptions, return safe error messages, and avoid leaking internal details.For detailed controls and review checklist, read references/owasp-2025-security-checklist.md.
prisma/schema.prisma first for data model updates.db:push for local iteration and migrations for durable environments.select/include) to avoid overfetching.any and ad-hoc casting.For detailed UI standards, read references/tailwind-ui-quality-guide.md.
strict-safe code and avoid non-null assertions unless justified.Prisma, tRPC, zod) over duplicate interfaces.npm run check and npm run build..env.example includes required variables without secrets.lint, typecheck, build).For detailed release checklist, read references/github-publish-checklist.md. For architecture guardrails and patterns, read references/t3-implementation-playbook.md.