The repo
CARA7 is a pnpm monorepo. Five applications and one Rust workspace.
| Directory | What it is | Port |
|---|---|---|
contracts/ | The Soroban contracts, in Rust | on chain |
apps/tranching-api | Reads the chain and serves the deal registry, positions and distributions | 8080 |
apps/defi-web | The investor dashboard and the subscription form | 3001 |
apps/spv-backend | The asset pool, the NFT minting, the waterfall keeper and the ten agents | 8090 |
apps/docs-api | The document knowledge base, with French full text search | 3333 |
apps/docs-web | The upload front for the knowledge base | served by docs-api |
apps/docs-site | This site | 3002 |
How the pieces fit
The contracts hold the truth. Everything else reads from them.
tranching-api polls the chain, decodes the events and keeps a database of
positions and distributions so the dashboard does not have to replay history on
every page load. It is a cache with an audit trail, never an authority.
defi-web reads that API for history and reads the contracts directly for
anything that must be current, such as the funding progress or a claimable
balance. It builds and signs transactions in the browser through the Stellar
Wallets Kit. No private key ever reaches a server.
spv-backend is the operator's side: it holds the pool data, mints the asset
tokens, triggers the periods, and runs the agents. It is the only component that
holds a signing key, and that key can only trigger the waterfall, never change a
number in it.
Running it locally
pnpm install # single lockfile at the root
make help # every target
make check # typecheck and tests for every app, plus the doc graph
You need PostgreSQL with two databases, cara7_kb and cara7_tranching. Each
app has a .env.example listing what it expects. Real .env files are never
committed and never read by agents working in this repo.
For the contracts:
cd contracts && cargo test --workspace
Where things run
autoabs.cara7.com | The investor dashboard |
docs.cara7.com/map | The transaction map and the flow of funds walkthrough |
docs.cara7.com | This documentation site |
| Railway | docs-api and tranching-api, with their PostgreSQL |
| Stellar test network | The contracts |
Conventions
Every directory that contains code has an AGENTS.md describing what it is and
what breaks it. CLAUDE.md imports it, so there is one file to maintain rather
than two.
The definition of done is make check passing, and showing the output. Tests go
in with the code that needs them.
TypeScript is strict, ESM only, with Zod at every external boundary. Versions differ between apps on purpose, and are never deduplicated at the root: each workspace owns its versions.
Text in this repo uses plain hyphens, never em dashes. That includes the user interface, the documentation, the code comments and the commit messages.