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/04-server-actions

Card · Server Actions

Mutation entry: validate → authorize → entity → revalidate.

Sequence

  1. Read session/permissions.
  2. Validate input; authorize.
  3. Call entity action; revalidatePath.

Skeleton

"use server";
export async function createProjectAction(formData) {
const session = await getSession();
if (!session) throw new Error("Unauthorized");
await createProject(formData, session.user.id);
revalidatePath("/projects");
revalidateTag("projects");
}

Next 16 Security

  • Every Server Action is auto-exposed as a POST endpoint — always authorize at the top.
  • Use session + role checks on every action, not just UI guards.
  • Webhooks → Route Handlers with signature verification; not Server Actions.
  • Prefer revalidateTag for data-dependent routes over broad revalidatePath.

Study Card · Chapter 04-server-actions