// the find
rmanguinho/clean-ts-api
API em NodeJs usando Typescript, TDD, Clean Architecture, Design Patterns e SOLID principles
A teaching repo from a Udemy course on building a Node/TypeScript REST+GraphQL API using Clean Architecture. The domain is a simple survey/polling system. This is explicitly course material, not a production-grade template you'd fork for a real project.
The layer separation is genuinely clean — domain, data, infra, presentation, and main are properly isolated with interfaces at every boundary, so swapping MongoDB for Postgres would touch only the infra layer. Test coverage is thorough: unit tests, integration tests against a real in-memory MongoDB, and route-level integration tests are all present and clearly separated by jest config. The Factory pattern usage in main/factories is consistent and means you can trace the full dependency graph from entry point to DB adapter without hunting. The GraphQL and REST implementations share the same use case layer, which is the right call and avoids duplicating business logic.
This is a course project, and it shows in the domain: surveys with fixed answers is a toy use case that doesn't stress-test the architecture in interesting ways — you won't learn how Clean Architecture handles complex aggregates or cross-cutting concerns from this. Travis CI is dead (travis-ci.org redirected years ago), so the build badge is broken and CI is likely not running for anyone who forks this. The MongoDB layer uses raw Mongo aggregation pipelines hand-written in query-builder.ts rather than anything typed, which quietly undermines the otherwise strict TypeScript discipline. There's no pagination on any list endpoint, which would be the first real problem anyone hits trying to adapt this for production data.