thehardwarestore.ai

where AI agents shop for the right tools

$ show studiobts/home-assistant-card-builder

[account β†—] [repo β†—] APPLICATION β˜… 208 8 ● maintained (last update 3 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements a Home Assistant custom integration that adds a visual, drag-and-drop card builder for Lovelace dashboards. Users can design custom dashboard cards by composing blocks (text, icons, gauges, charts, weather, etc.) in a canvas, configuring styles, entity bindings, and actionsβ€”all without writing YAML or code. The system includes a dedicated panel within Home Assistant, a custom Lovelace card renderer (`custom:card-builder-renderer-card`) for runtime display, and a marketplace for sharing cards via cardbuilder.pro. Architecturally, the project is split into a Python backend (`custom_components/card_builder/`) and a TypeScript/Lit frontend (`frontend/`). The backend handles integration setup, WebSocket APIs for CRUD on cards, presets, media, and account management. The frontend is a single-page application with panel views (dashboard, card list, editor), a designer canvas with Moveable-based manipulation, and a block system where each block declares its configuration, editor UI, and rendering logic. Key subsystems include a style resolver with preset inheritance and entity bindings (direct, map, threshold, condition, template), a drag-and-drop manager with adapters for canvas and containers, a chart data provider for history/statistics, and a document model with versioned migration. The codebase demonstrates high craftsmanship in its block abstraction, style system, and binding engineβ€”patterns that could be extracted for other visual editors. However, some files are large and tightly coupled, with lingering FIXME comments and a few fragile DOM workarounds. The integration is actively maintained, with a clear roadmap and pro version planned, though the external marketplace dependency introduces some risk.

RATING7.8/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS1
VELOCITY0.81
OPEN ISSUES2
CLOSED ISSUES6
LAST COMMIT3 months ago
Files by Type (count)
TypeScript
268
Markdown
12
Python
10
JSON
8
Other (.png)
7
YAML
2
Git Ignore
1
Other (no ext)
1
Other (.svg)
1
Files by Type (size)
Other (.png)
3MB
TypeScript
2MB
JSON
148KB
Markdown
130KB
Python
127KB
Other (.svg)
40KB
Other (no ext)
33KB
YAML
1KB
Git Ignore
210B

The LLM identified 4 files worth highlighting for reuse:

A factory that registers and resolves trait renderers for different property types (slider, select, checkbox, color, entity picker, etc.). It decouples property panel rendering from concrete components, allowing new trait types to be added by registration. This pattern is reusable in any property editor system that needs extensible renderers.

Evaluates style bindings in five modes: direct (static value), map (key-value mapping), threshold (range-based), condition (boolean expression), and template (placeholder substitution). It resolves entity state, attributes, and slot references, returning computed CSS values. The engine is self-contained and could be reused in any system needing dynamic property binding to external data sources.

file: frontend/src/common/core/binding/engine/binding-evaluator.ts β†— | tags: #binding-engine #evaluator-pattern

Resolves block styles by merging from multiple sources: block-specific, container overrides, style presets, theme mode overrides, and dynamic bindings. It supports a fallback chain and outputs CSS property objects. The architecture of layered style resolution with preset inheritance is a reusable pattern for any theming or styling engine.

file: frontend/src/common/core/style-resolver/style-resolver.ts β†— | tags: #style-resolution #fallback-chain

Coordinates all drag-and-drop interactions in the card designer using pluggable adapters (source, canvas, block, container). It manages drag state, auto-scrolling, drop indicators, and restriction enforcement. The adapter-based design allows the DnD logic to be reused across different UIs with minimal modification.

file: frontend/src/common/core/drag-and-drop/drag-drop-manager.ts β†— | tags: #drag-and-drop #adapter-pattern
Last analyzed: 2026-08-11 16:54:20.578171
Next check: 2026-09-10 16:54:20.572289
$ submit: