Project Layout
Also known as: project structure folder layout directory tree src main.kav lib.kav gitignore where files go new project scaffold
● Intermediate4 minBefore this: ModulesSpec 10.3
A project is a folder: kavach.toml at the top, your code in src/, and build output in .kavach/, never committed.
my-app/
├── kavach.toml project settings and dependencies
├── kavach.lock exact dependency versions (generated, commit it)
├── kavach_modules/ fetched dependencies (generated, never commit it; 10.12)
├── src/
│ ├── main.kav entry point (for applications)
│ ├── orders.kav
│ ├── orders.test.kav hand-written tests of `orders` (few; see 11.8)
│ └── billing/
│ ├── invoice.kav
│ └── invoice.test.kav
└── tests/ stories across many modules
└── found/ failing inputs found by `kavach test` (generated, commit it)What each part is, and what to commit
| Path | What it is | Commit it? |
|---|---|---|
| kavach.toml | The project's name, version and settings | yes |
| kavach.lock | Exact versions of the packages used (written by Kavach) | yes |
| src/ | Your code; main.kav for a program, lib.kav for a library | yes |
| src/orders.test.kav | The hand-written tests of orders.kav, beside it, if it has any | yes |
| tests/ | Tests that tell a story across many modules, if any | yes |
| tests/found/ | Failing inputs kavach test found, replayed on every run (written by Kavach) | yes |
| kavach_modules/ | Fetched dependencies, one folder per package (written by Kavach; kavach.lock is enough to fetch them again) | never |
| .kavach/ | Build output and caches: the executable lands in .kavach/bin/ | never |
Start one
kavach new makes the folder, a first kavach.toml, a src/main.kav, and a .gitignore that leaves .kavach/ out:
kavach new my-app
cd my-app
kavach run
Inside a project, kavach run, build, test and check need no file name: they use src/main.kav.