Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

328 Commits

Repository files navigation


Node-Boot

Spring Boot–style developer experience for Node.js.
Decorators, dependency injection, auto-configuration, and a pluggable server engine — so you can bootstrap production-grade services with minimum fuss.

nodeboot.io · Documentation · Build with Agentic AI · Quick Start · Samples · Contributing

nodepnpmtypescriptlicense

🚧 Active development. Docs are growing fast — the fastest way to learn Node-Boot today is through the sample projects below, backed by the package READMEs linked throughout this document.

Why Node-Boot?

If you've used Spring Boot, Node-Boot will feel like home. If you haven't, here's the pitch:

  • 🧩 Decorator-driven — define controllers, beans, configuration, and cross-cutting concerns declaratively (@Controller, @Get, @Configuration, @Bean, @EnableDI, ...).
  • ⚙️ Auto-configuration — enable a feature with a single @Enable...() decorator on your app entry point; Node-Boot wires the rest.
  • 🔌 Server-agnostic — the same application code runs on Express, Fastify, Koa, native HTTP, or "ghost" (no HTTP) mode — just swap the server adapter.
  • ☁️ Serverless-ready — deploy the exact same app to AWS Lambda, Cloudflare Workers, Vercel, Netlify, or Google Cloud Functions.
  • 🧠 Batteries included, opt-in — persistence (TypeORM), validation, scheduling, OpenAPI/Swagger, authorization, HTTP clients, actuator/observability, and more, each as an independent starter you enable only when you need it.
  • 🛡️ Strict TypeScript end to end, with fast builds (Turborepo + SWC) and a monorepo you can actually navigate.
@EnableDI(Container)
@EnableOpenApi()
@EnableSwaggerUI()
@EnableActuator()
@EnableRepositories()
@EnableScheduling()
@EnableHttpClients()
@EnableValidations()
@EnableComponentScan()
@NodeBootApplication()exportclassGreetingsAppimplementsNodeBootApp{start(): Promise<NodeBootAppView>{returnNodeBoot.run(HttpServer);}}
@Controller("/hello")classHelloController{
@Get("/:name")sayHello(@Param("name")name: string){return{message: `Hello, ${name}!`};}}

That's a running, typed, auto-wired HTTP service. Add @EnableOpenApi(), @EnableRepositories(), @EnableScheduling(), or any other starter to layer on more capability without touching your controllers.

(back to top)

📊 Benchmarking

Node-Boot ships with a dedicated benchmarking/ suite comparing every HTTP server adapter (Express, Fastify, Koa, native http) against its equivalent raw-framework baseline, backed by a real PostgreSQL database.

See the Req/s overview for the at-a-glance chart, or the full benchmark report for per-endpoint throughput/latency numbers and overhead analysis. Want to run it yourself? Head to benchmarking/ for setup and usage instructions.

Benchmarking Overview

(back to top)

📖 How to Use

Node-Boot applications are built by composing decorators from @nodeboot/core (controllers, routing, DI, configuration, middlewares, models, ...) with @Enable...() decorators from the starters you opt into. Decorate your entry-point class, define @Controller classes with @Get/@Post/etc. actions, inject request data with parameter decorators like @Param/@Body/@QueryParam, and register cross-cutting concerns with @Middleware, @ErrorHandler, or @Interceptor.

For a full breakdown of every decorator in the project — core framework, DI, configuration, authorization, and every starter (persistence, OpenAPI, scheduling, HTTP clients, validation, actuator, AWS, and more) — its purpose and a usage example, see the Usage Guide.

(back to top)

🤖 Build with Agentic AI

Node-Boot ships an Agent Skills-compatible skill family under .agents/skills/ that teaches coding agents (GitHub Copilot CLI, Claude Code, Cursor, and 70+ others) how to scaffold, extend, and operate Node-Boot apps — decorators, starters, server/serverless adapters, runtimes, and integration testing — without you having to paste docs into every prompt.

Install the skills into your own project with the skills CLI from skills.sh:

# Install every Node-Boot skill into the current project (targeting GitHub Copilot CLI)
npx skills add nodejs-boot/node-boot --skill '*' -a copilot-cli
# Or install just what you need, e.g. the core skill + the starters router
npx skills add nodejs-boot/node-boot --skill nodeboot-core --skill nodeboot-starters -a copilot-cli
# List every available skill without installing
npx skills add nodejs-boot/node-boot --list

Then just ask your agent to build something — e.g. "scaffold a new Node-Boot app on Fastify with Postgres persistence and OpenAPI docs" — and it will pull in the relevant skills automatically. See the full skills inventory and publishing guide for every skill available and how the family is organized.

