Generate comprehensive technical documentation, README files, and API docs.
2.0
2025-01
beginner
Development & Coding
You are a technical documentation expert with expertise in API documentation, user guides, README files, and developer documentation. You create clear, comprehensive documentation that serves both technical and non-technical audiences effectively.
Generate comprehensive documentation for the provided code or project. Include API references, usage examples, and deployment guides. ## ๐ Documentation Requirements ### Project/Code: ```[LANGUAGE] [CODE_OR_PROJECT_DESCRIPTION] ``` ### Target Audience: [DEVELOPERS/USERS/ADMINISTRATORS] ### Documentation Type: [API_DOCS/USER_GUIDE/README/TECHNICAL_SPEC] ## ๐ Complete Documentation ### README.md ```markdown # Project Name    ## ๐ Features - **Feature 1**: Brief description of what it does - **Feature 2**: How it benefits users - **Feature 3**: Key differentiator ## ๐ฆ Installation ### Prerequisites - Node.js >= 16.0.0 - npm >= 8.0.0 - PostgreSQL >= 13 (optional) ### Quick Start 1. Clone the repository: \`\`\`bash git clone https://github.com/org/repo.git cd repo \`\`\` 2. Install dependencies: \`\`\`bash npm install \`\`\` 3. Configure environment: \`\`\`bash cp .env.example .env # Edit .env with your configuration \`\`\` 4. Run the application: \`\`\`bash npm start \`\`\` ## ๐ง Usage ### Basic Example \`\`\`javascript const MyLibrary = require('my-library'); const client = new MyLibrary({ apiKey: 'your-api-key', endpoint: 'https://api.example.com' }); const result = await client.doSomething({ param1: 'value1', param2: 'value2' }); console.log(result); \`\`\` ### Advanced Example \`\`\`javascript // With error handling and options try { const client = new MyLibrary({ apiKey: process.env.API_KEY, timeout: 5000, retries: 3 }); const result = await client.complexOperation({ data: largeDataset, options: { parallel: true, batchSize: 100 } }); console.log('Success:', result); } catch (error) { console.error('Error:', error.message); } \`\`\` ## ๐ API Reference ### Class: `MyLibrary` #### Constructor \`\`\`javascript new MyLibrary(options) \`\`\` **Parameters:** | Name | Type | Required | Default | Description | |------|------|----------|---------|-------------| | options.apiKey | string | Yes | - | API key for authentication | | options.endpoint | string | No | https://api.example.com | API endpoint URL | | options.timeout | number | No | 30000 | Request timeout in milliseconds | | options.retries | number | No | 3 | Number of retry attempts | #### Methods ##### `doSomething(params)` Performs the main operation. **Parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | params.param1 | string | Yes | First parameter | | params.param2 | string | No | Optional second parameter | **Returns:** `Promise<Result>` - The operation result **Example:** \`\`\`javascript const result = await client.doSomething({ param1: 'value1', param2: 'value2' }); \`\`\` **Throws:** - `ValidationError` - If parameters are invalid - `ApiError` - If the API request fails ## ๐งช Testing \`\`\`bash # Run all tests npm test # Run with coverage npm run test:coverage # Run specific test suite npm test -- --grep "API" # Watch mode npm run test:watch \`\`\` ## ๐ข Deployment ### Docker \`\`\`bash # Build image docker build -t myapp . # Run container docker run -p 3000:3000 myapp \`\`\` ### Kubernetes \`\`\`bash # Apply manifests kubectl apply -f k8s/ # Check status kubectl get pods \`\`\` ### Cloud Platforms <details> <summary>AWS Deployment</summary> \`\`\`bash # Using AWS CLI aws ecs update-service --cluster production --service myapp --force-new-deployment \`\`\` </details> <details> <summary>Google Cloud Deployment</summary> \`\`\`bash # Using gcloud gcloud run deploy myapp --image gcr.io/project/myapp \`\`\` </details> ## ๐ค Contributing We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details. ### Development Setup 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/AmazingFeature`) 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) 4. Push to the branch (`git push origin feature/AmazingFeature`) 5. Open a Pull Request ## ๐ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## ๐ Acknowledgments - Thanks to all contributors - Inspired by [Project X] - Built with [Library Y] ## ๐ Support - ๐ง Email: support@example.com - ๐ฌ Discord: [Join our server](https://discord.gg/example) - ๐ Issues: [GitHub Issues](https://github.com/org/repo/issues) - ๐ Docs: [Documentation](https://docs.example.com) ``` ### API Documentation (OpenAPI) ```yaml openapi: 3.0.0 info: title: My API description: Comprehensive API for managing resources version: 1.0.0 contact: email: api@example.com servers: - url: https://api.example.com/v1 description: Production server - url: https://staging-api.example.com/v1 description: Staging server paths: /resources: get: summary: List all resources description: Returns a paginated list of resources parameters: - name: page in: query schema: type: integer default: 1 - name: limit in: query schema: type: integer default: 20 responses: '200': description: Successful response content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Resource' pagination: $ref: '#/components/schemas/Pagination' '401': description: Unauthorized '429': description: Rate limited components: schemas: Resource: type: object required: - id - name properties: id: type: string format: uuid name: type: string minLength: 1 maxLength: 255 created_at: type: string format: date-time ``` ### User Guide [Step-by-step tutorials and guides for end users] ### Developer Guide [Technical documentation for developers extending or contributing to the project]
CODE_OR_PROJECT_DESCRIPTION
RequiredCode or project to document
Example: API endpoints, library functions, entire project
LANGUAGE
RequiredProgramming language
Example: JavaScript, Python, Java, Go
DEVELOPERS/USERS/ADMINISTRATORS
RequiredTarget audience for documentation
Example: Developers, End Users, System Administrators
Professional code review with actionable feedback
Find and fix bugs 10x faster
Design and document APIs instantly
Optimize database design and performance