CAITS documentation
CAITS (Clean Architecture In TypeScript) is a starter and a base library for full-stack TypeScript apps on Marko and Vite. It sets up Clean Architecture, and one command, npm run check, proves that each change follows it.
What CAITS gives
Your project holds the business code, in contexts. CAITS holds no business code. Its package, @ingenioz-it/caits, gives:
- a container that gives each class its dependencies;
- a message bus for each context, and an event bus between the contexts;
- the stores of the frontend;
- a Vite plugin that finds the contexts of the project;
- a test helper for each kind of test;
- the configuration of each quality tool, and 52 architecture rules.
The architecture rules and the tests make the harness of the project: together, they keep each layer in its place. npm run check runs the harness. Run it before each commit.
Find your way
| You want to | Read |
|---|---|
| Make a project, and see it pass | Installation |
| Write your first use case, test first | Tutorial: your first use case |
| Add a use case, a port or a context | Add a use case, Add a port, Add a context |
| Understand how a message moves through the layers | How CAITS works |
| Fix a check that fails | When a check fails |
| Let an AI agent write the code | AI agents |
| Update CAITS | Installation |
| Look up a command, a file name or a word | Commands, Files and names, Glossary |