CodeCompass is the open-source AI-powered code navigation tool.
Index your project • Generate documentation • Onboard your team faster
The problem
Average time for a developer to become productive in a new codebase.
3–6months
Documentation that's incomplete, stale, or doesn't exist at all.
Senior developers keep getting pulled away to explain the architecture.
Time seniors spend answering questions
The solution
Try it
Where is login handled?
In auth.post("/login"). It looks up the user by email, checks the password, and returns a token from user.issueToken(). Bad credentials get a 401.
1import { Router } from "express";2import { verifyToken } from "./tokens";3import { db } from "../db";45export const auth = Router();67auth.post("/login", async (req, res) => {8 const { email, password } = req.body;9 const user = await db.users.findByEmail(email);10 if (!user || !(await user.checkPassword(password))) {11 return res.status(401).json({ error: "Invalid credentials" });12 }13 res.json({ token: user.issueToken() });14});1516export function requireAuth(req, res, next) {17 const token = req.headers.authorization?.split(" ")[1];18 const payload = token && verifyToken(token);19 if (!payload) return res.status(401).end();20 req.userId = payload.sub;21 next();22}
Features
Ask about any part of the codebase and get answers grounded in the actual code.
Documentation is generated from the code. Re-index to bring it up to date.
See how modules and components depend on each other in interactive diagrams.
Self-host for private code, or use the hosted version to try it quickly.
Compare