Introduction
👋 Welcome to DomusJS
Section titled “👋 Welcome to DomusJS”DomusJS is a scalable, TypeScript-first backend architecture toolkit designed to help you build real-world applications with speed, clarity, and maintainability.
Whether you’re building a simple API, a microservices system, or a distributed event-driven backend, DomusJS gives you clean foundations without locking you into heavy framework abstractions.
What is DomusJS?
Section titled “What is DomusJS?”DomusJS provides:
- Explicit architecture patterns: CQRS, DDD, Clean Architecture.
- Lightweight, plug-and-play modules: authentication, jobs, observability, etc.
- Full TypeScript support: type safety across your system.
- Extensibility: override or extend any part, no magic.
- Backend framework agnostic: Although DomusJS includes built-in middlewares for Express, you can use it with Fastify, or any custom setup.
Why Choose DomusJS?
Section titled “Why Choose DomusJS?”Unlike batteries-included frameworks like NestJS, DomusJS gives you:
- Minimal core + optional modules.
- Full control over your domain, application, and infrastructure layers.
- Explicit dependency injection and bus-based execution.
- Modular design ready for scaling into microservices or distributed systems.
DomusJS is for developers who:
✅ Want to move fast but build properly.
✅ Care about architecture and maintainability.
✅ Prefer clear boundaries between layers and contexts.
Key Features
Section titled “Key Features”- 🧱 Core Layer: Commands, Queries, Domain Events, Value Objects.
- 🧠 Clean Architecture: Decoupled, testable layers.
- 📡 Event Bus: In-memory, RabbitMQ, or Google Pub/Sub integrations.
- 🔐 Authentication: Pluggable strategies + JWT support.
- 🏗️ Job System: BullMQ-based task queues.
- 🔍 Observability: OpenTelemetry tracing, logging, and metrics.
- 🛡️ Security: Hashing, and rate limiting.
Available Modules
Section titled “Available Modules”Module | Description |
---|---|
@domusjs/auth | Authentication strategies + JWT. |
@domusjs/core | Core contracts: Command, Query, Event, etc. |
@domusjs/cron | Declarative cron scheduler integrated with the DI system. |
@domusjs/infrastructure | Infrastructure utilities: in-memory buses, DI setup, logger, middlewares. |
@domusjs/jobs | Asynchronous jobs with BullMQ. |
@domusjs/observability | Tracing, metrics, and logs with OpenTelemetry. |
@domusjs/security | Hashing and rate limiting. |
❤️ Contribute
Section titled “❤️ Contribute”DomusJS is open source!
We welcome contributions, feedback, and ideas.
Let’s build better backends — together.