Full Cycle challenge applying Clean Architecture in TypeScript: domain entities stay independent of frameworks, while use cases orchestrate application rules and infrastructure adapters (Express, Sequelize, presenters) sit at the edges.
- Domain-driven building blocks: entities, factories, validators, domain events
- Application use cases for Product and Customer (create, find, list, update)
- Infrastructure: Sequelize repositories, Express routes, XML/JSON presenters
- Automated tests (unit + e2e) with Jest
| Layer | Tech |
|---|---|
| Language | TypeScript |
| HTTP | Express |
| Persistence | Sequelize + SQLite |
| Validation | Yup |
| Tests | Jest, Supertest, SWC |
HTTP (Express) → Controllers/Routes → Use Cases → Domain
↓
Repository interfaces
↓
Sequelize / SQLite adapters
- Node.js 18+
- npm
git clone https://github.com/fellipesg/fc-clean-architecture.git
cd fc-clean-architecture
npm installnpm run devStarts the API via Nodemon (src/infrastructure/api/server.ts).
npm testType-checks the project and runs Jest.
src/
├── domain/ # Entities, events, factories, validators
│ ├── product/
│ ├── customer/
│ └── checkout/
├── usecase/ # Application services (create/find/list/…)
├── infrastructure/
│ ├── api/ # Express server, routes, presenters, e2e tests
│ └── product|customer|… # Sequelize repositories
└── …
- Clean Architecture / hexagonal boundaries in a Node codebase
- Product-focused use cases as the application core
- Framework-independent domain layer with adapters for HTTP and DB
- Testable use cases with in-memory or SQLite-backed repositories
Educational project — Full Cycle course challenge.