AEAl-Andalus⺢Experience
Sign in · Join
AEAl-Andalus⺢Experience
ProjectsGalleryAboutArticlesDashboardAPI
© 2026 — Modular content systems☕buy me a coffee
Framework Study Guide
ChaptersCardsLegendRoadmapRoute Map
Cards
Card · LegendCard · Server PageCard · Client ComponentCard · Entity ActionsCard · Server ActionsCard · Context ProviderCard · API RouteCard · Types & PrismaCard · Entity-FirstCard · DeploymentCard · Next 16 + Prisma 7Card · CSS & TailwindCard · Libraries & AcceleratorsCard · Prisma 7 (Next App Router)Card · TypeORMCard · DrizzleCard · Special FilesCard · Client BoundariesCard · Next 16: cache, PPR, proxy, AI
→ chapters/03-entity-actions

Card · Entity Actions

Single source of truth; Prisma lives only here.

Rules

  • Validate + authorize at the boundary.
  • Expose get*/mutations; no JSX or UI imports.
  • Called by server pages (reads) and server actions (writes).

Guarded Read (Prisma 7 Adapter)

import { getPrisma } from "@/lib/prisma";

export async function getProjectById(id: string) {
return getPrisma().project.findUnique({ where: { id } });
}

Study Card · Chapter 03-entity-actions