features

Open Energy — Deep Feature Reference

Open Energy is the largest single feature initiative in HiveJournal. This doc is the technical reference for everything that lives under /open-energy/*. For the original phased plan and design rationale, see docs/OPEN_ENERGY_ROADMAP.md. All 10 phases are shipped.

⚠️ 2026-07 corpus re-evaluation. After the patent corpus was enriched (full claims, CPC/IPC, LLM mechanism summaries), a model-read re-analysis found the original "meta-pattern" (non-linear + resonance + pulsed) was largely a keyword artifact — present in only 13 of 766 patents. The real anomalous signal is independent-inventor convergence on a few mechanism templates. See vendor/energy-patent-research/patterns/11_semantic_synthesis.md and 12_revised_experiment_priorities.md (6 new falsification-first experiments). Both the /open-energy landing page and the /open-energy/experiments constellation have been corrected: the constellation now groups experiments by 6 convergence clusters (5 anomalous + Foundations) instead of the 9 keyword patterns, the meta-line toggle is gone, and the reveal ("Convergence Unlocked") now fires when one experiment in each of the 5 anomalous clusters is completed. See CLUSTER_META / EXPERIMENT_CLUSTER in experiments/page.tsx.

What it is

A participatory science platform built on top of HiveJournal. Users can:

  1. Browse 768 cataloged energy patents (the Patents notebook)
  2. Browse actionable experiments derived from the pattern analyses (the Experiments notebook) — 29 original + 6 revised-priority (patterns/12, pending notebook re-sync)
  3. Track their own progress through the experiments as a "constellation pathway"
  4. Publish build logs of their attempts
  5. Submit replication confirmations (or refutations) toward a 50-confirmation gold standard
  6. Earn achievement badges
  7. Watch the live activity feed of community participation
  8. See the convergence-cluster legend (the mechanisms unrelated inventors reach independently)
  9. Trigger the convergence reveal once they've completed one experiment in each of the 5 anomalous clusters
  10. View the leaderboard of top contributors

URL map

RoutePurposeFile
/open-energyPublic landingpage.tsx
/open-energy/experimentsConstellation pathway (the main UI)experiments/page.tsx
/open-energy/contributorsLeaderboardcontributors/page.tsx
/dashboard/admin/open-energySuper-admin seed/wipe toolsadmin/open-energy/page.tsx
/api/og/open-energyOG card for landingog/open-energy/route.tsx
/api/og/open-energy/experimentsOG card for constellationsog/open-energy/experiments/route.tsx
/api/og/open-energy/contributorsOG card for leaderboardog/open-energy/contributors/route.tsx

Backend endpoints

All under /api/open-energy/. Source: apps/backend/src/routes/open-energy.ts

Public

EndpointWhat it returns
GET /builds-notebookUUID of the public builds notebook so the frontend can fetch entries
GET /replications?real=...Aggregate confirm/refute counts per experiment
GET /contributors?limit=N&includeSeeds=...Ranked leaderboard with score breakdown
GET /activity?limit=N&includeSeeds=...Unified feed of recent completions, replications, and builds
GET /stats?real=...Aggregate progress counts per experiment

Authenticated

EndpointWhat it does
GET /progressCurrent user's experiment progress
PUT /progress/:experimentIdUpsert one experiment's status
POST /progress/migrateBulk-migrate localStorage progress on first sign-in
POST /buildsPublish a new build entry for an experiment
GET /my-replicationsCurrent user's replication submissions
POST /replicationsSubmit/update a replication (confirm or refute)
DELETE /replications/:experimentIdRemove user's replication

Super-admin only

EndpointWhat it does
GET /admin/seed/statsProgress seed counts
POST /admin/seed/generateGenerate seed progress (synthetic personas)
DELETE /admin/seedWipe progress seed records
GET /admin/seed/builds/statsBuild seed counts
POST /admin/seed/buildsGenerate seed build entries
DELETE /admin/seed/buildsWipe seed builds (deletes journal entries tagged SeedBuild)
GET /admin/seed/replications/statsReplication seed counts
POST /admin/seed/replicationsGenerate seed replications
DELETE /admin/seed/replicationsWipe replication seed records

Database tables

journal_entries (existing table, used as content store)

Two notebooks of journal entries house all the content:

  • Patents notebook — 768 entries imported from vendor/energy-patent-research/data/patents.db (pinned submodule → https://github.com/jurowski/energy-patent-research). Each entry tagged ["Patent", category].
  • Experiments notebook — 29 entries parsed from vendor/energy-patent-research/patterns/*.md. Each entry tagged ["Experiment", pattern_slug, ...referenced_patent_numbers].
  • Open Energy Builds notebook — created on first build seed/publish. Build entries tagged ["Build", experiment_id, pattern_slug, outcome]. Seed builds add "SeedBuild" to the tag list for safe wiping.

Notebook IDs are stored in env vars:

  • NEXT_PUBLIC_PATENTS_NOTEBOOK_ID
  • NEXT_PUBLIC_EXPERIMENTS_NOTEBOOK_ID

The builds notebook is found dynamically by name ("Open Energy Builds").

open_energy_progress (migration 046)

Per-user experiment status. One row per (user, experiment).

id, user_id, experiment_id, status (available|in_progress|completed),
notes, is_seed, started_at, completed_at, created_at, updated_at
UNIQUE (user_id, experiment_id)

open_energy_replications (migration 047)

Per-user replication confirmations.

id, user_id, experiment_id, build_id (optional FK to journal_entries),
status (confirmed|refuted), notes, is_seed, created_at, updated_at

App-level uniqueness: one real (non-seed) replication per (user, experiment).

Aggregate views

  • open_energy_experiment_stats — completed/in-progress counts per experiment
  • open_energy_replication_stats — confirmed/refuted counts per experiment, with real-vs-seed breakdown

Both views are granted SELECT to anon and authenticated.

How the constellation page composes data

apps/frontend/src/app/open-energy/experiments/page.tsx is the main user-facing UI. On mount it:

  1. Loads localStorage progress immediately for instant feedback
  2. Checks Supabase auth — if signed in, fetches /api/open-energy/progress and overlays
  3. First-time auth migration — if localStorage has progress but the migrated flag is unset, POSTs /api/open-energy/progress/migrate once
  4. Fetches experiments/api/notebooks/{EXPERIMENTS_NOTEBOOK_ID}/public?limit=100
  5. Fetches builds — looks up the builds notebook ID via /api/open-energy/builds-notebook, then fetches all entries from that notebook
  6. Fetches replication stats/api/open-energy/replications
  7. Fetches user's own replications when authenticated
  8. Polls activity feed every 20 seconds — /api/open-energy/activity
  9. Computes earned badges from in-memory state via badges.ts

Visual layers

The page is rendered as a stack of independent visual layers:

  1. Animated starfield — 80 background stars with twinkle animation
  2. Hero — title, description, progress bar, sync indicator, optional synthesis badge, share button, optional community-builds counter
  3. Convergence-cluster legend — the 5 anomalous cluster pills with their per-cluster completion counts
  4. Badges strip — 9 achievement tiles, grayscale until earned then glowing in their color
  5. Constellations grid — 6 panels (one per convergence cluster), each with 2-9 stars positioned in a constellation shape
  6. SVG meta-lines overlay — drawn on top of the constellations grid when the toggle is on, lines between centroid coordinates of each pattern panel
  7. Activity feed right rail — fixed-position collapsible panel showing recent events
  8. Newly-earned badge toasts — slide in from top-right when a new badge is unlocked
  9. Convergence reveal overlay — fullscreen animation that fires once when all 5 anomalous clusters are touched
  10. Synthesis modal — celebration content shown after the overlay finishes
  11. Experiment detail modal — bottom-sheet on mobile, centered on desktop, with status buttons / replication actions / builds feed / publish form

Stars: visual states

Each star (an experiment) has multiple overlaid visual elements:

  • Star core — small dot whose size and color change with status
  • Star glow — soft halo that fades in when in-progress or completed
  • Star label — title text that shows on hover (always visible on mobile)
  • Build count badge — cyan number top-right when builds exist for that experiment
  • Replication halo — outer ring that scales in opacity with confirmed_count / 50

Status colors (set via --star-color CSS var which inherits from the pattern):

  • Available — neutral white
  • In progress — colored, pulsing
  • Completed — colored, brighter, larger

The convergence-cluster mapping

Per the 2026-07 re-evaluation, experiments are grouped by convergence cluster — the mechanism templates unrelated inventors independently converge on — not the original keyword patterns. Defined in page.tsx (CLUSTER_META, SLUG_TO_CLUSTER, EXPERIMENT_CLUSTER) and mirrored in badges.ts:

const CLUSTER_META = {
  casimir_ambient:    { name: 'Casimir / Ambient-EM', ... },
  resonant_water:     { name: 'Resonant Water Dissociation', ... },
  backemf_recovery:   { name: 'Back-EMF Recovery', ... },
  metal_hydride_lenr: { name: 'Metal-Hydride LENR', ... },
  collisional_plasma: { name: 'Collisional Plasma', ... },
  foundations:        { name: 'Foundations', ... },  // component characterization
}

Each of the 35 experiments maps to one cluster: EXPERIMENT_CLUSTER[title] (exact-title override — used for the 6 priority experiments that share one slug, plus a few original reassignments) falls back to SLUG_TO_CLUSTER[origSlug]. The 5 non-foundations clusters are the "anomalous" clusters that gate the reveal.

Convergence reveal logic

In page.tsx:

const synthesisAchieved = useMemo(() => {
  return ANOMALOUS_CLUSTERS.every((cluster) =>
    experiments.some((e) => e.patternSlug === cluster && progress[e.id] === 'completed')
  )
}, [experiments, progress])

When synthesisAchieved flips to true and synthesisRevealed is false:

  1. Set synthesisAnimating = true → renders fullscreen overlay
  2. Trigger long celebratory haptic
  3. After 3.2s timeout, open the modal
  4. Set synthesisRevealed = true and persist to localStorage

To re-trigger for testing: visit /open-energy/experiments?resetSynthesis=1 (clears the localStorage flag) or use the "Reset & Open Constellations" button in the admin panel.

Badges (Phase 4)

Defined in badges.ts. All 9 are derived from in-memory state — no persistence beyond which ones the user has been notified about.

BadgeCriteria
First LightMark any experiment in_progress or completed
First StarComplete one experiment
ConstellationComplete every star in any one pattern
ConvergenceComplete one experiment in each of the 5 anomalous clusters
CartographerComplete one experiment from every constellation
Sky WalkerComplete every experiment in the pathway
ReplicatorSubmit any replication
LightkeeperConfirm an experiment that has reached 50 total confirmations
BuilderPublish a build (currently inert — needs publish-tracking wired up)

Newly-earned badges trigger a toast that auto-dismisses after 6 seconds. Seen badges are tracked in localStorage (open-energy-seen-badges) so toasts only fire once.

Activity feed (Phase 5)

Polls /api/open-energy/activity every 20 seconds. The endpoint:

  1. Pulls recent completions from open_energy_progress
  2. Pulls recent replications from open_energy_replications
  3. Pulls recent builds from the builds notebook (filtered by Build tag)
  4. Joins experiment titles + display names from profiles
  5. Returns a unified sorted list

Right-rail UI is collapsible and drops to bottom on mobile.

Leaderboard scoring (Phase 8)

totalScore = completed * 3 + replications * 2 + builds * 1

Defined in open-energy.ts inside the /contributors handler. Aggregates per-user counts from all three sources, joins display names, sorts descending. Top 3 are rendered as podium cards (1st is taller and amber, 2nd purple, 3rd cyan); rest as a flat list.

Seed data conventions

All three seed sources use the same pattern: synthetic records flagged so they can be distinguished from real user activity and cleanly wiped.

SourceFlagWipe condition
Progressis_seed = TRUE columnDELETE WHERE is_seed = TRUE
Replicationsis_seed = TRUE columnDELETE WHERE is_seed = TRUE
BuildsSeedBuild tag in tags[]DELETE WHERE tags @> '["SeedBuild"]'

The admin panel (dashboard/admin/open-energy) exposes generate/wipe/stats for all three.

CLI alternative (preserves the script for environments without the admin UI):

cd hivejournal-2026
npx tsx scripts/seed-open-energy-progress.ts --generate --users 50
npx tsx scripts/seed-open-energy-progress.ts --stats
npx tsx scripts/seed-open-energy-progress.ts --wipe

Mobile / PWA (Phase 10)

  • PWA manifest at /open-energy/manifest.ts — installable as standalone app, scoped to /open-energy/, opens to /open-energy/experiments
  • Bottom-sheet modals on screens ≤640px — both the experiment modal and the synthesis modal slide up from bottom with a drag handle
  • Larger touch targets — star tap area grows from 32x32 to 44x44 (Apple HIG minimum)
  • Always-visible labels on mobile (no hover state)
  • Haptic feedback via navigator.vibrate() on key actions: status changes, replication submit, badge unlock, synthesis reveal
  • iOS safe-area insets — modal padding respects the home indicator

Setup checklist

When deploying to a fresh environment:

  1. Apply migrations 046 and 047 in Supabase Dashboard SQL Editor
  2. Set frontend env vars on Vercel:
    • NEXT_PUBLIC_PATENTS_NOTEBOOK_ID
    • NEXT_PUBLIC_EXPERIMENTS_NOTEBOOK_ID
  3. Import patent + experiment data by running scripts/import-energy-patents.ts (one-time, populates the two notebooks)
  4. Redeploy backend so the /api/open-energy/* routes are live
  5. (Optional) Generate seed data from /dashboard/admin/open-energy to populate the experience for testing

Known limitations

  • Builder badge is inert until we track the user's own published builds in component state (currently the badges check is myBuildsByExperiment which is left empty)
  • Build content validation is minimal (200/20000 char caps, status enum) — no markdown sanitization
  • Activity feed polling is plain setInterval — no Supabase realtime subscriptions yet
  • Drag-to-dismiss on mobile bottom-sheets is decorative (visual handle only)
  • No image uploads in the publish-build form yet — text only

See also: Computational companion + optimizer

The Open Energy experiments now have a full software layer that didn't exist when this doc was written:

  • 6 experiment calculators (resonance, coil, impedance, electrolysis, pulsed DC, plasma) compute expected outcomes from first principles before anyone builds anything physical. Public, no auth required — accessible from every research-grade template page.
  • Structured measurements (migration 078) let users record predicted vs measured values with real-time delta badges and clipboard-copyable comparisons.
  • Parameter optimizer sweeps up to 50K parameter combinations per experiment, ranks by the default objective function, and lets admins set a "golden spec" — the system's recommendation for the best build configuration.
  • "Confirm this prediction" invitations surface the golden spec on the template page with a convergence bar toward 50 independent confirmations. Anomaly detection (>2σ from mean) flags results that diverge from the prediction — which is where the 768-patent meta-pattern claims live.

All of this is documented in detail in docs/ai/INDEX.md → "Experiment Calculators" section and in the DreamPro Citizen Science deep dive.

Reference docs (other locations)

  • docs/OPEN_ENERGY_ROADMAP.md — original phased plan with rationale (all phases now shipped)
  • The energy-patent-research repo is pinned as a git submodule at vendor/energy-patent-research/ (remote: https://github.com/jurowski/energy-patent-research). It contains the source data (data/patents.db, 768 patents), pattern analyses (patterns/*.md), and the Python fetch/analyze scripts. Fresh clones of hivejournal-2026 need git clone --recurse-submodules (or git submodule update --init --recursive after a plain clone) before scripts/import-energy-patents.ts will find its inputs.
Open Energy — Docs | HiveJournal