Deployment guide
Build the static front end and deploy to Cloudflare or any static host.
BookmarkHarbor is a static single-page application. Deployment produces a build output directory and serves it from any static host. Because there is no backend or database, there are no secrets, environment variables, or infrastructure to provision for the data layer.
Before you begin
Section titled “Before you begin”| Tool | Version | Purpose |
|---|---|---|
| Node.js | 20.19 or later, or 22.12 or later | JavaScript runtime for building |
| bun | 1.2 or later | Package manager |
Optional: wrangler if you deploy to Cloudflare.
Build the production bundle
Section titled “Build the production bundle”-
Install the dependencies.
bun install -
Build.
bun run build
The command runs tsc -b and vite build and emits the deployable site into dist/. Verify locally before you deploy:
bun run previewvite preview serves dist/ at a local URL.
Deploy to Cloudflare (static assets)
Section titled “Deploy to Cloudflare (static assets)”The repository includes wrangler.jsonc, which configures Cloudflare static-asset hosting:
{ "name": "bookmarkharbor", "compatibility_date": "2026-01-30", "assets": { "directory": "./dist" }}-
Build the project as described above.
-
Install
wranglerif you have not:bun add -d wrangler -
Authenticate (once):
bunx wrangler login -
Deploy the
dist/assets:bunx wrangler deploy
Because the app is a purely static site, you can also use wrangler pages deploy dist for Cloudflare Pages. Either path serves the built assets on the Cloudflare edge.
Deploy to any static host
Section titled “Deploy to any static host”Because dist/ contains only static files, you can serve it from any static host:
- GitHub Pages: push
dist/(or build in CI) to agh-pagesbranch or use a Pages workflow. - Vercel / Netlify: set the build command to
bun run buildand the output directory todist. - Any web server (nginx, Apache, S3 + CloudFront): copy the contents of
dist/to the document root.
Add a SPA fallback so deep routes resolve to index.html. BookmarkHarbor is a single view, so a fallback is only needed for hosts that rewrite unknown paths.
- The app persists data in the browser’s
LocalStoragefor the origin that serves it. A different origin (for example, a different subdomain or afile://open) has a separate, emptyLocalStorage, so users see a fresh library per origin. index.htmlloads an external analytics script. If you do not want analytics, remove that<script>tag before building.- There are no server-side environment variables. Track version bumps in
package.jsononly.
What’s next
Section titled “What’s next”- Architecture guide for the data model and domain modules.
- Development guide for conventions and testing.
- Frontend guide for views, interactions, and settings.