data-fetching
Installation
SKILL.md
Data Fetching Architecture
Overview
This project uses a structured data fetching pattern that differs between server and client components.
Core Principles
- Server components call server functions directly
- Client components use TanStack Query to fetch from API routes
- API routes wrap server functions using
apiRouteWrapper - Mutations from client components call server functions directly
- TMDB API uses auto-generated server functions from
tmdb-server-functions.ts
Server Components
Server components can directly await server functions.