nextjs-data-access-layer

Installation
SKILL.md

Data Access Layer (DAL)

Priority: P1 (HIGH)

Centralize all data access (Database & External APIs) to ensure consistent security, authorization, and caching.

Workflow

  1. Create DAL module in services/ or lib/data.ts with import 'server-only'.
  2. Verify auth inside every DAL function using await auth().
  3. Transform raw DB/API data into DTOs before returning to components.
  4. Wrap with cache() from React to deduplicate requests within render cycle.
  5. Taint-check sensitive objects to prevent accidental client exposure.

See implementation examples

Implementation Guidelines

Installs
GitHub Stars
521
First Seen
nextjs-data-access-layer — hoangnguyen0403/agent-skills-standard