template-bff
CommunityAlign Next.js BFF actions with best practices.
Software Engineering#supabase#zod#streaming#server actions#nextjs#backend-for-frontend#route handlers
Authordtaborda
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Template-bff codifies backend-for-frontend Server Action and Route Handler practices so the ui/ layer never bypasses Supabase abstractions, validation contracts, or standardized action results, eliminating scattered business logic and inconsistent data flows.
Core Features & Use Cases
- BFF decision tree clarifies when to favor Server Actions versus Route Handlers for streaming, webhooks, mutations, and data fetching needs.
- Server Action pattern demands Zod validation through
@template/contracts, delegation of business logic to@template/core, and returningActionResult<T>so components can react predictably. - Route Handler guidance covers SSE and webhook orchestration with proper headers, streaming flow, and error handling while keeping business logic centralized.
- Critical checklist enforces the prohibition of direct Supabase imports, inline schemas, cross-calling actions, and missing error handling across all server-side logic in ui/.
Quick Start
Request template-bff to implement a Server Action that validates input with @template/contracts, delegates to @template/core, and returns an ActionResult so UI components can handle success or failure predictably.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: template-bff Download link: https://github.com/dtaborda/startup-saas-template/archive/main.zip#template-bff Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.