Skip to content

Commit 820eaa3

Browse files
committed
docs: highlight business logic decoupling from frameworks/ORMs for ultimate flexibility
1 parent a26388c commit 820eaa3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
## Stack
1212
- **Node.js** (Express.js) for the REST API
13-
- **MongoDB** (native driver) for persistence
13+
- **MongoDB** (MongoClient) for persistence
1414
- **Jest** & **Supertest** for unit and integration testing
1515
- **ESLint** & **Prettier** for linting and formatting
1616
- **Docker** & **Docker Compose** for containerization
@@ -22,6 +22,9 @@
2222
- **Testability:** Business logic can be tested in isolation by injecting dependencies (e.g., mock DB handlers) from above. No real database is needed for unit tests.
2323
- **Security & Flexibility:** Infrastructure (DB, frameworks) can be swapped without touching business logic.
2424

25+
> **✨ Ultimate Flexibility:**
26+
> This project demonstrates that your core business logic is never tied to any specific framework, ORM, or database. You can switch from Express to Fastify, MongoDB to PostgreSQL, or even move to a serverless environment—without rewriting your business rules. The architecture ensures your codebase adapts easily to new technologies, making future migrations and upgrades painless. This is true Clean Architecture in action: your app’s heart beats independently of any tool or vendor.
27+
2528
## How Testing Works
2629
- **Unit tests** inject mocks for all dependencies (DB, loggers, etc.) into use cases and controllers. This means you can test all business logic without a real database or server.
2730
- **Integration tests** can use a real or in-memory database, but the architecture allows you to swap these easily.
@@ -91,6 +94,9 @@ See the `routes/` directory for all endpoints. Example:
9194
- **Output Model** (e.g., `User`, `Product`, `Blog`): What the API returns. Includes all fields, including those generated by the server (e.g., `_id`, `role`, etc.).
9295
- This separation improves security, clarity, and validation.
9396
- You can view and try all models in the "Schemas" section of Swagger UI.
97+
- check at http://localhost:5000/api-docs. /* (:5000 depend on you chosen port) */
98+
99+
94100

95101
## Testing
96102
- **Unit tests** (Jest): Test business logic in isolation by injecting mocks for all dependencies. No real DB required.

0 commit comments

Comments
 (0)