Skip to content

refactor: extract Live Components to standalone monorepo#72

Closed
MarcosBrendonDePaula wants to merge 7 commits intomainfrom
refactor/extract-live-to-monorepo
Closed

refactor: extract Live Components to standalone monorepo#72
MarcosBrendonDePaula wants to merge 7 commits intomainfrom
refactor/extract-live-to-monorepo

Conversation

@MarcosBrendonDePaula
Copy link
Copy Markdown
Collaborator

Summary

  • Extracted Live Components system to standalone monorepo at FluxStackCore/fluxstack-live
  • Removed internal implementations from core/server/live/ and core/client/ (14,839 lines removed)
  • Updated all imports across app/ and plugins/ to use @fluxstack/live packages

Motivation

Decouples the real-time system from the framework so it can be used independently with Express, Fastify, or any backend — not just FluxStack/Elysia.

New packages (in fluxstack-live repo)

  • @fluxstack/live — Core: LiveComponent, Room System, WS protocol
  • @fluxstack/live-client — Browser/Node client with IIFE bundle
  • @fluxstack/live-express — Express middleware + factory
  • @fluxstack/live-elysia — Elysia plugin adapter
  • @fluxstack/live-react — React hooks (useLiveComponent, etc.)

Test plan

  • Verify FluxStack builds without errors after extraction
  • Verify Live Components work via @fluxstack/live import
  • Run existing tests to confirm no regressions

🤖 Generated with Claude Code

MarcosBrendonDePaula and others added 7 commits March 1, 2026 14:58
Live Components system moved to FluxStackCore/fluxstack-live as
independent packages (@fluxstack/live, @fluxstack/live-client,
@fluxstack/live-express, @fluxstack/live-elysia, @fluxstack/live-react).

Core FluxStack now imports from @fluxstack/live instead of bundling
the live components internally. This decouples the real-time system
from the framework, allowing it to be used with any backend.

Removed from core/:
- server/live/ internal implementations (ComponentRegistry, RoomManager, etc.)
- client/ hooks and components (useLiveComponent, Live, etc.)
- build/vite-plugin-live-strip
- server/live/__tests__/

Updated imports across app/ and plugins/ to use @fluxstack/live.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace vi.mock('@core/server/live/...') with setLiveComponentContext() DI
pattern from @fluxstack/live. Fix EMIT_OVERRIDE_KEY to use Symbol.for()
since the symbol wasn't exported from the npm package runtime. Update
FileUploadManager import path. All 531 tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The @fluxstack/live-* aliases in vite.config.ts pointed to the sibling
fluxstack-live monorepo source, which only exists in local development.
In CI, the sibling repo doesn't exist, causing the Vite build to fail
silently. Now the aliases are only applied when the local monorepo is
detected; otherwise Vite resolves from node_modules (published npm
packages).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
… bug

- Update @fluxstack/live-* dependencies from ^0.1.0 to ^0.2.0
- Fix create-fluxstack project name using full path instead of basename
- Bump version to 1.15.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Integrates the new @fluxstack/live typed room system into the FluxStack
demo application with working examples and updated documentation.

## New Demos
- PingPong: Real-time latency measurement with binary msgpack room events,
  auto-ping mode, RTT stats (AVG/MIN/MAX), and visual ping log
- SharedCounter: Singleton counter using typed LiveRoom with
  CounterRoom for cross-client state sync

## Typed Room Definitions
- ChatRoom: Typed room for chat messages with user join/leave events
- CounterRoom: Typed room for shared counter with increment tracking
- DirectoryRoom: Room directory with metadata and member counts
- PingRoom: Ping/pong room for latency measurement demos

## Removed Legacy Demos
- Removed ChatDemo (replaced by RoomChatDemo with typed rooms)
- Removed TodoListDemo (replaced by more relevant demos)
- Removed LiveChat/LiveTodoList server components

## Infrastructure
- Updated websocket-plugin to support LiveRoom binary frame routing
- Updated live-components-generator for room class discovery
- Added Vite aliases for @fluxstack/live source resolution
- Updated LLMD docs: live-rooms.md rewritten for typed rooms,
  added live-binary-delta.md for binary codec documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed the LiveDebugger floating widget (1325 lines), full-screen
panel (780 lines), and all related exports. The debug system was
unused and removed from the upstream library.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant