npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cnuebred/frontforge

v0.1.3

Published

![FrontForge Logo](https://imgur.com/uSCHOEJ.png)

Downloads

57

Readme

FrontForge

FrontForge Logo

npm version npm downloads

FrontForge is a minimalist TypeScript-based frontend framework that allows you to describe your entire HTML structure, styles, and logic in code - and compile it into a complete, standalone HTML file. Ideal for generating simple UI apps or static pages directly from TypeScript.

This project was created out of pure passion by a beginner developer who strongly believes in simplicity, transparency, and minimal dependencies. FrontForge is intentionally built to stay lean, with no heavy abstractions or runtime overhead — just TypeScript and the browser DOM.


✨ Features

  • 🧱 Declarative UI construction with Widget and ContainerWidget
  • 🎯 Reactive state with Pocket (based on Proxy)
  • 📦 Auto HTML/JS/CSS bundling with ForgeBundle
  • ⚙️ Easy layout utilities via Flex() and Grid()
  • 🖱️ Simple event handling with .event()
  • 📄 Markdown-style inline content support
  • 💨 Minimal dependencies, zero-runtime abstraction

📦 Installation

npm install @cnuebred/frontforge

Requires Node.js (LTS recommended) and TypeScript.


🚀 Quick Example

// >>> main.ts
import { Widget, ContainerWidget, ForgeBundle } from "@cnuebred/frontforge";

// Create UI elements
const header = new Widget("h1.title", "Welcome to FrontForge");
const button = new Widget("button", "Click me");

// React to click event
button.event("click", () => {
  header.value = "Button clicked!";
  header.render();
});

// Group in a container and attach to DOM
const container = new ContainerWidget("div");
container.add(header).add(button);
container.hook("body");
// >>> end of main.ts

import { ForgeBundle } from "@cnuebred/frontforge";

// Bundle and export as HTML
const bundle = new ForgeBundle();
await bundle.script("./main.ts");
await bundle.style("./style.scss");
bundle.head.title("My App");
bundle.build("index", "./dist");

🧰 API Overview

Widget

const w = new Widget("p.text", "Hello");
w.attribute = { id: "my-id", style: "color: red;" };
w.value = "**Bold** content";
w.event("click", () => alert("clicked"));
w.render();

ContainerWidget

const c = new ContainerWidget("div");
c.add(new Widget("span", "Child 1"));
c.add(new Widget("span", "Child 2"));
c.hook("body");

Pocket (reactive state)

import { Pocket } from "@cnuebred/frontforge";

const p = new Pocket({ count: 0 });
const state = p.target;

p.set_setter_callback(({ property, new_value }) => {
  console.log(`${property} changed to ${new_value}`);
});

state.count++; // triggers the callback

Flex / Grid Layouts

import { Flex, flex_direction_e, flex_justify_e, Widget } from "@cnuebred/frontforge";

const row = Flex([
  new Widget("div.box", "A"),
  new Widget("div.box", "B"),
], {
  direction: flex_direction_e.row,
  justify_content: flex_justify_e.space_between,
  height: 200
});

row.hook("body");

🛠️ Build & Bundle

Use ForgeBundle to compile your app to a standalone .html file with embedded styles and JS.

const bundle = new ForgeBundle();
await bundle.script("./src/app.ts");
await bundle.style("./src/styles.scss");

bundle.head.title("My Static Page");
bundle.head.meta({ name: "viewport", content: "width=device-width, initial-scale=1" });

bundle.build("index", "./dist");

🔧 Requirements

  • Node.js (v16+ recommended)
  • TypeScript
  • Works in browser environments
  • Uses: esbuild, sass, crypto, and modern ES features

🧪 Playground / Test

You can experiment with widgets like this:

const counter = new Widget("h2", () => `Count: ${state.count}`);
const button = new Widget("button", "Increment");
button.event("click", () => { state.count++ });

const layout = Flex([counter, button]);
layout.hook("body");

📈 Roadmap

  • [ ] Component abstraction
  • [ ] Data binding helpers
  • [ ] Dev server with hot reload

🙋‍♂️ Author

Made with ❤️ by Cube (@cnuebred)
Feedback, issues, or contributions are welcome!