frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Domphy – plain-object UI for tool apps, AI-correctable output

6•khanhhuunguyen•2d ago
I built a UI framework named Domphy because I could not learn React although I tried many times. I mean I could not understand React code which is hidden behind multiple layers, especially when some of them use React ecosystem libs. Maybe I am an architect turned developer, so I had no foundation of programming, or I expected something clear and clean.

I just think that UI should be simple — HTML and JS are enough and just need some way to make it stateful instead of making it more complicated. My idea: just using JS objects to reflect HTML, and using functions for state. When I need to reuse a component I had one more concept — just make a partial (I call it a Patch) to add props to the main object (but native props still win). With a component-based approach you get deep nesting and exploding props, but with patches you don't. The example below:

  import { ElementNode, toState } from "@domphy/core";
  import { tooltip } from "@domphy/ui";

  const count = toState(0);

  const App = {
    div: [
      { h3: (listener) => `Count: ${count.get(listener)}` },
      {
        button: "Increment",
        onClick: () => count.set(count.get() + 1),
        $: [tooltip({ content: "Add one to the count" })],
      },
    ],
    style: { display: "flex", gap: "8px", alignItems: "center" },
  };

  const root = new ElementNode(App);
  root.render(document.getElementById("app")!);
Right now I am the only one using Domphy, for around a year, for creating SketchUp and Revit plugins in the AEC (Architecture, Engineering, Construction) industry. I created Domphy before AI code generation took off, to make code humans can read and understand clearly, but now AI can build UIs with React well, so sometimes I feel my work is meaningless. But I still use Domphy for my apps, because I feel more confident when I need to read and edit UI code when the AI gets stuck.

Comments

Natfan•2h ago
so preact sans jsx?
khanhhuunguyen•1h ago
Preact changes the syntax, Domphy changes the model: no virtual DOM, listener reactivity, native patch instead of component. It also comes with a constraint-based design system — every size and color value is derived from a formula, not magic numbers.

Show HN: TownSquare, a tiny presence layer for websites

https://townsquare.cauenapier.com/
76•cauenapier•14h ago•25 comments

Show HN: Make PDFs look scanned (CLI or in the browser via WASM)

https://github.com/overflowy/make-look-scanned
95•overflowy•8h ago•47 comments

Show HN: StartupWiki – A Free Alternative to Crunchbase

https://startupwiki.tech/
162•shpran•10h ago•55 comments

Show HN: We post-trained a model that pen tests instead of refusing

https://www.argusred.com/cli
76•dk189•12h ago•35 comments

Show HN: My Windows XP portfolio with working Game Boy and iPod

https://mitchivin.com/
54•mitchivin•7h ago•26 comments

Show HN: Tiny – An interpeted dynamic langauge with inline Go native functions

https://github.com/confh/Tiny
35•confis•7h ago•5 comments

Show HN: Microcrad – Micrograd Reimplemented in C

https://github.com/oraziorillo/microcrad
64•oraziorillo•3d ago•21 comments

Show HN: Ember, a native iOS Hacker News reader I built around accessibility

https://github.com/DatanoiseTV/ember-hackernews
89•sylwester•9h ago•21 comments

Show HN: Rocannon – Any Ansible module to MCP Tool, record sessions as playbooks

https://github.com/msradam/rocannon
2•msradam•1h ago•0 comments

Show HN: Agentic coding workflows built on Git worktrees and task evidence

https://github.com/alex-reysa/glueRun-go
5•alexreysa•2h ago•0 comments

Show HN: Domphy – plain-object UI for tool apps, AI-correctable output

6•khanhhuunguyen•2d ago•2 comments

Show HN: Codeflowmap – map a codebase's read/write/auth data flows

https://github.com/man-consult/code-mapper
3•brian-m•2h ago•0 comments

Show HN: FERNme – agent memory that updates with ~zero LLM calls

https://github.com/mirkofr/FERNme
3•mirkofr•3h ago•0 comments

Show HN: HN Game Stories – mini-documentary of games that hit the front page

https://video.intellios.ai
2•coolwulf•3h ago•0 comments

Show HN: Vitrus – the company brain that tells you what it doesn't know

https://github.com/ahmetvural79/Vitrus
3•ahvural•3h ago•0 comments

Show HN: TLA+ Process Studio

https://tlaplus-process-studio.com/?example=meeting-lifecycle
6•uptodatenews•3h ago•0 comments

Show HN: Criterion Closet as a website – pull any of 1,247 films off the shelf

https://the-criterion-closet.vercel.app
20•olievans•13h ago•7 comments

Show HN: Onsight: pay a local to photograph any spot in San Francisco, on demand

https://onsight.photo/san-francisco
7•pro_methe5•4h ago•2 comments

Show HN: Notedog – Git-friendly portable Markdown journal, edit from a laptop

https://notedog.run/
4•hibariya•4h ago•0 comments

Show HN: Talos – Open-source WASM interpreter for Lean

https://github.com/cajal-technologies/talos
100•mfornet•2d ago•27 comments

Show HN: GitGauge – A Way to Try Tell If a Repo Is Authentic

https://github.com/Davey2Waveyy/gitgauge
4•davey2wavey•4h ago•1 comments

Show HN: Metiq: a real time 3D globe for 100 public datasets

https://metiq.space
143•rakeda•4d ago•42 comments

Show HN: LoopFlow – loop engineering for Claude Code

https://github.com/faisalishfaq2005/loopflow
3•faisalishfaq•5h ago•1 comments

Show HN: Gerrymandle - Daily puzzle game where you redraw electoral districts

https://gerrymandle.cc/
226•realmofthemad•2d ago•77 comments

Show HN: MiniPCs.zip (charting the pareto frontier of MiniPCs)

https://minipcs.zip
3•yathern•6h ago•0 comments

Show HN: Persona.js – a vanilla-JS agent UI library with native WebMCP (MIT)

https://www.persona-chat.dev/
10•becomevocal•7h ago•12 comments

Show HN: An ASCII 3D Rendering Engine

https://glyphcss.com
9•apresmoi•7h ago•5 comments

Show HN: An n8n alternative where coding agents build the workflows, not humans

https://velane.sh/
4•abhishekraj272•7h ago•0 comments

Show HN: Cody – Voice control for Neovim using its own commands, LSP

https://github.com/juancgarza/cody
3•jcgr•8h ago•0 comments

Show HN: Are You in the Weights?

https://www.intheweights.com/
458•turtlesoup•2d ago•242 comments