CAITSGet started

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 toRead
Make a project, and see it passInstallation
Write your first use case, test firstTutorial: your first use case
Add a use case, a port or a contextAdd a use case, Add a port, Add a context
Understand how a message moves through the layersHow CAITS works
Fix a check that failsWhen a check fails
Let an AI agent write the codeAI agents
Update CAITSInstallation
Look up a command, a file name or a wordCommands, Files and names, Glossary

Guides

Understand

Reference

  • Commands 

    The scripts of a project, the commands of CAITS, and the environment variables.

  • Files and names 

    The files that CAITS finds, the names that the rules check, and the shortcuts of the imports.

  • Glossary 

    The words of CAITS, each with a short definition.