Quick Start
Goal: get running locally and complete the loop — import material → create a Profile → add a key → finish one interview → read the report.
0 · Prerequisites
| Item | Requirement | Notes |
|---|---|---|
| Node.js | ≥ 22.13 | the pinned pnpm 11 requires it |
| pnpm | ≥ 9 | the repo is a two-package workspace |
| Python 3 | optional | without it, code questions use Pyodide |
| C++ / Java | optional | needed to compile and run those languages |
Platform differences
The app is cross-platform; only the sandbox and local speech synthesis are tied to the OS. This is written down because "it runs here" and "it is safe here" are two different claims:
| Capability | macOS | Linux | Windows |
|---|---|---|---|
| UI · Host · SQLite FTS5 · local embeddings | ✅ | ✅ | ✅ |
| Code execution: process group · cleaned env · scratch HOME | ✅ | ✅ | ✅ |
| Code execution: kernel isolation (no network / no profile reads) | ✅ seatbelt | ❌ | ❌ |
| Local speech synthesis without a key | ✅ say | set IFG_TTS_CMD | set IFG_TTS_CMD |
- To refuse to run without kernel isolation:
IFG_SANDBOX=require. - To disable isolation for debugging:
IFG_SANDBOX=off. - On non-macOS, running untrusted code is a qualified use: the child is still confined to its own process group and a scratch HOME, but it can reach the network and read the data directory.
- What has been verified: CI runs the full suite and e2e on
ubuntu-latest; screenshots and manual acceptance happened on macOS; Windows is untested.
1 · Install and start
pnpm install # also verifies that SQLite FTS5 is available
pnpm dev:all # Host on :8787 and the UI on whatever Vite picksBackend only:
pnpm server # tsx server/index.ts
pnpm ifg doctor # Profile / KB / models / ASR / code toolchain / providersWhat the first boot creates
The Host creates ~/.interviewforge/ with system.db (profiles, models, settings), shared.db (shared library) and one directory per Profile: profiles/<id>/{app.db,lineage.db}. Business data and lineage are physically separate — cross-profile reads fail at the storage layer, not merely at the API.
2 · Create a Profile and a PIN
Open the address Vite printed in the terminal (5178 by default; it shifts when the port is taken) and follow the onboarding:
- The PIN is 4–8 digits and unlocks a profile token (12 h by default,
IFG_PROFILE_TOKEN_TTL_HOURS). - PINs are compared through HMAC; they are not stored in clear. A forgotten PIN is reset by an admin.
- Profiles cannot see each other: the Host trusts only the profile id inside the signed token.
3 · Import material
Three entry points, one index:
Figure 1 · Import → split → two indexes → retrieval and topics
Chunking (splitMarkdown) splits on #–#### and keeps the full heading path (document › section), so "find the section titled X" is an exact, satisfiable query. Chunk ids are monotonic and never reused.
4 · Configure a provider (for real AI)
Under Providers & Keys:
| Item | Notes |
|---|---|
| DeepSeek key | one key drives chat, ASR, TTS, search and vision/OCR |
| Capability routes | each capability picks a provider and model; unset falls back to the local mock |
| Budget | profile cap plus per-session cap; checked again after every billable call |
The mock is not AI
Without a key the system runs a deterministic local mock: useful for exercising the pipeline and the tests, not a model. Reports say whether the run was mock-based; do not read mock output as feedback.
5 · Install an embedding model (recommended)
Settings → Models → install bge-small-zh (≈25 MB) → enable → rebuild the index.
- The rebuild runs in a worker thread: the event loop stays free, SSE and live interviews keep responding, and the page shows progress.
- Enabling writes
ifg-embed.json(including the pooling mode), so an index can never be silently wrong because two models share a width but not a pooling. - Switching model or pooling changes the index fingerprint and the UI asks for a rebuild.
6 · Run your first interview
- New interview → mix, difficulty, style → topics → review the egress list → start.
- Answer by text, voice, screenshot or code (code questions must actually run).
- End → scoring → report → re-score into v+1 if you disagree.
Details: An Interview, End to End.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
pnpm install reports FTS5 unavailable | better-sqlite3 build failed; pnpm setup:sqlite |
| The page spins forever | Host not running or wrong port; check pnpm server and 8787 |
invalid_profile_token | expired or deleted profile; unlock again (a dead token is cleared automatically) |
| Question generation is slow | with no key this is the mock's deterministic delay; with a key, inspect runs in the Kernel console |
| Semantic search does nothing | no embedding model, or the model changed without a rebuild (the UI reports mismatch) |
| Code questions fail to run | missing interpreter/compiler; pnpm ifg doctor lists all four |
Where the data lives
~/.interviewforge/
├── system.db # profiles, models, global settings
├── shared.db # shared library (cross-profile, ACL)
├── models/ # installed ONNX models + ifg-embed.json
├── exports/ # background exports (retention applies)
└── profiles/<id>/
├── app.db # sessions, events, topics, memory, usage
└── lineage.db # calls, citations, lineage graph (separate file)Backups, retention and cleanup: Settings & Admin.