$ show nuejs/nue
Nue is a monorepo for a standards-first web framework ecosystem, designed as a minimalist alternative to React/Next.js. It provides a complete toolchain for building content-driven websites and single-page applications using semantic HTML, CSS, and JavaScript with minimal abstraction. The core packages include Nuekit (CLI and build system), Nuedom (UI assembly with server-side rendering via a fake DOM), Nuemark (a Markdown flavor), Nueserver (edge-first HTTP server), Nueglow (syntax highlighting), Nuestate (URL-first reactive state management), and Nueyaml (predictable YAML parser). The framework emphasizes separation of concerns, design systems, and the UNIX philosophy of small composable tools. It is built on the Bun runtime and targets developers frustrated with heavy JavaScript frameworks, offering instant startup, universal hot reload, and a 1MB global install size. The repository also includes production templates (blog, SPA, full-stack) and the official Nue website (nuejs.org) with documentation, blog, and interactive examples.
The LLM identified 5 files worth highlighting for reuse:
Implements a minimal fake DOM for server-side rendering of Nue components. It provides essential DOM APIs (createElement, setAttribute, etc.) without a browser, enabling offline generation of HTML. This pattern is reusable for any SSR system that needs a lightweight DOM shim.
A language-agnostic syntax highlighter that tokenizes code into spans with CSS classes. It is self-contained, has no external dependencies, and can be extracted for use in any project requiring code highlighting. The CSS files (light.css, syntax.css, markers.css) provide theming.
An edge-first HTTP server with a clean routing API (get, post, use) that works identically locally and on Cloudflare Workers. It uses standard Request/Response objects and supports middleware, static file serving, and JSON responses. The pattern is reusable for building lightweight API servers.
A URL-first reactive state management library that synchronizes state with the browser's URL (path, query, hash). It supports memory, session, and local storage backends, and provides event-driven updates. The pattern is reusable for any client-side application needing simple state and routing.
A predictable YAML parser that produces consistent output without surprises. It is a single-file, dependency-free module that can be extracted for use in any JavaScript project requiring YAML parsing. The test file (nueyaml.test.js) demonstrates its behavior.