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

canxjs

v1.4.1

Published

Ultra-fast async-first MVC backend framework for Bun runtime

Readme

CanxJS


Why CanxJS?

| Feature | Express | Laravel | CanxJS | | ----------------- | ------- | ------- | ------------ | | Requests/sec | ~15,000 | ~2,000 | 250,000+ | | Memory Usage | ~80MB | ~120MB | <30MB | | Startup Time | ~500ms | ~2000ms | <50ms | | Native TypeScript | ❌ | ❌ | ✅ | | Built-in ORM | ❌ | ✅ | ✅ |

Installation

# Create new project
bunx create-canx my-app
cd my-app
bun install
bun run dev

Or add to existing project:

bun add canxjs

Quick Start

import { createApp, logger, cors } from "canxjs";

const app = createApp({ port: 3000 });

app.use(logger());
app.use(cors());

app.get("/", (req, res) => res.json({ message: "Hello CanxJS!" }));

app.get("/users/:id", async (req, res) => {
  const user = await User.find(req.params.id);
  return res.json({ data: user });
});

app.listen();

Features

🚀 Ultra-Fast Routing

Radix Tree algorithm with O(k) route matching and JIT caching.

⚡ Async-First Design

Everything is async by default. No callback hell.

🔥 HotWire Protocol

Real-time streaming without WebSocket setup.

import { hotWire } from "canxjs";

app.get("/stream", (req, res) => hotWire.createStream(req, res));

// Broadcast to all clients
hotWire.broadcastHTML("updates", "<p>New data!</p>", "#content");

🧠 Auto-Cache Layer

Intelligent automatic caching with pattern analysis.

import { autoCacheMiddleware } from "canxjs";

app.use(autoCacheMiddleware({ defaultTtl: 300 }));

🗄️ Zero-Config ORM

MySQL primary, PostgreSQL secondary support.

import { Model, initDatabase } from "canxjs";

class User extends Model {
  static tableName = "users";
}

  .where("active", "=", true)
  .orderBy("created_at", "desc")
  .limit(10)
  .get();

// Eager Loading (N+1 Solution)
const users = await User.with('posts', 'profile').get();

🔐 Built-in Authentication & Sessions

Secure session management with Database, File, or Redis drivers.

import { auth, sessionAuth, DatabaseSessionDriver } from "canxjs";

// Use Database Driver for persistence
auth.sessions.use(new DatabaseSessionDriver());

app.post("/login", async (req, res) => {
  const session = await auth.sessions.create(user.id, { role: "admin" });
  return res.cookie("session_id", session.id).json({ status: "ok" });
});

app.get("/profile", sessionAuth, (req, res) => {
  return res.json({ user: req.context.get("user") });
});

🎨 Native JSX Views

import { jsx, renderPage } from "canxjs";

app.get("/about", (req, res) => {
  return res.html(renderPage(jsx("h1", null, "About Us"), { title: "About" }));
});

🎯 Controller Decorators

import { BaseController, Controller, Get, Post } from "canxjs";

@Controller("/users")
class UserController extends BaseController {
  @Get("/")
  async index() {
    return this.json(await User.all());
  }

  @Post("/")
  async store() {
    const data = await this.body();
    return this.json(await User.create(data), 201);
  }
}

CLI Commands

CanxJS includes a powerful CLI for project management:

# Project scaffolding
bunx create-canx my-app           # Create MVC project
bunx create-canx my-api --api     # Create API-only project
bunx create-canx my-svc --micro   # Create microservice

# Development (inside project)
bunx canx serve                     # Start dev server with hot reload
bunx canx build                     # Build for production
bunx canx routes                    # List all registered routes

# Generators
bunx canx make:controller User         # Generate controller
bunx canx make:model Post --migration  # Generate model with migration
bunx canx make:middleware Auth         # Generate middleware
bunx canx make:migration create_posts  # Generate migration
bunx canx make:seeder User             # Generate seeder
bunx canx make:service Payment         # Generate service

# Database
bunx canx db:migrate                   # Run migrations
bunx canx db:rollback                  # Rollback migrations
bunx canx db:seed                      # Run seeders
bunx canx db:fresh                     # Drop all & re-migrate

Project Structure

my-app/
├── src/
│   ├── controllers/
│   ├── models/
│   ├── views/
│   ├── routes/
│   ├── middlewares/
│   ├── config/
│   └── app.ts
├── public/
├── storage/
└── package.json

Documentation

License

MIT © CanxJS Team