Series: Building EDIFlow - A Clean Architecture Journey in TypeScript (Part 3/6)
Reading Time: ~10 minutes
Recap — Where We Left Off
In Part 2 , we built the Domain Layer — the core entities ( EDIMessage , EDISegment , EDIElement ), value objects ( Standard , Version , MessageType , Delimiters ), and business rules.
Now it's time for the Application Layer — the part that orchestrates everything. It sits between your domain logic and the outside world:
┌─────────────────────────────────────────┐ │ Infrastructure (parsers, repos) │ │ │ │ ┌───────────────────────────────────┐ │ │ │ 🔥 APPLICATION LAYER │ │ ← You are here │ │ Use Cases · Services · Ports │ │ │ │ │ │ │ │ ┌─────────────────────────────┐ │ │ │ │ │ Domain (entities) │ │ │ │ │ └─────────────────────────────┘ │ │ │ └───────────────────────────────────┘ │ └─────────────────────────────────────────┘
Enter fullscreen mode
Exit fullscreen mode
The golden rule: the Application Layer knows the Domain, but knows nothing about Infrastructure .
It…