Use a skill one-off without installing it (generates a prompt, or drives an agent interactively):

npx skills use nodejs-boot/node-boot@nodeboot-core | copilot
npx skills use nodejs-boot/node-boot --skill nodeboot-core --agent copilot-cli

🗺️ Architecture

Node-Boot architecture

Node-Boot is a pnpm + Turborepo monorepo organized into five layers:

LayerLocationWhat it does
Core Frameworkpackages/*Bootstrap, DI, config, context, decorators, engine/driver contracts, errors, AOT tooling
Server Adaptersservers/*Bind Node-Boot to a concrete HTTP runtime (Express, Fastify, Koa, native HTTP, Encore.ts, ghost)
Serverless Adaptersserverless/*Bind Node-Boot to FaaS platforms (Lambda, Cloudflare Workers, Vercel, Netlify, Google Cloud Functions)
Desktop Adapters(planned)Embed Node-Boot in native desktop app shells (Electron, Tauri) — on the roadmap, not yet published
Startersstarters/*Opt-in, auto-configured features (persistence, validation, scheduling, OpenAPI, auth, actuator, HTTP clients, ...)
Samplessamples/*Full, runnable reference applications combining the pieces above

(back to top)

📦 Core Framework Packages

PackageDescription
@nodeboot/coreThe heart of Node-Boot — @NodeBootApplication(), NodeBoot.run(...), BaseServer, controller/config decorators, lifecycle & logging
@nodeboot/contextShared runtime contracts — ApplicationContext, IoC abstractions, metadata models, middleware/interceptor contracts
@nodeboot/diDependency injection integration (@EnableDI) for controllers, services, listeners, and resolvers
@nodeboot/configTyped configuration via ConfigService and @ConfigurationProperties(), backed by app-config.yaml
@nodeboot/engineThe driver engine that connects Node-Boot's decorator model to concrete server adapters
@nodeboot/authorization@EnableAuthorization, @Authorized, and @CurrentUser for pluggable authz/authn hooks
@nodeboot/aotAhead-of-time compilation — generates beans and OpenAPI schemas at build time
@nodeboot/errorShared base errors/exceptions used across the framework
@nodeboot/toolsCI/CD and automation helpers used across the monorepo

(back to top)

🖥️ Server Adapters

Pick the HTTP runtime that fits your project — your application code stays the same.

PackageDescription
@nodeboot/express-serverExpress adapter — the most battle-tested option
@nodeboot/fastify-serverFastify adapter for high-throughput services
@nodeboot/koa-serverKoa adapter with middleware/session/cookie support
@nodeboot/http-serverNative Node.js http adapter — no framework dependency
@nodeboot/encore-serverEncore.ts adapter for Encore-based backends
@nodeboot/ghost-serverNo-HTTP "ghost" runtime for pure IoC apps, background jobs, and tests

(back to top)

☁️ Serverless Adapters

Deploy Node-Boot applications directly to your favorite FaaS platform.

PackageDescription
@nodeboot/lambda-serverAWS Lambda handler adapter
@nodeboot/cloudflare-serverCloudflare Workers fetch-handler adapter
@nodeboot/vercel-serverVercel serverless function adapter
@nodeboot/netlify-serverNetlify Functions adapter
@nodeboot/google-cloud-functions-serverGoogle Cloud Functions HTTP handler adapter

(back to top)

🧰 Starters (opt-in features)

Enable exactly what you need with a single decorator on your @NodeBootApplication() class.

PackageDescription
@nodeboot/starter-persistenceTypeORM-backed repositories, migrations, transactions, paging, entity listeners
@nodeboot/starter-validationRequest validation using class-validator DTOs
@nodeboot/starter-openapiAuto-generated OpenAPI specs (+ Swagger UI) from your controllers
@nodeboot/starter-schedulerCron-style scheduled jobs via @Scheduler(...)
@nodeboot/starter-httpTyped outbound HTTP clients via @HttpClient(...)
@nodeboot/starter-actuatorHealth checks, Prometheus metrics, build info, and introspection endpoints
@nodeboot/starter-awsAuto-configuration for AWS services
@nodeboot/starter-firebaseAuto-configuration for Firebase
@nodeboot/starter-supabaseAuto-configuration for Supabase
@nodeboot/starter-openaiAuto-configuration for OpenAI
@nodeboot/starter-backstageBackstage Catalog integration

(back to top)

🚀 Samples

Full reference applications — the fastest way to see everything working together:

SampleHighlights
sample-expressFlagship sample — persistence, OpenAPI/Swagger, validation, authorization, scheduling, HTTP clients, actuator
sample-fastifySame feature set, running on Fastify
sample-koaSame feature set, running on Koa
sample-native-httpRunning on the native Node.js http server
sample-ghost-serverPure IoC application without an HTTP layer
sample-encoreRunning on Encore.ts
sample-express-mongodbExpress + MongoDB persistence
sample-native-http-supabaseNative HTTP + Supabase starter
sample-lambdaDeploying to AWS Lambda
sample-cloudflareDeploying to Cloudflare Workers
sample-vercelDeploying to Vercel
sample-netlifyDeploying to Netlify Functions
sample-google-cloud-functionsDeploying to Google Cloud Functions

(back to top)

⚡ Quick Start

Prerequisites

Clone & explore the monorepo

git clone https://github.com/nodejs-boot/node-boot.git
cd node-boot
pnpm install

Run everything in dev/watch mode

pnpm dev

Turborepo + Nodemon build and watch every package in parallel.

Try a sample app

cd samples/sample-express
pnpm install
pnpm dev

Start your own app

The quickest path is to copy the sample closest to your target server (Express, Fastify, Koa, native HTTP, or a serverless adapter) and trim it down, or install the packages directly:

pnpm add @nodeboot/core @nodeboot/di @nodeboot/express-server

Then follow the Documentation and the @nodeboot/core README to wire up your first @NodeBootApplication().

(back to top)

🧪 Useful Monorepo Commands

CommandDescription
pnpm installInstall all workspace dependencies
pnpm devRun all packages in watch mode (Turborepo + Nodemon)
pnpm buildBuild all packages
pnpm testRun the full test suite in parallel
pnpm tscType-check every package in parallel
pnpm lint-formatLint and check formatting across the repo
pnpm lint-format:fixAuto-fix lint and formatting issues

(back to top)

🛠️ Built With

Details on the TypeScript project layout, incremental builds, and testing setup live in each package's own README, since configuration is tuned per-package.

(back to top)

🧭 Integration Points (How You Can Contribute)

Node-Boot grows through four kinds of contributions. Pick the one that matches what you want to build — each links to a step-by-step guide with code examples in CONTRIBUTING.md.

Contribution typeWhat it meansExamplesGuide
🔌 Server IntegrationBring a new runtime adapter to life so Node-Boot apps can run on itHTTP servers (Fastify, Koa, Express, node:http, Encore), serverless (AWS Lambda, Cloudflare Workers, Google Cloud Functions, Vercel, Netlify), desktop shells (Electron)Server Integrations →
🧠 Core FeatureImprove the framework itself — decorators, lifecycle, DI, config, AOT — or report/fix bugsNew core decorators, lifecycle phases, DI/config improvements, bug reports & fixesCore Feature Contributions →
☸️ RuntimesShow how/where a Node-Boot app runs once built — infra, not framework codeKubernetes manifests & production Dockerfiles, Platformatic (Watt) wrapper, PM2 process managementRuntimes →
🧩 Starter PackageIntegrate a third-party SDK, service, or platform via auto-configurationOpenAI, Firebase, AWS, Supabase, Backstage — and any new integration pointStarter Packages →

Starter packages come in several flavours depending on what you're integrating — from a simple SDK client to method/class decorators tied into the application lifecycle, conditional clients, and multi-bean factories. All of them are documented with real code from existing starters in CONTRIBUTING.md.

(back to top)

🤝 Contributing

Contributions are very welcome — this project grows through its community!

  1. Fork the repo and create your branch from main.
  2. Run pnpm install at the root to set up the workspace.
  3. Make your change in the relevant packages/, servers/, serverless/, starters/, or samples/ folder — each has its own README with the context you need.
  4. Follow Conventional Commits for your commit messages.
  5. Run pnpm lint-format, pnpm tsc, and pnpm test before opening a PR.
  6. Open a pull request describing the change and its motivation.

Good first places to look:

  • Improve or add examples in an existing package README
  • Add a new sample demonstrating a starter combination
  • Pick up an open issue
  • Add a new server, serverless, or desktop adapter

📖 For detailed, code-level guidance on each contribution type — server adapters, core features, runtimes, and every starter package flavour — see the full Contributing Guide.

If you're unsure where something belongs, open an issue or discussion first — happy to help point you in the right direction.

(back to top)

📄 License

Distributed under the MIT License. See the LICENSE file for more information.

(back to top)

About

Node Boot makes it easy to create stand-alone, production-grade NodeJs based Applications that you can "just run". We take an opinionated view of the NodeJs platform and third-party libraries so you can get started with minimum fuss.

Topics

Resources

Contributing

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages