A high-performance, multi-runtime web framework built on Web Standards
- π Blazing Fast - Optimized radix/trie router with minimal overhead and zero-copy streaming
- π Multi-runtime - Works seamlessly on Node.js, Bun, Deno, and Edge runtimes
- π¦ Standards-based - Built on Web Request/Response APIs for maximum compatibility
- π‘οΈ Type-safe - Full TypeScript support with excellent IDE integration
- π§ Simple & Intuitive - Clean API that's easy to learn and use
- π― Production-ready - Well-tested with predictable performance
- π§© Modular - Use only what you need, tree-shakeable by design
# Using pnpm (recommended)
pnpm add @curisjs/core
# Using npm
npm install @curisjs/core
# Using yarn
yarn add @curisjs/coreimport { createApp } from '@curisjs/core';
import { serve } from '@curisjs/core/node';
const app = createApp();
// Define routes
app.get('/', () => new Response('Hello World!'));
app.get('/users/:id', (ctx) => {
return Response.json({
userId: ctx.params.id,
});
});
// Start server
await serve(app, { port: 3000 });
console.log('Server running at http://localhost:3000');import { createApp } from '@curisjs/core';
import { cors, logger } from '@curisjs/core/middleware';
const app = createApp();
// Global middleware
app.use(logger());
app.use(cors({ origin: '*' }));
// Custom middleware
app.use(async (ctx, next) => {
const start = Date.now();
await next();
const duration = Date.now() - start;
console.log(`${ctx.req.method} ${ctx.req.url} - ${duration}ms`);
});
app.get('/api/data', () => Response.json({ message: 'Hello!' }));// Route parameters
app.get('/users/:id', (ctx) => {
const userId = ctx.params.id;
return Response.json({ userId });
});
// Multiple parameters
app.get('/posts/:postId/comments/:commentId', (ctx) => {
return Response.json(ctx.params);
});
// Wildcard routes
app.get('/files/*path', (ctx) => {
const filePath = ctx.params.path;
return Response.json({ filePath });
});
// Handle all HTTP methods
app.all('/webhook', (ctx) => {
return Response.json({ method: ctx.req.method });
});βββ packages/
β βββ core/ # Core framework library
βββ template/
β βββ backend/ # Backend application template
βββ docs/ # Documentation
βββ assets/ # Project assets (logos, images)
βββ README.md # This file
- Node.js >= 18.0.0
- pnpm >= 8.0.0
# Clone the repository
git clone https://github.com/Ameriq8/curisjs.git
cd curisjs
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test| Command | Description |
|---|---|
pnpm build |
Build all packages |
pnpm dev |
Start development mode with watch |
pnpm test |
Run all tests |
pnpm test:watch |
Run tests in watch mode |
pnpm test:coverage |
Generate test coverage report |
pnpm lint |
Lint code with ESLint |
pnpm format |
Format code with Prettier |
pnpm format:check |
Check code formatting |
pnpm typecheck |
Type-check all packages |
pnpm clean |
Clean build artifacts |
π Read the full documentation at https://ameriq8.github.io/curisjs/
For offline access, see the docs directory or visit the core package README.
Get started quickly with our pre-configured backend template:
# Navigate to the template
cd template/backend
# Install dependencies
pnpm install
# Start development server
pnpm devThe template includes:
- β Project structure best practices
- β Example controllers and routes
- β Database integration setup
- β Validation examples
- β Middleware configuration
- β Docker support
CurisJS works across multiple JavaScript runtimes:
import { createApp } from '@curisjs/core';
import { serve } from '@curisjs/core/node';
const app = createApp();
app.get('/', () => new Response('Hello from Node!'));
await serve(app, { port: 3000 });import { createApp } from '@curisjs/core';
const app = createApp();
app.get('/', () => new Response('Hello from Bun!'));
export default {
port: 3000,
fetch: app.fetch.bind(app),
};import { createApp } from '@curisjs/core';
const app = createApp();
app.get('/', () => new Response('Hello from Deno!'));
Deno.serve({ port: 3000 }, app.fetch.bind(app));Contributions are welcome! We appreciate your help in making CurisJS better.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please read CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
Security is a top priority for CurisJS. If you discover a security vulnerability, please follow our Security Policy.
- οΏ½ Documentation - Comprehensive guides and API reference
- οΏ½π« GitHub Issues - Bug reports and feature requests
- π‘ GitHub Discussions - Questions and community discussions
CurisJS is built with inspiration from modern web frameworks and the amazing JavaScript community.
Made with β€οΈ by Ameriq8
