backend-data-architect

Implements typed Supabase and GitHub GraphQL data layers for Next.js App Router.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/marketiv-id/marketiv-web --skill backend-data-architect-marketiv-id
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-data-architect
Source: https://github.com/marketiv-id/marketiv-web/tree/main/.github/skills/backend-data-architect
Command: npx skills add https://github.com/marketiv-id/marketiv-web --skill backend-data-architect-marketiv-id

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It removes the guesswork and inconsistency of wiring backend data fetching in a Next.js App Router project, ensuring Supabase queries stay type-safe, caching is explicit, and UI never crashes from unhandled data errors. ## Core Features & Use Cases - Supabase Type Synchronization: Reads the live schema via Supabase MCP or generates TypeScript types with the Supabase CLI into src/types/supabase.ts. - Server-First Data Fetching: Places queries in Server Components or Server Actions with explicit revalidate or no-store cache strategies and React cache deduplication. - GitHub GraphQL Integration: Keeps GraphQL queries in dedicated modules and maps responses to typed portfolio domain models with early-return error handling. - Use Case: When adding a new portfolio page that combines Supabase project data with GitHub repository stats, this Skill produces the fully typed server-side fetch functions with correct caching and safe fallbacks. ## Quick Start Ask the assistant to implement a typed server-side data fetching function for a specific Next.js route using Supabase or GitHub GraphQL with an explicit cache strategy.

Frequently Asked Questions about backend-data-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync Supabase types to TypeScript?

Run npx supabase gen types typescript --project-id <PROJECT_ID> and redirect the output to src/types/supabase.ts. If Supabase MCP is connected, the live schema can be read directly before writing queries instead of running a manual sync.

How to fetch data in Next.js App Router Server Components?

Place data fetching in Server Component loader functions or Server Actions for mutations, keeping secrets on the server. Wrap reusable fetch functions with React cache to deduplicate repeated calls within the same route.

Does Next.js 15 require explicit cache configuration for fetch?

Yes, caching behavior should be declared explicitly. Use next: { revalidate: 3600 } for static-like data and cache: "no-store" or a low revalidate value for frequently changing data.

When should Client Components fetch data instead of Server Components?

Client Components should only fetch for interactive needs such as realtime subscriptions or pagination. All primary data loading belongs at the server boundary to avoid exposing secrets and to keep caching predictable.

How do I handle unstable GitHub GraphQL responses safely?

Keep GraphQL query strings in a separate constants module, map responses to typed domain models before UI use, and apply narrowing with fallback values. Use early returns for invalid or partial responses instead of assuming every field exists.