@bryantocara/starter-kit
v0.1.1
Published
Shared plumbing for Bryant's Astro + Cloudflare Workers sites — SEO, lead-form to GoHighLevel, config presets, and deploy wiring. Plumbing only; never design.
Maintainers
Readme
@bryantocara/starter-kit
Shared plumbing for Bryant's Astro → Cloudflare Workers sites. SEO, lead capture (form → Cloudflare Turnstile → GoHighLevel), config presets, and deploy wiring — the parts that repeat on every site, in one versioned place.
Plumbing, never design. This package ships zero opinionated visual components. Every site that consumes it stays 100% custom in look and feel; it inherits only the wiring. That's what makes "individually designed, shared infrastructure" sustainable.
What's inside
| Import | What it is |
|---|---|
| @bryantocara/starter-kit/config | Astro config preset — Cloudflare adapter + sitemap + sensible defaults |
| @bryantocara/starter-kit/components/BaseHead.astro | <head> SEO: canonical, Open Graph, Twitter cards |
| @bryantocara/starter-kit/components/LeadForm.astro | Turnstile-protected lead form (bring your own markup/styles) |
| @bryantocara/starter-kit/server/lead | Server handler: verify Turnstile + validate/allowlist fields → POST to a GHL inbound webhook |
| @bryantocara/starter-kit/presets/gitattributes | The .gitattributes every site copies |
Using it in a site
npm install @bryantocara/starter-kit @astrojs/cloudflare// astro.config.mjs
import { defineConfig } from 'astro/config';
import { presetConfig } from '@bryantocara/starter-kit/config';
export default defineConfig({
...presetConfig({ site: 'https://example.com' }),
});// src/pages/api/lead.ts
import { handleLead } from '@bryantocara/starter-kit/server/lead';
export const prerender = false;
export const POST = handleLead;For a form whose fields differ from the default (name, email, message), build a
configured handler instead:
import { createLeadHandler } from '@bryantocara/starter-kit/server/lead';
export const POST = createLeadHandler({ fields: ['name', 'email', 'company', 'message'] });Secrets (GHL webhook URL, Turnstile keys) are per-site environment variables — never committed, never in this package.
Per-site assets
BaseHead links /favicon.svg and /favicon.ico, and emits Open Graph / Twitter image
tags only when you pass image (no broken default). Provide those files in the site's
public/ directory.
Versioning & evolution
This kit is never "done." Each release adds or hardens plumbing — a new integration, a better form handler, a perf default. Sites adopt updates by bumping the version when they're ready; a delivered client site can stay pinned to an old version, untouched. Semver:
- patch — fixes, no behavior change
- minor — new, opt-in, backward-compatible plumbing
- major — a change that needs site-side edits (called out in the release notes)
Status
v0.x — pre-1.0, evolving quickly while the first sites (bryant-expert onward) shake it out. The API may shift between minors until v1.0.0.
License
MIT © 2026 Bryant B. Lopes
