Skip to content

Replace Notion integration with Neon Postgres and add password-protected admin portal#71

Open
Psavvas wants to merge 3 commits into
mainfrom
claude/neon-postgres-admin-portal-5adepk
Open

Replace Notion integration with Neon Postgres and add password-protected admin portal#71
Psavvas wants to merge 3 commits into
mainfrom
claude/neon-postgres-admin-portal-5adepk

Conversation

@Psavvas

@Psavvas Psavvas commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Site content (projects, blog posts, short links, and the About page's
'Now' section) now lives in a Neon Postgres database instead of Notion.
A new admin portal at /admin — guarded by an ADMIN_PASSWORD login with
signed HttpOnly session cookies — manages all of it, with Markdown
editors and live preview for project pages and blog posts.

  • db/schema.sql: idempotent script to run once in the Neon SQL editor
    (tables, triggers, indexes, seed content, sample drafts)
  • src/lib: Neon HTTP driver client, shared Markdown pipeline (image
    grids, YouTube/Vimeo embeds, project top-link buttons preserved from
    the Notion renderer), content queries, auth helpers
  • src/middleware.ts: session check for all /admin routes
  • src/pages/admin: dashboard, project/blog CRUD with draft/published
    visibility, redirects manager, Now-section editor, Markdown preview API
  • Switched to SSR via @astrojs/vercel so admin edits appear on the live
    site immediately; /404 and /contact stay prerendered
  • Replaced the build-time sitemap with a dynamic /sitemap.xml and added
    robots.txt (disallows /admin)
  • Removed @notionhq/client, notion-to-md, and @astrojs/sitemap

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt

…ted admin portal

Site content (projects, blog posts, short links, and the About page's
'Now' section) now lives in a Neon Postgres database instead of Notion.
A new admin portal at /admin — guarded by an ADMIN_PASSWORD login with
signed HttpOnly session cookies — manages all of it, with Markdown
editors and live preview for project pages and blog posts.

- db/schema.sql: idempotent script to run once in the Neon SQL editor
  (tables, triggers, indexes, seed content, sample drafts)
- src/lib: Neon HTTP driver client, shared Markdown pipeline (image
  grids, YouTube/Vimeo embeds, project top-link buttons preserved from
  the Notion renderer), content queries, auth helpers
- src/middleware.ts: session check for all /admin routes
- src/pages/admin: dashboard, project/blog CRUD with draft/published
  visibility, redirects manager, Now-section editor, Markdown preview API
- Switched to SSR via @astrojs/vercel so admin edits appear on the live
  site immediately; /404 and /contact stay prerendered
- Replaced the build-time sitemap with a dynamic /sitemap.xml and added
  robots.txt (disallows /admin)
- Removed @notionhq/client, notion-to-md, and @astrojs/sitemap

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
paulsavvas.com Ready Ready Preview, Comment Jul 16, 2026 2:15pm

The first deploy 500ed because DATABASE_URL wasn't configured and every
server-rendered page threw at request time. Public content getters now
catch database errors, log them, and render the page with empty content
(About falls back to its built-in copy; unknown slugs go to /404).
Admin pages render a 'Could not reach the database' notice with setup
instructions instead of crashing, and the editor forms still load so
the real error surfaces on save.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt
…vvas.com

The admin navbar packed everything against the left edge with a dead gap
before the right-side controls. It now mirrors the public site's navbar:
brand left, links centred (active page highlighted, no wrapping), actions
right, in a fixed-height row that stacks cleanly on small screens.

Also replaces every paulsavvas.me reference with paulsavvas.com — the
canonical site URL (og:url, sitemap, robots.txt), admin copy, README,
schema comments, and package name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants