Skip to main content

The repo

CARA7 is a pnpm monorepo. Five applications and one Rust workspace.

DirectoryWhat it isPort
contracts/The Soroban contracts, in Ruston chain
apps/tranching-apiReads the chain and serves the deal registry, positions and distributions8080
apps/defi-webThe investor dashboard and the subscription form3001
apps/spv-backendThe asset pool, the NFT minting, the waterfall keeper and the ten agents8090
apps/docs-apiThe document knowledge base, with French full text search3333
apps/docs-webThe upload front for the knowledge baseserved by docs-api
apps/docs-siteThis site3002

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.comThe investor dashboard
docs.cara7.com/mapThe transaction map and the flow of funds walkthrough
docs.cara7.comThis documentation site
Railwaydocs-api and tranching-api, with their PostgreSQL
Stellar test networkThe 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.