1---2name: project-scanner3description: Project introspection — detect languages, frameworks, database, structure, scale, auth, CI/CD4---5
6# Project Scanner
7
8> Generated knowledge used by `/superkit-init` and `/superkit-evolve`.
9
10## Detection Patterns
11
12### Languages
13
14| File Marker | Language | Version Source |
15|-------------|----------|---------------|
16| `go.mod` | Go | First line: `go X.Y` |
17| `package.json` + `tsconfig.json` | TypeScript | `package.json` → `typescript` version |
18| `package.json` (no tsconfig) | JavaScript | `package.json` → `engines.node` |
19| `pyproject.toml` | Python | `[project]` → `requires-python` |
20| `requirements.txt` | Python | None (check `python --version`) |
21| `Cargo.toml` | Rust | `[package]` → `edition` |
22| `pom.xml` | Java | `<java.version>` |
23| `build.gradle` / `build.gradle.kts` | Kotlin/Java | `sourceCompatibility` |
24
25### Frameworks
26
27| Language | Detection | Popular Frameworks |
28|----------|-----------|-------------------|
29| Go | `go.mod` requires | chi, gin, echo, fiber, gorilla/mux |
30| TypeScript | `package.json` deps | react, vue, svelte, angular, next, nuxt, express, fastify, nestjs |
31| Python | `pyproject.toml` / `requirements.txt` | fastapi, django, flask, starlette |
32| Rust | `Cargo.toml` deps | actix-web, axum, rocket, warp |
33
34### Database
35
36| Signal | Database | Driver |
37|--------|----------|--------|
38| `postgres` in docker-compose | PostgreSQL | Read go.mod/package.json for driver |
39| `mysql` in docker-compose | MySQL | Read go.mod/package.json for driver |
40| `mongo` in docker-compose | MongoDB | Read go.mod/package.json for driver |
41| `DATABASE_URL` in .env | Parse URL scheme | From URL |
42| `schema.prisma` | From `datasource.provider` | Prisma |
43
44### Structure Patterns
45
46| Pattern | Classification |
47|---------|---------------|
48| Multiple `go.mod` or `package.json` (not in node_modules) | Monorepo |
49| Single root `go.mod` + `cmd/` | Go standard layout |
50| Single `package.json` + `src/` | Single app |
51| `apps/` or `packages/` with workspace config | Monorepo (workspace) |
52| `services/` with multiple subdirs each with own main | Microservices |
53
54### Component Detection
55
56Scan top-level and second-level directories:
57
58| Directory Pattern | Component Type |
59|-------------------|---------------|
60| `backend/`, `server/`, `api/` | Backend |
61| `frontend/`, `web/`, `client/`, `app/` | Frontend |
62| `admin/`, `adminpanel/`, `dashboard/` | Admin UI |
63| `bot*/`, `tgbot*/` | Bots |
64| `worker*/`, `jobs/`, `queue/` | Background workers |
65| `infra/`, `deploy/`, `terraform/` | Infrastructure |
66| `mobile/`, `ios/`, `android/` | Mobile |
67| `docs/` | Documentation |
68
69### Scale Estimation
70
71```bash
72# Files by language
73find . -name "*.go" | grep -v vendor | wc -l
74find . -name "*.ts" -o -name "*.tsx" | grep -v node_modules | wc -l
75
76# Migrations
77find . -path "*/migrations/*" -name "*.up.sql" | wc -l
78
79# API endpoints (approximate)
80grep -r "router\.\(Get\|Post\|Put\|Delete\|Patch\)" --include="*.go" | wc -l
81grep -r "app\.\(get\|post\|put\|delete\|patch\)" --include="*.ts" | wc -l
82
83# LOC estimate
84find . \( -name "*.go" -o -name "*.ts" -o -name "*.py" \) | grep -v vendor | grep -v node_modules | xargs wc -l 2>/dev/null | tail -1
85```