Add blog CMS with tracked public posts
Build Check / build (pull_request) Successful in 34s
Build Check / push-image (pull_request) Has been skipped
Build Check / deploy-coolify (pull_request) Has been skipped

This commit is contained in:
2026-07-17 22:02:25 +00:00
parent ef63164d58
commit 912e5edb81
24 changed files with 1667 additions and 36 deletions
+6 -4
View File
@@ -6,17 +6,19 @@ Personal portfolio built with Next.js, React, TypeScript, and Tailwind CSS.
- Hero dev-card, live-count stat, and work-experience timeline
- Projects (served from our DB) with a `/projects` page and homepage teaser
- Blog system with DB-backed markdown posts, admin editing, and view tracking
- Luna section, DB-driven affiliates, and the SHSF Code Activity graph
- Admin CMS at `/admin` for projects, work experience, and affiliates
- Admin CMS at `/admin` for projects, blog posts, work experience, and affiliates
## Data layer
Content (projects, work experience, affiliates) lives in **Postgres** and is
Content (projects, blog posts, work experience, affiliates) lives in **Postgres** and is
managed through Prisma + our own Next.js API routes:
- Public reads: `GET /api/projects`, `/api/experience`, `/api/affiliates`
- Admin writes: `POST/PUT/DELETE /api/admin/{projects,experience,affiliates}/…`
- Public reads: `GET /api/projects`, `/api/blogs`, `/api/blogs/top`, `/api/experience`, `/api/affiliates`
- Admin writes: `POST/PUT/DELETE /api/admin/{projects,blogs,experience,affiliates}/…`
(cookie session issued by `POST /api/admin/login`)
- Blog content views increment when `/blogs/[slug]` or `GET /api/blogs/[slug]` is requested
- `/api/profile-image` serves the avatar (cached in memory)
- Only the **Code Activity** widget still uses the external SHSF API.