SvelteKit gallery for climate awareness posters: public uploads go live immediately, Vercel Blob storage, PocketBase (SQLite) records, and moderators can delete posters when needed.
-
Copy
.env.exampleto.envand fill in PocketBase admin credentials,BLOB_READ_WRITE_TOKEN, andADMIN_MODERATION_PASSWORD. -
In PocketBase, create collections
postersandposter_reportsto match the fields inpb_schema/posters.collection.json(see the spec in your project plan for full field list). Set API rules so only the server (admin token) can read/write as needed for your deployment. -
Install Bun, then install and run:
bun install
bun run devbun run dev— development serverbun run build— production build (Vercel adapter)bun fmt— format with Prettier (bun run fmt:checkto verify without writing)bun lint— ESLint (Svelte + TypeScript)bun run test— Vitest unit testsbun run check/bun run typecheck— TypeScript and Svelte check
Open /admin/moderation, sign in with ADMIN_MODERATION_PASSWORD, then delete posters that should not stay in the gallery. Optional ADMIN_API_BEARER_TOKEN enables Authorization: Bearer for admin APIs (GET / DELETE /api/admin/posters).