GitHub v1.3.1
From first line of HTML to full-stack ecosystem

Grow your app. Don't rewrite it.

The server-rendered Web Component framework that scales with you. Start with basic HTML, add CSS, sprinkle in JS, and build complex, solid systems without ever learning a new framework syntax. And if the contract breaks, the build fails before broken code ships.

npm create coralite@latest
Watercolor coral reef
+ signal()
relay-error
+ custom-element
Evolutionary progression

The Progression Path

Learn the platform. Build the ecosystem.

01 HTML

The Document

Semantic structure and natively accessible forms. Pure structural baseline without wrapper fatigue.

02 CSS

The Style

Native encapsulation via @layer & CSS scoping. Predictable cascades with zero runtime overhead.

03 JS

The Behavior

Standard DOM event lifecycle, reactive signals, and explicit bindings that clean themselves up.

04 Coralite

The Ecosystem

Server-rendered components, zero client leaks, transparent data contracts, and fluid interoperability.

Verifiable architecture

No Magic. Just the Platform.

See exactly how your authored component becomes a compiled, server-rendered Web Component.

src/components/site-counter.html Authored
Code copied!
<template id="site-counter">
  <button ref="count-button" type="button" class="btn">
    Count is {{ count }}
  </button>
</template>

<script type="module">
  export const attributes = {
    step: { type: Number, default: 1 }
  }

  export function server () {
    return { count: 0 }
  }

  export async function client ({ state, signal, refs, emit }) {
    refs('count-button').addEventListener('click', () => {
      state.count += state.step
      emit('count-change', { count: state.count })
    }, { signal })
  }
</script>
dist/index.html Compiled at build time
Code copied!
<site-counter step="1" data-cid="site-counter-0" data-coralite-initial>
  <button ref="site-counter-0__count-button" type="button" class="btn" ...>
    Count is <c-token>0</c-token>
  </button>
</site-counter>

Build artifact — you never author this markup. ... marks compiler-emitted hydration bindings; hydration state ships in a module script.

src/pages/index.html Used on a page
Code copied!
<site-counter step="1"></site-counter>

That is the whole usage surface: the tag name plus optional attributes. No imports, no registration, no wrapper element.

Fail-closed by design

The build is the first test.

Invalid templates, broken component contracts, and server code that leaks into the client stop the build — with an exact location and a suggested fix.

  • Fail closed. The build aborts with a non-zero exit. No runtime-only surprises.
  • Exact, not approximate. Code, file:line, source context, why it failed, and a one-shot fix where possible.
  • Machine-readable. Stable codes and JSON output for CI, scripts, and AI harnesses.

Built for agents. Deterministic errors let an agent repair in one pass instead of reverse-engineering a runtime stack trace.

  • 49 coded diagnostics
  • 4 families
  • non-zero exit
  • JSON output
  • 1-shot fixes
See the guardrails →
coralite build exit 1
$ coralite build

┌─ [CORALITE-E201] Inline expression '{{ user.name }}' in template must be lifted to a derived getter.
│ File: src/pages/index.html:42:18
├─ Code Context
│ > 42 |   <span>{{ user.name }}</span>
├─ Why this failed
│ Templates accept flat identifiers only. Dot notation is evaluated at
│ runtime, so it cannot be resolved deterministically at build time.
├─ Suggested 1-Shot Fix
│ displayName: ({ state }) => state.user.name
│   <span>{{ displayName }}</span>

✖ 1 error · build aborted (exit code 1)
Framework opinions

Architectural Decisions

Coralite intentionally leaves out unnecessary abstractions, aligning directly with native browser mechanisms.

Explicit Boundaries

No class extends HTMLElement. Define behavior with standard top-level export function server() and export const attributes.

Clean Separation

Strict flat identifiers in HTML ({{ token }}). Logic is lifted to getters. No inline handlers or complex expressions.

Native Foundation

No Shadow DOM. Encapsulation is handled via CSS Scoping and @layer. Preserves native form association and accessible DOM structures.

Guided curriculum

The Ecosystem is for Everyone.

Read our step-by-step lessons. Start with a basic HTML page and build a Netflix-shaped app in one paradigm.

Explore the Lessons
Coral decoration