CortexPath is your architectural intelligence system. Mirror your local code to the cloud, generate AI logic summaries, and audit your system design in real-time.
AST
Import Analysis
Llama 3.3
70B Model
pgvector
Vector Search
core capabilities
Deep AST parsing of local TS/JS. Map your dependencies and mirror your logic to a secure Neon Cloud with pgvector embeddings.
Powered by Llama 3.3 70B via Groq. Get plain-English logic summaries that explain the "Why" behind the "What" for every file.
Proactive security, performance, and sustainability checks. Know your Blast Radius before you refactor.
interactive preview
Ingest your entire codebase once — then click any file in the tree to stream a structured AI audit rooted in real imports, exports, and dependency context.
// hooks/useIngestor.ts
export function useIngestor() {
const [status, setStatus] =
useState<IngestStatus>('idle');
const [progress, setProgress] =
useState({ current: 0, total: 0 });
const contentCache =
useRef<Map<string, string>>(new Map());
// Restore previous session from DB on mount
useEffect(() => {
fetch('/api/files')
.then(r => r.json())
.then(({ files }) => {
if (files?.length) {
setResults(files);
setStatus('done');
}
});
}, []);
const selectFolder = useCallback(async () => {
const dir = await showDirectoryPicker();
const files: FileEntry[] = [];
await collectFiles(dir, '', files);
for (const batch of chunk(files, 10)) {
await fetch('/api/ingest/batch', {
method: 'POST',
body: JSON.stringify({ files: batch }),
});
}
setStatus('done');
}, []);
}1. architectural blueprint
State Orchestration Layer · bridges File System Access API → Groq batch summarization → Neon DB · Complexity 7/10
2. logical narrative
Owns the full ingestion lifecycle: collectFiles → chunk(10) → POST /api/ingest/batch loop, caching raw content in a useRef Map for on-click interpret calls.
3. security & resilience
No rate-limit on batch POSTs — a 10 000-file repo fires hundreds of unthrottled requests. Fix: wrap the batch loop with p-limit(3).
4. optimization
Sequential batch loop: 100 batches × 2 s = 200 s worst case. Promise.all with a concurrency cap yields 3× throughput.
6. blast radius
Fragility 8/10 · FolderIngestor, page.tsx, and all /api/ingest/* routes depend on this hook's status shape — a FileResult rename breaks 4 files.
8. mentor challenge
Level: Applying → refactor selectFolder's implicit state machine into useReducer — eliminate the impossible state where status="done" but results=[].
blast radius
mentor challenge
Add error boundaries at integration points...
mobile librarian
The Expo Librarian app gives lead engineers instant access to code logic, Blast Radius risks, and mentorship challenges — anywhere, without touching a laptop.