What It Collects
Classifies source files into architectural layers and reports drift by layer.
Archetype Detection
| Archetype | Indicators |
|---|---|
| Next.js | next.config.js, pages/, app/ |
| NestJS | @nestjs/core, module structure |
| Express | express, route patterns |
| Serverless | serverless.yml, Lambda handlers |
| Monorepo | packages/, workspace config |
| CLI | bin/, commander/yargs |
Layer Classification
| Layer | File Patterns |
|---|---|
| Presentation | components/, pages/, views/ |
| API | api/, routes/, controllers/ |
| Business Logic | services/, domain/, core/ |
| Data Access | repositories/, models/, db/ |
| Infrastructure | config/, utils/, lib/ |
Per-Layer Drift
Each layer gets its own drift metrics:
{
"architectureLayers": {
"archetype": "nextjs",
"layers": {
"presentation": {
"files": 89,
"driftScore": 72
},
"api": {
"files": 23,
"driftScore": 65
},
"dataAccess": {
"files": 12,
"driftScore": 58
}
}
}
}