Source layout
Where the code lives, and what each file is responsible for.
The whole app lives under src/. No nested modules, no shared
package. Everything is imported by relative path, so you can read
the call graph straight off the top of each file.
src/domain.ts shared types and AppError
src/files.ts local + browser file adapters
src/rag.ts chunking and grounded prompt
src/qvac.ts QVAC integration
src/store.ts JSON persistence
src/locallens.ts application workflow
src/cli.ts no-UI interface
src/server.ts optional HTTP interface
src/ui/ optional browser UI (index.html, app.js, styles.css)Dependency direction
The import graph is one-way. Top to bottom, each row imports only from rows above it.
| File | Imports from src/ |
|---|---|
domain.ts | — |
rag.ts | domain |
qvac.ts | domain |
store.ts | domain |
files.ts | domain |
locallens.ts | domain, files, rag, qvac, store |
cli.ts | domain, locallens |
server.ts | domain, locallens |
ui/ | (talks to server.ts over HTTP only) |
domain.ts is the foundation. Every other file imports it; it
imports nothing back. locallens.ts is the apex. Every other file
is below it; it pulls them all together.
Two-line summary
cliandserverboth consumeLocalLensAppfromlocallens.ts.LocalLensAppconsumesfiles,rag,qvac, andstore. All four of those consume onlydomain.
Next
The next page in the build path — Implementation walkthrough — visits each file in build order and shows the minimum code each one needs.
If you only want a quick reference for "what should X own?", the Code structure page has the full table.