Skip to content

About

The source for intrebit.com, a Dublin software studio's website. A real production site, not a template.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

intrebit.com

The source for intrebit.com, the website of intrebit, a software studio in Dublin. It's built the way we build for clients, and it's the test bench for everything else.

It's a real production site, not a starter template. The contact form, the visit counts and the blog admin are wired to our own backend, Dullahan, and to our Cloudflare account, so a clean clone won't run end to end. Read it to see how the site is put together. The site's own case study is the tour.

Stack

  • Astro 7, server-rendered on Cloudflare Workers
  • TypeScript
  • @astrojs/sitemap
  • Dullahan for visits, the contact form and the blog

Commands

npm run dev             # local dev server
npm run build           # runs the site's own checks, then builds
npm run preview
npm run check:seo       # structured data and llms.txt match the config
npm run check:ready     # fails on any placeholder left in the build
npm run check:browser   # every page in a real browser; nothing leaves the machine
npm run deploy          # needs CLOUDFLARE_ACCOUNT_ID in .env.local

Admin auth (dashboard)

/dashboard/* (blog admin) and the /api/blog/* write endpoints are gated by a single-admin session cookie. Everything else on the site stays public. Pageviews are collected via /api/p; read them from Dullahan directly.

Set these on the Worker (Cloudflare dashboard, or wrangler secret put):

Var Value
ADMIN_USERNAME pick one
ADMIN_PASSWORD_HASH PBKDF2 hash string from npm run hash-password
SESSION_SECRET openssl rand -hex 32

npm run hash-password prompts twice, then prints a pbkdf2$sha256$... string. Paste that as ADMIN_PASSWORD_HASH. The plaintext is never stored.

Password verification uses PBKDF2-HMAC-SHA256 (600k iterations) via the Web Crypto API. Cloudflare Workers forbid runtime WebAssembly.compile(), so WASM-based hashes like argon2 aren't an option here.

The session cookie is HttpOnly, SameSite=Lax and Path=/, signed with HMAC-SHA256 over a 30-day expiry, and Secure is set when NODE_ENV=production or ENVIRONMENT=production. Login is rate-limited to 5 attempts per IP per 15 minutes in process memory. Across several Worker isolates a determined attacker could exceed this, so treat it as a friction layer, not a hard guarantee.

License

The code is MIT licensed, see LICENSE. The licence doesn't cover the site's words, photos and drawings, the intrebit name and logo, or the clients' logos: those are all rights reserved, and each client's logo belongs to that client.

About

The source for intrebit.com, a Dublin software studio's website. A real production site, not a template.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages