Commit Graph
24 Commits
Author SHA1 Message Date
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
parsa aghaei 4ed83bbecf fix: project images not loading - use getCleanImgSrc for grid cards + fix URL path extraction 2026-06-29 14:00:22 +03:30
parsa aghaei 056f838172 fix: testimonial arrow layout/direction logic, language switcher fonts, getCleanImgSrc sanitizer 2026-06-29 13:45:40 +03:30
parsa aghaei 8666d8067a fix: precise fixes - name spelling, nav i18n, header scroll logic, testimonials padding, Persian digits 2026-06-29 10:53:26 +03:30
parsa aghaei 79c229a93c fix: UI/UX regressions - header glassmorphic, dark mode icons, testimonials i18n, image remotePatterns 2026-06-29 09:57:51 +03:30
parsa aghaei 7dc79b3151 fix: sticky header blur on scroll, testimonials carousel 6 items + RTL arrows, project modal dual-column, smooth scroll, hero btn no-wrap 2026-06-29 09:32:40 +03:30
parsa aghaei 470036d6b9 fix: hero button localization/hover, lang switcher dark mode, services grid, testimonials carousel, project modal, footer gap, back-to-top 2026-06-29 08:58:26 +03:30
DevOps be6e37b11f fix: self-host Google Fonts (Inter, JetBrains Mono) via localFont; fix tailwind border-border color 2026-06-28 17:15:13 +00:00
parsa aghaei adda6ae880 content: update hero and about me copy to professional senior engineer tone 2026-06-28 20:20:29 +03:30
parsa aghaei 83b5a2f22a style: implement dark theme, glassmorphism, and framer-motion architecture; chore: update seeders with professional copywriting for EN and FA languages 2026-06-28 20:20:29 +03:30
parsa aghaei 7533f8c97c upgrade: Next.js 16 + React 19, codemod transforms (async APIs, middleware→proxy, ESLint flat config) 2026-06-28 11:41:00 +03:30
parsa aghaei e89b8f8b44 postSingle page internationalization added 2024-10-21 12:44:18 +03:30
parsa aghaei 12df663ef2 categoriySingle page internationalization added 2024-10-21 12:29:58 +03:30
parsa aghaei 693664017c categories page internationalization added 2024-10-21 12:18:18 +03:30
parsa aghaei c11764a4c0 filteredPosts page internationalization added 2024-10-21 11:37:38 +03:30
parsa aghaei c3f7fc5d2b blog homePage intenationalization added 2024-10-21 11:13:18 +03:30
parsa aghaei fc9fcf6a9a dictionory Updated 2024-10-21 10:44:38 +03:30
parsa aghaei 71734d6f0c website homePage cleaning the code 2024-10-20 17:34:37 +03:30
parsa aghaei d0893cf7fe footer updated for internationalization 2024-10-20 17:00:04 +03:30
parsa aghaei 1a1e2d66d2 contact responsive updated 2024-10-20 16:10:25 +03:30
parsa aghaei 22be1be11c language added to mobileMenu 2024-10-20 15:15:30 +03:30
parsa aghaei e1f6eabcc9 menu internationalization completed 2024-10-20 12:32:00 +03:30
parsa aghaei bd1dbe42f9 metadata added to pages 2024-10-19 14:02:39 +03:30
parsa aghaei 013f49be1e nternationalization added to website 2024-10-15 16:40:42 +03:30