Discusión

Habilidades de Documentación WIKI del Codebase

De Wikiprompt, la enciclopedia libre de prompts

Sébastien Celles

27 dic 2025

Habilidades de Documentación WIKI del Codebase Un mensaje de sistema para generar documentación completa de WIKI.md para bases de código utilizando análisis LSP y diagramas de Mermaid.

Contenido del PromptGuardar

🌐
# WIKI.md - Codebase Documentation ## 1. Project Overview ### Tech Stack - **Language**: [Detected from configuration files] - **Framework**: [Framework if applicable] - **Key Dependencies**: [List primary dependencies] ### Dependencies ```json // Example for Node.js projects { "dependencies": { "express": "^4.18.0", "typescript": "^5.0.0" } } ``` ## 2. Architecture ```mermaid flowchart TB subgraph Client["Client Layer"] UI[User Interface] API[API Client] end subgraph Server["Server Layer"] Routes[Route Handlers] Controllers[Controllers] Services[Business Logic] Repos[Data Repositories] end subgraph Data["Data Layer"] DB[(Database)] Cache[(Cache)] end UI --> API API --> Routes Routes --> Controllers Controllers --> Services Services --> Repos Repos --> DB Services --> Cache ``` ## 3. Project Structure ``` project-root/ ├── src/ │ ├── main.py # Entry point │ ├── core/ # Core business logic │ ├── models/ # Data models │ ├── services/ # Service layer │ └── utils/ # Utility functions ├── tests/ # Test suite ├── config/ # Configuration files ├── docs/ # Documentation ├── package.json # Dependencies (if Node.js) ├── pyproject.toml # Python dependencies └── README.md ``` ## 4. Core Components ### 4.1 Main Entry Point ```python # main.py class Application: """Main application class""" def __init__(self): self.config = load_config() self.initialize_services() def run(self): """Start the application""" pass ``` ### 4.2 Key Functions | Function | Description | Parameters | Returns | |----------|-------------|------------|---------| | `initialize()` | Setup application | `config: dict` | `None` | | `process_data()` | Handle data processing | `data: Any` | `Result` | ### 4.3 API Endpoints ```typescript // Example API route app.get('/api/v1/resource', async (req, res) => { const data = await service.getResource(req.params.id); res.json(data); }); ``` ## 5. Data Flow ```mermaid sequenceDiagram participant User participant API participant Service participant Database User->>API: HTTP Request API->>Service: Validate & Process Service->>Database: Query Data Database-->>Service: Return Results Service-->>API: Format Response API-->>User: JSON Response ``` ## 6. Data Model ### 6.1 Entity Relationship Diagram ```mermaid erDiagram USER ||--o{ ORDER : places USER { int id PK string name string email } ORDER ||--|{ ORDER_ITEM : contains ORDER { int id PK int user_id FK datetime created_at } ORDER_ITEM { int id PK int order_id FK int product_id FK int quantity } ``` ### 6.2 Class Diagram ```mermaid classDiagram class User { +int id +string name +string email +login() bool +logout() void } class Order { +int id +datetime created_at +calculateTotal() float } User "1" --> "many" Order : places ``` ## 7. API Reference ### 7.1 REST Endpoints #### GET /api/v1/items - **Description**: Retrieve all items - **Parameters**: - `page` (optional): Page number - `limit` (optional): Items per page - **Response**: `200 OK` with array of items #### POST /api/v1/items - **Description**: Create new item - **Request Body**: ```json { "name": "string", "description": "string" } ``` - **Response**: `201 Created` with item details ### 7.2 Internal Functions #### `processItem(item: Item): Result` - **Purpose**: Process individual item - **Throws**: `ValidationError` if item invalid - **Returns**: Processing result ## 8. Configuration ### 8.1 Environment Variables | Variable | Default | Description | |----------|---------|-------------| | `PORT` | `3000` | Server port | | `DATABASE_URL` | - | Database connection string | | `LOG_LEVEL` | `info` | Logging level | ### 8.2 Configuration File ```yaml # config.yaml server: port: 3000 host: 0.0.0.0 database: host: localhost port: 5432 name: myapp ``` ## 9. Getting Started ### Prerequisites - [Language runtime version] - Package manager - Database (if applicable) ### Installation ```bash # Clone repository git clone https://github.com/your-repo/project.git cd project # Install dependencies npm install # or pip install -r requirements.txt # Configure environment cp .env.example .env # Run migrations npm run migrate # or python manage.py migrate # Start development server npm run dev # or python main.py ``` ### Quick Start Example ```python from src.main import Application app = Application() app.run() ``` ## 10. Development Guide ### Code Style - Follow [language-specific style guide] - Use type hints (Python) / TypeScript types - Document all public functions ### Testing ```bash # Run unit tests npm test # or pytest # Run linting npm run lint # or flake8 ``` ### Git Workflow 1. Create feature branch from `main` 2. Implement changes with tests 3. Run full test suite 4. Submit pull request ### Debugging - Use debugger with breakpoints - Enable verbose logging: `LOG_LEVEL=debug` - Check application logs in `logs/` directory ### Performance Considerations - Cache frequently accessed data - Use connection pooling for database - Implement pagination for large datasets ### Deployment ```bash # Build production bundle npm run build # or python setup.py build # Deploy to server docker build -t myapp . docker run -p 3000:3000 myapp ``` --- **Note**: This documentation was generated using LSP analysis. For codebase updates, regenerate this document to ensure accuracy.

Iniciá sesión para ver el prompt completo

Continuar con:

Al iniciar sesión, aceptás nuestros Términos de uso y Política de privacidad

Uso

Este prompt está diseñado para usarse con coding. Copiá el contenido de arriba y pegalo en tu herramienta de IA preferida.

Para mejores resultados, personalizá los marcadores (indicados con corchetes o mayúsculas) con tus requisitos específicos.

Referencias

Categorías:coding| prompts.chat| codebase-documentation| lsp-analysis

Discusión