jetpath
v1.12.1
Published
A performance-first cross-runtime API framework without the boilerplate
Downloads
492
Maintainers
Readme
In this new v1.11.1 we ran a 217 (passing) tests for performance, reliability and security.
Why Engineers Choose Jetpath
Every framework promises to be fast and simple but they are not.
// This is a complete API endpoint in Jetpath
export const GET_users_$id: JetRoute = async function (ctx) {
const { id } = ctx.params;
const user = await db.users.findUnique({ where: { id } });
return ctx.send(user);
};Jetpath eliminates the cognitive overhead that slows down development in many ways, you only write functions that map directly to HTTP endpoints through a clean, predictable naming convention.
The tech stack you already trust, but faster:
- Write APIs in TypeScript/JavaScript across Node.js, Deno, or Bun
- ~25% less code than Express with stronger type safety
- Benchmarks show massive throughput compared to Elysia.js *(bunJS fastest Framework).
Core Design Principles
Jetpath is built with strong opinions on what matters to you:
- Zero config by default
- Runtime agnostic - True support for Node.js, Deno, and Bun, AWS Lambda and cloudflare workers.
- Type safety
- Predictable routing - Routes derived from function names *(GET_users_$id → GET /users/:id)
- Built for production
- Faster iteraction
Quick Start
# Create new project
npx jetpath new-project
# Navigate and start the dev server
cd new-project
npm install
npm run devAPI Design That makes everything simple and concise
import { type JetRoute, Jetpath, use } from "jetpath";
const app = new Jetpath();
app.listen(3000);
// GET /products
export const GET_products: JetRoute = async (ctx) => {
const products = await db.products.findMany();
ctx.send({ products });
};
// POST /products with validation
export const POST_products: JetRoute = async (ctx) => {
const data = await ctx.parse();
const product = await db.products.create({ data });
ctx.send({ product }, 201);
};
// Add validation and docs in one step
use(POST_products)
.title("Create a new product")
.body((t) => ({
name: t.string().required().min(3),
price: t.number().required().min(0),
description: t.string()
}));
// Maps to ws://your-host/live instantly
export const GET_live: JetRoute = (ctx) => {
ctx.upgrade();
const conn = ctx.connection!;
conn.addEventListener("open", (socket) => { /* ... */ });
conn.addEventListener("message", (socket, event) => { /* ... */ });
};Real Performance
It's not just a claim how fast - measure it. In the benchmark suite, Jetpath consistently perform close to raw Bunjs performance and matches elysia.js on common API workloads:
| Framework | Requests/sec | Latency (avg) |-----------|-------------|---------------| | Bun | ~40,890 | 12.2ms | | Elysia | ~33,383 | 13.2ms | | Jetpath | ~32,339 | 13.7ms |
12-core CPU, 32gb Ram, 1000 concurrent connections and 1,000,000 requests, simple JSON response
Bunjs being amongst the fastest http runtime.
Installation
For existing projects:
npm install jetpath --saveCommunity & Support
- Documentation - In-depth guides and API reference
- Discord Community - Get help from the team and other users
- GitHub Issues - Report bugs or request features
License
Apache 2.0 - Open source and built for the community.
Contributing
We welcome contributions! See our contributing guide for details on how to get involved.
By contributing, you agree to license your code under the Apache 2.0 license and confirm that all contributions are your original work.
Support or Sponsor the Project
If Jetpath helps you or your team ship faster and more understandable codebase, consider supporting its development through GitHub Sponsors.
