| description | tags | |||
|---|---|---|---|---|
Generate comprehensive analysis and documentation of entire codebase |
|
!find . -type d -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./dist/*" -not -path "./build/*" -not -path "./.next/*" -not -path "./coverage/*"
!find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./dist/*" -not -path "./build/*" -not -path "./.next/*" -not -path "./coverage/*" -not -path "./*.log"
- Total files: !
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" - Code files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.py" -o -name "*.java" -o -name "*.php" -o -name "*.rb" -o -name "*.go" -o -name "*.rs" -o -name "*.cpp" -o -name "*.c" \) - Project size: !
du -sh .
- Package.json: @package.json
- Package-lock.json exists: !
find . -maxdepth 1 -name "package-lock.json" - Yarn.lock exists: !
find . -maxdepth 1 -name "yarn.lock" - Requirements.txt: @requirements.txt
- Gemfile: @Gemfile
- Cargo.toml: @Cargo.toml
- Go.mod: @go.mod
- Composer.json: @composer.json
- Webpack config: @webpack.config.js
- Vite config: @vite.config.js
- Rollup config: @rollup.config.js
- Babel config: @.babelrc
- ESLint config: @.eslintrc.js
- Prettier config: @.prettierrc
- TypeScript config: @tsconfig.json
- Tailwind config: @tailwind.config.js
- Next.js config: @next.config.js
- .env files: !
find . -name ".env*" -type f - Docker files: !
find . -name "Dockerfile*" -o -name "docker-compose*" - Kubernetes files: !
find . -type f \( -name "*k8s*.yaml" -o -name "*k8s*.yml" -o -name "*kubernetes*.yaml" -o -name "*kubernetes*.yml" -o -name "*deployment*.yaml" -o -name "*deployment*.yml" \)
- GitHub Actions: !
find .github -type f \( -name "*.yml" -o -name "*.yaml" \) - GitLab CI: @.gitlab-ci.yml
- Travis CI: @.travis.yml
- Circle CI: @.circleci/config.yml
- Main entry points: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "main.*" -o -name "index.*" -o -name "app.*" -o -name "server.*" \) - Routes/Controllers: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/routes/*" -o -path "*/controllers/*" -o -path "*/api/*" \) - Models/Schemas: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/models/*" -o -path "*/schemas/*" -o -path "*/entities/*" \) - Components: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/components/*" -o -path "*/views/*" -o -path "*/pages/*" \)
- Database configs: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*database*" -o -name "*db*" -o -name "*connection*" \) - Migration files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/migrations/*" -o -path "*/migrate/*" \) - Seed files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/seeds/*" -o -path "*/seeders/*" \)
- Test files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*test*" -o -name "*spec*" \) - Test config: @jest.config.js
- API docs: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*api*.md" -o -name "swagger*" -o -name "openapi*" \)
@README.md @LICENSE @.gitignore
!find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "index.js" -o -name "index.ts" -o -name "main.js" -o -name "main.ts" -o -name "app.js" -o -name "app.ts" -o -name "server.js" -o -name "server.ts" \)
Based on all the discovered information above, create a comprehensive analysis that includes:
- Project type (web app, API, library, etc.)
- Tech stack and frameworks
- Architecture pattern (MVC, microservices, etc.)
- Language(s) and versions
For each major directory, explain:
- Purpose and role in the application
- Key files and their functions
- How it connects to other parts
Organize by category:
- Core Application Files: Main entry points, routing, business logic
- Configuration Files: Build tools, environment, deployment
- Data Layer: Models, database connections, migrations
- Frontend/UI: Components, pages, styles, assets
- Testing: Test files, mocks, fixtures
- Documentation: README, API docs, guides
- DevOps: CI/CD, Docker, deployment scripts
If applicable, document:
- All discovered endpoints and their methods
- Authentication/authorization patterns
- Request/response formats
- API versioning strategy
Explain:
- Overall application architecture
- Data flow and request lifecycle
- Key design patterns used
- Dependencies between modules
Document:
- Required environment variables
- Installation and setup process
- Development workflow
- Production deployment strategy
List and explain:
- Runtime environment
- Frameworks and libraries
- Database technologies
- Build tools and bundlers
- Testing frameworks
- Deployment technologies
Create a comprehensive diagram showing:
- High-level system architecture
- Component relationships
- Data flow
- External integrations
- File structure hierarchy Use ASCII art, mermaid syntax, or detailed text representation to show: ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Frontend │────>│ API │────>│ Database │ │ (React/Vue) │ │ (Node/Flask) │ │ (Postgres/Mongo)│ └─────────────────┘ └─────────────────┘ └─────────────────┘
Provide:
- Code quality assessment
- Potential improvements
- Security considerations
- Performance optimization opportunities
- Maintainability suggestions Think deeply about the codebase structure and provide comprehensive insights that would be valuable for new developers joining the project or for architectural decision-making. At the end, write all of the output into a file called "codebase_analysis.md"