# SoapJS

SoapJS is a lightweight, flexible framework for building applications with clean architecture — strong separation of concerns, minimal boilerplate. Define entities, use cases, repositories, CQRS, events and auth, and let the framework wire the HTTP, DI and persistence around them.

### What you can build

* **Clean architecture** out of the box — `domain / application / data / api` layers
* **Pick your complexity** — a plain `controller → use case → repository` for simple features, or full **CQRS** with commands, queries, **domain events** and read-model **projections** for complex ones
* **Ports & adapters** — swap MongoDB, SQL, or an in-memory fake without touching your domain
* **JWT / local auth**, middleware, and **WebSockets** via plugins

### See it in action

The **Comics Universe demo** (Marvel & DC) is the canonical, always-current reference — from simple CRUD to event-driven CQRS with a WebSocket live feed: 👉 [github.com/soapjs/soap-node-demo](https://github.com/soapjs/soap-node-demo)

### Next

Quick Start · Clean Architecture · Components · Plugins


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soapjs.com/soapjs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
