Skip to content

Latest commit

 

History

6,264 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreetJS

StreetJS

The integrated TypeScript backend framework — built on Node.js core, not on a pile of dependencies.

Auth, realtime, ORM, jobs, messaging, observability and a signed plugin ecosystem — included by default. No Express. No pg. No Prisma. Just 3 runtime dependencies.

npm version npm downloads License: MIT CI CodeQL OpenSSF Scorecard npm provenance Node.js TypeScript Discord

Documentation · Get Started · Compare · Plugins · Discussions · Discord


What is StreetJS?

StreetJS is a TypeScript backend framework that ships the things real applications need — HTTP, dependency injection, a native database layer, auth, realtime, jobs, messaging and observability — as first-class, typed building blocks. It is built directly on Node.js core modules (node:http, node:net, node:crypto, node:stream, node:cluster) with only three runtime dependencies (reflect-metadata, ws, zod).

It targets five problems that slow teams down:

  • Dependency sprawl — a typical Node backend pulls in Express + pg + an ORM + a validator + an auth library + a WebSocket lib, each with its own transitive tree. StreetJS replaces that stack with one typed framework and a tiny dependency surface.
  • Integration complexity — auth, realtime, ORM and OpenAPI are designed to work together, sharing the same context and types, instead of being glued together by hand.
  • Supply-chain risk — fewer dependencies plus signed plugins, npm provenance, SBOM generation, CodeQL and secret scanning mean a smaller, more auditable attack surface.
  • Cost of infrastructure — dependency-light services with fast cold starts are cheaper to self-host; you own your data and your bill (see StreetJS on a Budget).
  • Time-to-productionstreet create scaffolds a production-ready project (PostgreSQL, JWT, Docker, CI) in seconds.

Project status (honest): the engineering is mature and CI-green; the gaps are community size and ecosystem breadth, not core capability. See the candid Gap Analysis.


Why StreetJS?

A feature comparison against the most common Node.js choices. "Built in" means first-party and shipped with the framework; "plugin/3rd-party" means you assemble it yourself.

