A strict, production-ready backend architecture for clarity, control, and scale.
CL-Architecture (Core-Line Architecture) is a backend architecture standard, not a framework.
It defines clear rules for how backend code should be structured, written, and connected so teams can build scalable systems without chaos.
It works with:
- TypeScript / Node.js (MERN backends)
- Go (REST APIs, services, microservices)
Most backend projects become hard to maintain because of:
- Fat controllers
- Business logic mixed with database logic
- Validation scattered across layers
- Inconsistent DTOs and responses
- Weak production logging
- Poor dependency injection
- No shared rules across teams
CL-Architecture solves these problems by enforcing structure, discipline, and automation.
Every request follows one clear, linear path:
Route → Controller (Port) → Flow → Source → Flow → Response
No shortcuts.
No cross-layer calls.
No hidden logic.
- Modular, self-contained features
- Clear separation of concerns
- Thin and clean controllers
- Input and output DTO rules
- Centralized validation
- Production-ready logging
- Proper dependency injection
- CLI-driven consistency
No.
CL-Architecture:
- Does not replace Express, Fastify, or Gin
- Does not use decorators or magic
- Does not lock you into a runtime
It is a discipline-first backend architecture standard.
npx cl-architecture initnpx cl-architecture create module usernpx cl-architecture init
npx cl-architecture create module authnpm install -g cl-architecture
cl init
cl create module usernpm install -D cl-architecture
npx cl create module paymentdocs/INTRODUCTION.md— Architecture conceptsdocs/RULES.md— Architecture rulesdocs/CLI.md— CLI commandsdocs/INSTALLATION.md— Setup guidedocs/EXAMPLES.md— TypeScript and Go examples
Best for:
- Medium to large backend projects
- Long-term systems
- Team-based development
- Production environments
Not recommended for:
- Small scripts
- Quick prototypes
- One-file APIs
CL-Architecture works only if the rules are followed.
Break the rules → architecture breaks Follow the rules → system scales