Loading...
Loading...
Generate DeepWiki-style repository analysis reports. Deeply analyze codebase architecture, module dependencies, and core systems, outputting structured documentation with Mermaid diagrams, source file references, and tables.
npx skill4agent add zzzhizhia/repowiki repowiki# {Project Name}
> {One-line project positioning description}
## Purpose & Scope
{2-3 paragraphs describing what problem the project solves, core value, target users}
## Tech Stack
| Category | Technology | Purpose |
|----------|-----------|---------|
| Language | ... | ... |
| Framework | ... | ... |
| Build Tool | ... | ... |
| Testing | ... | ... |
| Database | ... | ... |
## Repository Structure
{Mermaid graph showing top-level directory structure and module relationships}
## Core Systems Overview
{Mermaid graph showing interactions between major subsystems}## Module Inventory
| Module | Path | Responsibility | Key Dependencies |
|--------|------|---------------|-----------------|
| ... | ... | ... | ... |
## Module Dependency Architecture
{Mermaid graph: inter-module dependency diagram}
## {Module Name} Detailed Analysis
<details>
<summary>Related Source Files</summary>
- `path/to/file1.ts`
- `path/to/file2.ts`
</details>
### Responsibilities & Boundaries
{What this module is and isn't responsible for}
### Internal Architecture
{Mermaid graph: class/function relationships within the module}
### Key Interfaces
{Code block: main exported APIs, type definitions, interfaces}
### Data Flow
{Mermaid sequence/flowchart: how data flows within the module}## {System Name}
<details>
<summary>Related Source Files</summary>
- `path/to/relevant/file.ts`
</details>
### Purpose & Scope
{Description of the system's responsibilities}
### System Architecture
{Mermaid graph: overall architecture diagram of the system}
### Core Workflows
{Mermaid sequence diagram: main business processes}
### Key Components
| Component | File | Responsibility |
|-----------|------|---------------|
| ... | ... | ... |
### Configuration & Extension Points
{Code block: key configuration file snippets}
### Design Decisions
{Why it was designed this way, what trade-offs were made}## Build System
### Build Pipeline
{Mermaid flowchart: complete process from source to artifacts}
### Build Configuration
{Table: key build configuration items}
## Testing Infrastructure
### Testing Strategy
| Test Type | Tool | Coverage |
|-----------|------|----------|
| Unit Tests | ... | ... |
| Integration Tests | ... | ... |
| E2E Tests | ... | ... |
### Test Configuration
{Code block: key test configuration file snippets}
## CI/CD Pipeline
{Mermaid flowchart: CI/CD process}
## Dependency Management
### Key Dependencies
| Dependency | Version | Purpose |
|-----------|---------|---------|
| ... | ... | ... |
### Dependency Strategy
{Version locking, update strategy, security auditing}graph TD
Root[Project Root]
Root --> Src[src/]
Root --> Config[Configuration]
Root --> Tests[tests/]
Src --> Core[core/]
Src --> Utils[utils/]
Src --> Types[types/]graph LR
A[Module A] --> B[Module B]
A --> C[Module C]
B --> D[Module D]
C --> DsequenceDiagram
participant User
participant API
participant Service
participant DB
User->>API: Request
API->>Service: Process
Service->>DB: Query
DB-->>Service: Result
Service-->>API: Response
API-->>User: Returnflowchart LR
Input[Input] --> Validate[Validate]
Validate --> Transform[Transform]
Transform --> Process[Process]
Process --> Output[Output]stateDiagram-v2
[*] --> Created
Created --> Active
Active --> Paused
Paused --> Active
Active --> Completed
Completed --> [*]**/*package.jsongo.modCargo.tomlpyproject.tomlpom.xmltsconfig.json.eslintrc.*vite.config.*webpack.config.*.github/workflows/*.gitlab-ci.ymlDockerfile| Signal | Weight | Method |
|---|---|---|
| File change frequency | High | git log statistics |
| Directory size | Medium | File count |
| Entry file references | High | grep import/require |
| README mentions | Medium | Read documentation |
| Export count | Medium | grep export |
REPOWIKI.md<details>
<summary>Related Source Files</summary>
- `src/core/engine.ts` - Core engine implementation
- `src/core/types.ts` - Type definitions
- `src/config/default.ts` - Default configuration
</details>REPOWIKI.md# MyApp
> A full-stack e-commerce platform built on Next.js, supporting multi-tenancy and real-time inventory management.
## Purpose & Scope
MyApp is an e-commerce SaaS platform for small and medium-sized merchants. It provides
product management, order processing, payment integration, and real-time inventory
synchronization as core features. The project uses Next.js App Router architecture,
Prisma as the ORM, and PostgreSQL as the primary database.
## Tech Stack
| Category | Technology | Purpose |
|----------|-----------|---------|
| Language | TypeScript 5.3 | Full-stack development language |
| Framework | Next.js 14 | Full-stack React framework |
| ORM | Prisma 5.8 | Database access layer |
| Database | PostgreSQL 16 | Primary data storage |
| Cache | Redis 7 | Session and hot data caching |
| Testing | Vitest + Playwright | Unit and E2E testing |
## Repository Structure
```mermaid
graph TD
Root["myapp/"]
Root --> App["app/ - Next.js App Router"]
Root --> Lib["lib/ - Shared Business Logic"]
Root --> Components["components/ - UI Components"]
Root --> Prisma["prisma/ - Database Schema"]
Root --> Tests["tests/ - Test Files"]
App --> API["api/ - API Routes"]
App --> Pages["(routes)/ - Pages"]
Lib --> Services["services/ - Business Services"]
Lib --> Utils["utils/ - Utility Functions"]graph LR
Client["Client"] --> AppRouter["App Router"]
AppRouter --> Auth["Auth System"]
AppRouter --> API["API Layer"]
API --> OrderService["Order Service"]
API --> ProductService["Product Service"]
API --> PaymentService["Payment Service"]
OrderService --> DB["PostgreSQL"]
ProductService --> DB
ProductService --> Cache["Redis"]
PaymentService --> Stripe["Stripe API"]lib/services/order.tsapp/api/orders/route.tsprisma/schema.prismalib/validators/order.tscomponents/order/OrderForm.tsxstateDiagram-v2
[*] --> Created: User places order
Created --> Paying: Initiate payment
Paying --> Paid: Payment successful
Paying --> Cancelled: Payment timeout/failure
Paid --> Shipping: Merchant ships
Shipping --> Completed: Delivery confirmed
Completed --> [*]
Cancelled --> [*]
## Language/Framework Adaptation
Adjust analysis focus based on project type:
| Project Type | Analysis Focus |
|-------------|---------------|
| Node.js/TypeScript | package.json, tsconfig, module exports |
| Go | go.mod, package structure, interface definitions |
| Python | pyproject.toml, package structure, class hierarchy |
| Rust | Cargo.toml, crate structure, trait definitions |
| Java/Kotlin | pom.xml/build.gradle, package structure, class hierarchy |
| Monorepo | workspace config, inter-package dependencies, build order |
| Frontend SPA | routing structure, state management, component tree |
| Backend API | route definitions, middleware chain, data models |
| CLI Tool | command structure, argument parsing, subcommands |