Skip to content

niklhut/libroo-website

Repository files navigation

Libroo Website

This is the landing page for Libroo — a personal library app for tracking your books, managing collections, and keeping track of what you’ve lent to friends.

You can find the main libroo repository here.

✨ Features

  • Responsive and fast landing page
  • Light/dark mode with a custom toggle (click & right-click interactions)
  • Early-access signup modal with email capture
  • Spam protection via Cloudflare Turnstile
  • Privacy-friendly analytics using Umami

🚀 Tech Stack

📦 Setup

git clone https://github.com/niklhut/libroo-website.git
cd libroo-website
pnpm install
pnpm dev

☁️ Deploy To Cloudflare Workers

This repository deploys via GitHub Actions (not Cloudflare Dashboard Git builds).

  1. Create a production D1 database.
pnpm wrangler d1 create libroo-website
  1. Add GitHub repository secrets.
  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID
  • CLOUDFLARE_D1_DATABASE_ID (production DB UUID)
  • CLOUDFLARE_D1_PREVIEW_DATABASE_ID (optional dedicated preview DB UUID)
  • NUXT_UI_PRO_LICENSE
  • NUXT_TURNSTILE_SECRET_KEY_PRODUCTION
  • NUXT_TURNSTILE_SECRET_KEY_PREVIEW (optional; falls back to production secret)
  1. Add GitHub repository variables used by nuxt.config.ts vars injection.
  • CLOUDFLARE_ACCOUNT_SUBDOMAIN (Workers subdomain prefix used to build preview URLs, e.g. <subdomain>.workers.dev)
  • NUXT_PUBLIC_TURNSTILE_SITE_KEY
  • NUXT_SITE_URL
  • NUXT_PUBLIC_SCRIPTS_UMAMI_ANALYTICS_SCRIPT_INPUT_SRC
  • NUXT_PUBLIC_SCRIPTS_UMAMI_ANALYTICS_WEBSITE_ID (optional)
  1. Workflows.
  • Push to main runs .github/workflows/deploy-production.yml.
  • Pull request updates run .github/workflows/deploy-preview.yml.
  • Closing a pull request runs .github/workflows/cleanup-preview.yml.

Preview deploy behavior:

  • Each PR gets a dedicated Worker name: libroo-preview-pr-<number>.
  • Each PR gets a dedicated D1 database: libroo-preview-pr-<number>.
  • On PR close, the preview Worker and D1 DB are deleted.

Production deploy behavior:

  • Uses libroo-website Worker name.
  • Applies migrations against production D1 before deploy.
  • Routes custom domain only for production deploys.

For local/manual CLI usage, you can still run:

pnpm db:migrate:remote
pnpm deploy

For local pnpm dev, the app applies Drizzle migrations for the local sqlite fallback on server startup.

📜 License

This project is licensed under the MIT License. See LICENSE for details.

About

Landing page for Libroo — a personal library app for tracking your books, managing collections, and keeping track of what you’ve lent to friends.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors