CC-301i · Module 2
Codebase Navigation
3 min read
In a large codebase, Claude cannot read everything. It needs a map. Your CLAUDE.md architecture section is that map — it tells Claude where to find things without requiring Claude to explore the entire directory tree. "Authentication: src/auth/. Database: src/db/. API routes: src/routes/. Shared types: src/types/. Configuration: src/config/." This ten-line section saves hundreds of tokens on directory exploration in every session.
The architecture section is not a complete file listing. It is a routing table — given a task category, where should Claude look? For a large codebase, group by domain rather than by file type. "User management: src/users/ (model, routes, validation, tests all co-located)" is more useful than "Models: src/models/user.ts, Routes: src/routes/user.ts" because it tells Claude that everything related to users is in one place.
## Architecture Map
- Auth: `src/auth/` (login, registration, token management)
- Users: `src/users/` (profiles, preferences, permissions)
- API: `src/routes/` (REST endpoints, middleware, validation)
- Database: `src/db/` (migrations, queries, connection pool)
- Shared types: `src/types/` (interfaces shared across modules)
- Config: `src/config/` (environment, feature flags, constants)