root 2b7eda656a Add the admin panel for managing site content
Server-rendered CMS at /admin, reachable only with an authenticated admin.
There was no way to change anything on the site without a database session,
while every mutating endpoint used to be anonymous, so the site was either
unmanageable or, before the API lock-down, wide open.

Everything runs through Server Actions, so the httpOnly
parsaaghayi_admin_session cookie set by the backend is read server-side and
forwarded as a bearer token. No token ever reaches client JavaScript and the
browser never talks to the backend cross-origin, so CORS and CSRF do not
apply. Unauthenticated visits to any panel route redirect to /admin/login.

Resources are declared once in a registry (src/app/lib/admin/resources.ts)
and the list, create and edit screens are generated from it, so adding a
content type is a data change rather than three new pages. Covered: posts,
categories, tags, projects, about-me.

Records are read from GET /api/admin/resources/{resource}, which returns
stored rows including every locale; the public endpoints only expose
translated display payloads and cannot populate an editing form.

Verified: tsc --noEmit clean, eslint clean, next build compiles and registers
all five admin routes as dynamic, and /admin, /admin/posts redirect 307 to
/admin/login while /admin/login renders.

Post bodies are rendered as text nodes, never as HTML.
2026-10-01 16:01:40 -04:00
2026-06-29 09:21:46 +03:30
2026-06-28 15:45:32 +00:00
2024-11-11 12:44:23 +03:30
2024-11-20 16:38:40 +03:30
2024-11-20 16:38:40 +03:30
2024-09-15 10:08:29 +03:30
2024-11-16 17:07:57 +03:30

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

S
Description
No description provided
Readme
42 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 97.5%
JavaScript 1.5%
CSS 1%