Capability StreetJS Express Fastify NestJS
TypeScript-first ✅ native ⚠️ via @types ✅ good ✅ native
Dependency footprint 3 runtime deps minimal core + many add-ons lean core + plugins larger (many @nestjs/*)
Routing + DI ✅ built in ⚠️ via plugins ✅ built in
Auth (JWT/sessions/RBAC/MFA) ✅ built in ❌ 3rd-party ❌ 3rd-party ⚠️ @nestjs/passport
Realtime (WebSocket + SSE) ✅ built in ❌ 3rd-party ⚠️ plugin ⚠️ @nestjs/websockets
ORM / DB ✅ native PG/MySQL/SQLite + ORM ❌ bring your own ❌ bring your own ⚠️ TypeORM/Prisma adapters
OpenAPI generation ✅ built in ❌ 3rd-party ⚠️ plugin @nestjs/swagger
Signed plugin system ✅ Ed25519 + provenance ⚠️ plugins (unsigned) ⚠️ modules (unsigned)
AI building blocks @streetjs/ai + OpenAI plugin

Comparison is feature-coverage, not performance. Benchmark your own workload — see Performance and the full honest writeups under Compare.


Quick start

Scaffold a project (recommended):

npx @streetjs/cli create my-app
cd my-app
npm install
npm run dev

Or add the framework to an existing project:

npm install streetjs

Minimal application:

import 'reflect-metadata';
import { streetApp, Controller, Get } from 'streetjs';
import type { StreetContext } from 'streetjs';

@Controller('/api')
class HelloController {
  @Get('/hello')
  async hello(ctx: StreetContext) {
    ctx.json({ message: 'Hello from StreetJS!' });
  }
}

const app = streetApp({ port: 3000 });
app.registerController(HelloController);
await app.listen();
// [street] Listening on http://0.0.0.0:3000

Requires Node.js ≥ 20, TypeScript ≥ 5.0, and "type": "module". Full setup in Getting Started.


Features

Area What's included
Core HTTP server, compiled-regex router, dependency injection, middleware, typed context, OpenAPI 3.1 generation, API versioning
Data Native PostgreSQL wire driver (SCRAM-SHA-256), native MySQL, SQLite, connection pool, repositories, migrations, query builder, schema introspection, first-party ORM
Security JWT, AES-256-GCM sessions, scrypt vault, RBAC, MFA (TOTP), WebAuthn/passkeys, mTLS, rate limiting, XSS sanitizer, CSRF, field-level encryption
Realtime Bounded WebSocket server with channels & presence, Server-Sent Events
Messaging Kafka, RabbitMQ, Redis, NATS transports; webhook dispatcher
AI @streetjs/ai building blocks and the official OpenAI plugin
Microservices HTTP/2, gRPC, circuit breaker, service registry, distributed lock, CQRS, saga, event bus
Observability OpenTelemetry (OTLP), Prometheus /metrics, structured logging, health checks, P50/P99 telemetry
DevOps street CLI (create/dev/build/generate/migrate/…), clustering, Docker scaffolding, GitHub Actions CI with provenance
Ecosystem 19 official signed plugins, a plugin registry, and frontend SDKs (@streetjs/{client,react,next,vue,nuxt})

Full reference: Documentation.


Official plugins

19 official, Ed25519-signed plugins published under the @streetjs/ scope. Browse them on the Official Plugins page.

Category Plugins
Payments Stripe, PayPal
Messaging / comms Twilio, SendGrid, Africa's Talking, Kafka, RabbitMQ, NATS
Storage Amazon S3, Cloudflare R2
AI OpenAI
Identity Auth0, Clerk, Supabase, Firebase
Databases PostgreSQL, MySQL, MongoDB, Redis

Build your own with the Plugin Author Guide and get it certified.


Security & supply chain

StreetJS treats supply-chain integrity as a first-class concern:

  • Ed25519 plugin signing — official plugin manifests are signed; signatures are verified before load.
  • npm provenance — packages are published from CI with provenance attestations.
  • SBOM — a Software Bill of Materials is generated for releases.
  • CodeQL — static analysis on every push (codeql.yml).
  • Secret scanningsecret-scan.yml plus gitleaks configuration.
  • OpenSSF Scorecard — continuous supply-chain scoring (scorecard.yml).
  • Runtime certificationnpm run verify:runtime produces a published certification report.

Report vulnerabilities privately via the Security Policy.


Documentation

Topic Link
Getting Started https://hassanmubiru.github.io/StreetJS/getting-started/
Tutorials https://hassanmubiru.github.io/StreetJS/tutorials/
Examples https://hassanmubiru.github.io/StreetJS/examples/
Plugins https://hassanmubiru.github.io/StreetJS/plugins/
ORM https://www.npmjs.com/package/@streetjs/orm
Security https://hassanmubiru.github.io/StreetJS/security/
Enterprise https://hassanmubiru.github.io/StreetJS/enterprise/
Compare https://hassanmubiru.github.io/StreetJS/compare/
Roadmap https://hassanmubiru.github.io/StreetJS/roadmap/
FAQ https://hassanmubiru.github.io/StreetJS/faq/

Community


Monorepo

This is an npm-workspaces monorepo of 47 packages. The headline packages:

Package npm Description
packages/core streetjs The framework runtime
packages/cli @streetjs/cli Project scaffolding & dev tooling
packages/orm @streetjs/orm First-party ORM
packages/plugin-* @streetjs/plugin-* 19 official signed plugins
packages/core-compat @streetjs/core Deprecated shim that re-exports streetjs
npm run build          # build all packages
npm test               # core integration tests (requires PostgreSQL)
npm run verify:runtime # runtime certification battery

See CONTRIBUTING.md for the full development and test guide.


License

MIT © street contributors

Docs: OpenTelemetry quickstart

Add distributed tracing to any StreetJS app with the built-in OtelTracer and otelMiddleware — no @opentelemetry/* packages required.

import { OtelTracer, otelMiddleware } from 'streetjs';

const tracer = new OtelTracer({ serviceName: 'my-api' });
app.use(otelMiddleware(tracer)); // one span per request, W3C traceparent propagation

process.once('SIGTERM', async () => { await tracer.flush(); tracer.shutdown(); });

Exports spans via OTLP/HTTP to Jaeger, Grafana Tempo, or any OpenTelemetry Collector. Set OTEL_EXPORTER_OTLP_ENDPOINT to point at your collector (default: http://localhost:4318).

Full quickstart guide →

About

StreetJS Framework is a TypeScript-first backend framework designed for developers who want production-grade performance, security-focused defaults, bounded resource management, and minimal dependency exposure without sacrificing developer experience.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages