@banana-universe/bananajs
v0.6.1
Published
An opinionated Node.js framework built on Express, designed for simplicity, scalability, and ease of use in building server-side applications.
Downloads
111
Readme
@banana-universe/bananajs
Opinionated Node.js framework built on Express with decorators, Zod validation, tsyringe DI, and plugin-based extensibility.
Homepage
https://surya-manne.github.io/banana-universe/
Installation
npm install @banana-universe/bananajs zodCore API Surface
- Routing decorators:
Controller,Get,Post,Put,Patch,Delete - Validation decorators:
Body,Query,Params,Headers - App bootstrap:
BananaApp,createBananaApplication - DI helpers:
createModule,defineBananaAppOptions,defineBananaControllers
Minimal Working Setup
import { z } from 'zod';
import { BananaApp, Controller, Get, Post, Body } from '@banana-universe/bananajs';
const createUserSchema = z.object({ name: z.string().min(1) });
@Controller('users')
class UserController {
@Get('health')
health() {
return { ok: true };
}
@Post('')
create(@Body(createUserSchema) body: z.infer<typeof createUserSchema>) {
return { id: 1, ...body };
}
}
new BananaApp({ controllers: [UserController] }).getInstance();Plugin-Friendly Async Bootstrap
import { BananaApp, defineBananaControllers } from '@banana-universe/bananajs';
await BananaApp.create({
controllers: defineBananaControllers(UserController),
plugins: [],
});Documentation
- Project docs: https://surya-manne.github.io/banana-universe/
- Architecture reference: ../../docs/ARCHITECTURE.md
License
MIT
