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

@allyinthecode/fastnode

v2.0.0

Published

FastAPI-inspired Express framework with automatic OpenAPI/Swagger docs and Zod validation

Readme

🚀 FastNode

FastNode is a lightweight, developer-first Node.js framework that brings a FastAPI-like developer experience to the Node.js ecosystem. It enhances Express with automatic validation, OpenAPI documentation, and TypeScript-powered type safety using Zod.

🌟 Why FastNode?

Building APIs in Express often requires repetitive manual work:

  • ❌ Manual request validation
  • ❌ Manual API documentation (Swagger)
  • ❌ No built-in type safety
  • ❌ Boilerplate-heavy route setup

FastNode solves this by unifying everything into a single source of truth: your schema.

⚡ Key Features

  • 🛡️ Zod-powered validation: Validate request body, query, and params automatically.
  • 📄 Automatic OpenAPI generation: No manual Swagger/YAML files needed.
  • 📊 Built-in Swagger UI: Explore and test your API instantly at /docs.
  • 💎 TypeScript-first experience: Fully inferred types from schemas.
  • 🚀 Express-compatible: Built on top of Express with zero complexity loss.

📦 Installation

npm install @allyinthecode/fastnode zod express swagger-ui-express

🚀 Quick Start

import { createApp, z } from "@allyinthecode/fastnode";

const app = createApp({
  title: "My API",
  version: "1.0.0"
});

// Define schema once
const UserSchema = z.object({
  username: z.string().min(3),
  email: z.string().email()
});

// Create route with automatic validation + docs
app.post(
  "/users",
  {
    summary: "Create a new user",
    body: UserSchema,
    tags: ["Users"]
  },
  (req, res) => {
    // req.body is fully typed!
    const { username, email } = req.body;

    res.status(201).json({
      message: "User created successfully",
      data: { username, email }
    });
  }
);

// Swagger UI
app.docs();

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
  console.log("Docs available at http://localhost:3000/docs");
});

🧠 Core Concept

FastNode is built on one principle: Define once. Validate everywhere. Document automatically.

You define your schema using Zod, and FastNode handles:

  1. Request validation
  2. Type inference
  3. OpenAPI schema generation
  4. Swagger documentation

🔧 Example

const ProductSchema = z.object({
  name: z.string(),
  price: z.number(),
  inStock: z.boolean()
});

app.post("/products", {
  body: ProductSchema,
  summary: "Create product"
}, (req, res) => {
  res.json({ ok: true });
});

📊 What FastNode Generates Automatically

  • OpenAPI 3.0 specification
  • Swagger UI interface (/docs)
  • Request validation middleware
  • Typed request objects

🧩 Philosophy

FastNode is not trying to replace Express. It is designed to be a minimal abstraction layer that upgrades Express into a modern API framework without increasing complexity.

📄 Tech Stack

  • Node.js
  • Express.js
  • Zod
  • TypeScript
  • Swagger UI

📌 Roadmap

  • [ ] Middleware system
  • [ ] Decorator-based API (@Get, @Post)
  • [ ] Response schema validation
  • [ ] Plugin system
  • [ ] CLI tool (fastnode create)

📄 License

MIT © 2026