An AI-powered project context analysis engine for codebase analysis, documentation generation, and Markdown rendering.
π¨ Special Note: This project is entirely built using the Vibe Coding approach
- English (Default): This README
- δΈζ: README.zh.md
- Intelligent Code Analysis: Analyze codebase structure and functionality using AI technology
- Automatic Documentation Generation: Generate project summaries, API documentation, and code explanations
- Repository Map: Create symbol mapping diagrams of codebases for easy project structure understanding
- Language Filtering: Support specifying particular languages for analysis, improving analysis efficiency and precision
- Multi-language Support: Support TypeScript, JavaScript, Python, Java, Go, C++, and other programming languages
- Tree-sitter Parsing: Use Tree-sitter for precise syntax analysis
- High-quality Rendering: Render Markdown files into beautiful HTML
- Mermaid Chart Support: Support flowcharts, sequence diagrams, class diagrams, and other chart types
- Theme Switching: Support both dark and light theme modes
- Batch Processing: Support batch rendering of multiple files
- Code Highlighting: Built-in syntax highlighting functionality
- TypeScript: Type-safe JavaScript development
- pnpm: Efficient package management and monorepo support
- Tree-sitter: Precise code syntax analysis
- AI SDK: Integration with multiple AI services (Amazon Bedrock, Azure)
- Mermaid: Chart and flowchart rendering
- Winston: Logging management
project-context-engine/
βββ apps/
β βββ analyzer/ # π Code Analyzer
β β βββ src/
β β β βββ code-analyzer/
β β β β βββ agent/ # AI agent functionality
β β β β βββ parser/ # Code parser
β β β β βββ reading/ # Code reading analysis
β β β β βββ repomap/ # Repository mapping generation
β β β β βββ structure/ # Project structure analysis
β β β β βββ summary/ # Code summarization functionality
β β β βββ utils/ # Utility functions
β β βββ processed/ # Analysis result output
β βββ render/ # π¨ Markdown Renderer
β βββ src/
β βββ data/ # Markdown source files
β βββ scripts/ # Rendering scripts
βββ packages/
β βββ common/ # π Shared codebase
βββ test-multilang/ # π§ͺ Multi-language test cases
βββ docs/ # π Documentation
β βββ en/ # English documentation
β βββ zh/ # Chinese documentation
βββ ...
pnpm install
# Build entire project
pnpm build
# Build specific packages separately
pnpm build:common # Build shared package
pnpm build:analyzer # Build code analyzer
# Start code analyzer
pnpm start
# Development mode
pnpm dev
# Enter renderer directory
cd apps/render
# Render single file
npm run render
# Render all files
npm run render:all
# Render with light theme
npm run render:all:light
pnpm build # Build all packages
pnpm dev # Development mode
pnpm start # Start analyzer application
pnpm test # Run tests
pnpm typecheck # TypeScript type checking
pnpm lint # Code linting
pnpm format # Code formatting
pnpm clean # Clean build files
pnpm start # Start analyzer
cd apps/analyzer && pnpm test-repomap # Test repository mapping functionality
# Repository Map language filtering functionality
cd apps/analyzer
node dist/code-analyzer/repomap/cli.js <directory> --language python # Analyze only Python files
node dist/code-analyzer/repomap/cli.js <directory> -l typescript # Analyze only TypeScript files
node test-repomap.js --language java # Test specific language
Use pnpm workspace to add dependencies for specific packages:
# Add dependency for analyzer
pnpm --filter @project-context-engine/analyzer add <dependency>
# Add dependency for renderer
pnpm --filter @project/render add <dependency>
# Add dependency for shared package
pnpm --filter @project-context-engine/common add <dependency>
pnpm --filter <package-name> <script>
The project uses workspace protocol to manage internal dependencies:
{
"dependencies": {
"@project-context-engine/common": "workspace:*"
}
}
- Automatically identify project architecture and design patterns
- Generate detailed code documentation and explanations
- Create project structure trees and dependency relationship diagrams
- Leverage large language models to understand code logic
- Automatically generate README, API documentation
- Provide code improvement suggestions
- Markdown format analysis reports
- HTML format visualization documentation
- JSON format structured data
The project supports bilingual documentation in Chinese and English:
- English Documentation: docs/en/README.md
- δΈζζζ‘£: docs/zh/README.md
-
Code Analyzer Documentation: docs/en/analyzer/
-
Markdown Renderer Documentation: docs/en/render/README.md
-
Multi-language Test Cases: docs/en/test-multilang/README.md
ISC License
Welcome to submit Issues and Pull Requests to help improve the project.
Project Context Engine - Making code analysis and documentation generation simple and efficient π