Getting Started

Introduction

Welcome to CanxJS, the ultra-fast async-first MVC backend framework built specifically for Bun.

What is CanxJS?

CanxJS is a modern backend framework that combines the best ideas from React and Next.js with the raw performance of Bun. It provides an elegant, type-safe API for building production-ready applications at unprecedented speed.

Unlike traditional Node.js frameworks, CanxJS is built from the ground up for Bun, leveraging its native performance to achieve 250,000+ requests per second while maintaining an intuitive developer experience.

Why CanxJS?

Blazing Fast

250,000+ requests per second with Bun runtime

TypeScript Native

First-class TypeScript support with full type safety

Secure by Default

Built-in CSRF, rate limiting, and input validation

Developer Experience

Elegant APIs inspired by React and Next.js

Quick Example

Here's what a basic CanxJS application looks like:

app.ts
1import { createApp, logger, cors } from "canxjs";
2
3const app = createApp({ port: 3000 });
4
5app.use(logger());
6app.use(cors());
7
8app.get("/", (req, res) => {
9 res.json({ message: "Hello CanxJS!" });
10});
11
12app.listen();

Key Features

Ultra-fast Radix Tree routing
Async-first architecture
Built-in ORM with query builder
Native JSX server-side rendering
HotWire protocol for real-time
Native WebSocket support
Queue system (Redis/Memory)
Storage drivers (S3/Local)
Dependency Injection Container
Internationalization (i18n)

Get Started

Ready to start building? Follow our installation guide to create your first CanxJS application.