Phase 1: self-hosted backend (adapter-node + SQLite) replacing Supabase

Migrate the gallery/admin off the static + Supabase setup to a self-hosted
full-stack app that runs on the home server behind nginx.

- Switch adapter-static -> adapter-node
- SQLite via Drizzle (users, sessions, gallery_images); migrations run on startup
- Server-side session auth (argon2 hashing, httpOnly cookie, SHA-256 stored token,
  sliding expiry) wired through hooks.server.ts
- Admin: server-side login, route guard, gallery upload/delete via form actions
- Public gallery is now SSR from the DB; /uploads/[...path] serves images in dev
- scripts/create-admin.js + db:generate/db:migrate/create-admin npm scripts
- Remove @supabase/supabase-js and the client-side gallery/admin code
- Fix pre-existing imageOnRight boolean prop type in Main.svelte
- ADMIN_SETUP.md rewritten for local dev + home-server deploy (systemd, nginx, backups)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MaticIvesicandClaude Opus 4.8 committed 2026-08-02 20:54:06 +02:00
1 parent 41410e3079
commit 6bc5fffda2
32 files changed
+3241 -147

No files matched your search

+3
View File
@@ -8,6 +8,9 @@ node_modules
/.svelte-kit
/build
# Local data (SQLite database + uploaded images)
/data
# OS
.DS_Store
Thumbs.db