Features
What's built, what it does, and where to find it in the codebase.
Deep dives on the bigger features live on their own pages — Customer Portal, Commerce, Media Gallery, and Visual Editors. Everything else is here.
Content & pages
| Feature | Route(s) | Backend story |
|---|---|---|
| Block-driven pages | /, /about, /features |
Local JSON ↔ Adhara-mergeable per block; edited via inline click-to-edit or the builder canvas — see The Content Model |
| Blog | /blog, /blog/[slug] |
Reads always merge local ∪ Adhara; writes (npm run blog) switch via GRAVITY_BLOG_BACKEND |
| Events | /events, /event/[slug], /portal/events |
Local ∪ Adhara merge once connected. The listing and every detail page are driven by the event’s own Adhara settings: pinned/featured order, hero image, schedule, hosts and speakers, ticket tiers, capacity. Sign-up follows the event’s registration mode and pricing — free/lead-capture registration, paid ticket checkout and donation checkout (Stripe, via Adhara’s public event-checkout endpoint; needs the workspace’s payment connection), a waitlist once full, and a link-out for listing-only events. /event/[slug] isn’t edge-cached (live capacity + post-checkout state) |
| Forms | /forms |
Contact + multi-step wizard demos, proxied to a real Adhara form. Includes a honeypot anti-spam field (_hp — the real field name the Adhara backend itself expects) |
Site features
| Feature | Route(s) | Backend story |
|---|---|---|
| Scheduling & booking | /scheduling, /schedule/[slug] |
No local content store — local is a clearly-labeled demo (sample meeting types, booking refused). Real availability/conflict checking only exists in Adhara |
| Links (link-in-bio) | /links |
Whole-page swap, not a merge, once connected. Public read only — the authenticated write API exists on Adhara but has no in-app admin UI here yet |
| Podcast | /podcast |
Not part of the toggle family — episode data always comes from parsing a real RSS/Atom feed via rss-parser, cached ~15 min. Feed URL: GRAVITY_PODCAST_RSS_URL, or an Adhara /links entry tagged category: "podcast" |
| Contact & newsletter | /contact, footer signup |
Always saves locally first (data/content/contact-submissions/, data/content/contacts.json), then additively syncs to a real Adhara form / CRM lead once configured. Never gated on Adhara succeeding |
| EBA application funnel | /everything-but-asana, /eba-application/* |
An Adhara Program runs it (tags, decision rules, emails, booking match, checkout); the site renders the pages, proxies the form and reports visits. Configured by npm run eba -- setup — see EBA Application Funnel |
| Festival opening ceremony funnel | /ceremony (/festival-opening-ceremony 301s here) |
Hand-written, no backend. The visitor picks an audience (festivalgoer / music lover) and an intention, and later sections are personalized to match. Both picks are kept in sessionStorage only, with no account. Picks and ticket clicks are pushed to dataLayer/gtag/plausible/fbq as separate events, whichever is loaded. The outbound ticket link carries utm_content=<audience>-<intention>. The ticket URL, event date line and admission flag are constants at the top of the page |
| Media gallery | /gallery |
See Media Gallery |
| Free resources | /resources, /resources/[slug] |
Not part of the toggle family (Adhara-only, like podcast). Lists the workspace’s published Adhara Digital Assets via the API-key endpoint /api/v1/api/assets/list (needs ADHARA_API_KEY with assets:read). Public and gated assets are listed, unlisted ones are direct-link only, private ones never show. A gated asset’s page is a lead capture form posting to /api/resources/capture-lead, which calls Adhara’s capture-lead (leads:write scope). Adhara creates the CRM lead and delivers the file by link and/or email, per the asset’s delivery method. Not in the nav yet. See src/services/resourceStore.ts |
| Courses | /courses, /courses/[slug] |
Not part of the toggle family (Adhara-only, like resources). Public view of the workspace’s published Adhara LMS courses via the no-API-key endpoints /api/v1/public/courses (ADHARA_WORKSPACE_ID only). The list shows free/gated courses; a course page renders the syllabus plus every lesson’s sanitized HTML, video, and resources on one scroll. Honors the course’s Adhara access type: a free course reads fully (lessons without public content are fetched one by one); otherwise only is_preview lessons show content and the rest show a gate. Gated (any signed-in portal customer) offers portal sign-up/sign-in, paid and members-only offer sign-in, all returning to /portal/courses/[slug] via a sanitized ?next= (safeNextPath() in portalAuth.ts, carried through onboarding). Sign-up creates a customer in the workspace’s Adhara portal; /portal/courses/[slug] then enrolls free/gated courses automatically on first visit (paid/members-only keep the Enroll/Buy step). Portal auth calls forward the visitor’s IP as X-Forwarded-For (clientIp() in portalAuth.ts) because Adhara rate-limits sign-up (5/hour) and login (10/minute) per IP, and otherwise every visitor would share the site server’s. Sign-up is bot-filtered before it reaches Adhara (src/lib/signupGuard.ts): a hidden _hp honeypot, a signed render timestamp the API requires (missing, forged, under 3 seconds or over a day old is rejected), and a random-mixed-case-name check; a caught sign-up gets a normal-looking success with no session. Lessons step one at a time with mark-complete; sequential courses unlock in order; anonymous progress is per-browser, signed-in progress is the portal’s. Courses without a cover share /img/og-course.png. Course content is kept in scripts/courses/*.json and loaded with the AdharaCourses CLI’s course-import. See src/services/courseStore.ts |
Platform
| Feature | Route(s) | Notes |
|---|---|---|
| Admin dashboard | /admin |
Live “Feature backends” panel for every toggle-family feature, editable-page shortcuts, dev/Adhara auth status |
| Customer portal | /portal/* |
See Customer Portal |
| Shop / commerce | /shop/* |
See Commerce |
| Visual editors | Inline (floating button), builder canvas (/admin/editor/build/<page>) |
See Visual Editors |
| Privacy policy | /privacy |
Hand-written starting point, not yet legally reviewed. Update it when a form, tracker, payment path or third-party service changes |
| Site analytics & privacy banner | Every public page | Adhara’s tracker (src/components/shared/PrivacyBanner.astro, public/js/privacy.js) loads only in production builds and only after a visitor accepts the banner. The choice is kept in localStorage, and the footer’s “Privacy choices” button changes it. Off on /admin, /portal and noindex pages, because the tracker reports the full URL and private links carry their password as ?key= |
Authentication
Real Adhara-backed admin login isn’t implemented yet — the JS SDK’s documented surface has
no confirmed user-auth (client.auth.login) resource for it. GRAVITY_DEV_ADMIN=1 is the
supported local admin path until that endpoint is confirmed; never set it in production.
The customer portal has its own separate GRAVITY_DEV_PORTAL=1 bypass — see
Customer Portal.
Deploy targets & storage
Vercel, Cloudflare, Google Cloud Run, and Netlify, each deploying to a real platform-native runtime (a real Vercel Function, a real Cloudflare Worker — no Docker/proxy layer) — see Deploying. Content storage is pluggable across seven backends — see Storage.