genericmilk/docudoodle
AI-powered PHP documentation generator that analyzes your codebase and creates comprehensive Markdown docs. Supports smart caching, skips existing docs, and enables quick top-up runs. Great for onboarding teams to undocumented apps fast.
php artisan docudoodle:generate), making it a seamless fit for Laravel-based applications. Leverages Laravel’s service container, configuration system, and console components.composer require and minimal configuration (API keys, output paths). No database migrations or schema changes are needed..env) and configuration publishing (vendor:publish).| Risk Area | Assessment | Mitigation |
|---|---|---|
| AI Provider Dependencies | Relies on external APIs (OpenAI, Claude, Gemini) or local Ollama. Cost (OpenAI tokens) and rate limits could impact large codebases. | - Use Ollama for offline/private environments. - Implement token budgeting (configurable max_tokens). - Cache aggressively to minimize API calls. - Monitor usage via DOCUDOODLE_API_PROVIDER. |
| Configuration Complexity | Supports 10+ config options (API keys, models, skip dirs, etc.). Misconfiguration (e.g., wrong API key) could break generation. | - Publish default config (vendor:publish) for team alignment. - Use .env validation (e.g., Laravel’s env() helpers). - Provide sandboxed testing (e.g., --dry-run flag). |
| Output Quality | AI-generated docs may contain inaccuracies or hallucinations, especially for complex logic (e.g., legacy spaghetti code). | - Customize prompts via DOCUDOODLE_PROMPT_TEMPLATE. - Human review workflow (e.g., Jira/Confluence integration for approval). - Start with small subsets of code. |
| Performance | Large codebases (e.g., 10K+ files) could exhaust memory or time out during generation. | - Parallel processing: Extend to use Laravel Queues for async generation. - Chunking: Process files in batches (e.g., by directory). - Exclude tests/vendor via skip_dirs. |
| Security | API keys (OpenAI, Jira, Confluence) may be exposed in .env or logs. |
- Use Laravel’s env() masking in logs. - Restrict .env permissions (chmod 600). - Rotate keys via CI/CD (e.g., DOCUDOODLE_API_KEY as secret). |
AI Provider Strategy:
Documentation Workflow:
Quality Assurance:
Scaling:
Maintenance:
| Phase | Action | Tools/Commands |
|---|---|---|
| Pilot | Test on a small code subset (e.g., 1 module). Validate output quality and API costs. | composer require genericmilk/docudoodle php artisan vendor:publish --tag=docudoodle-config |
| Configuration | Set up .env with API keys, output paths, and skip directories. |
Edit .env Customize config/docudoodle.php |
| Integration | Add to CI/CD pipeline (e.g., run after tests). | GitHub Actions: php artisan docudoodle:generate --no-cache |
| Workflow Adoption | Train team on reviewing docs (Jira/Confluence) or customizing prompts. | Slack/email training Custom DOCUDOODLE_PROMPT_TEMPLATE |
| Scaling | For large codebases: batch processing (e.g., by directory) or queue workers. | Laravel Queues Custom Artisan command extensions |
| Component | Compatibility | Notes |
|---|---|---|
| Laravel Version | 10.x–13.x (explicitly tested). | Check illuminate/console constraints in composer.json. |
| PHP Version | 8.1–8.5 (supports 8.5 features like curl_close() removal). |
Avoid deprecated functions (e.g., curl_close()). |
| AI Providers | OpenAI (v1), Claude, Gemini, Azure OpenAI, Ollama. | Validate API response schemas for each provider. |
| Output Systems | Markdown (GitHub/GitLab), Jira, Confluence. | Requires guzzlehttp/guzzle for Jira/Confluence. |
| Legacy Code | PHP 5.6+ (analyzed via AST), YAML, and custom file extensions. | Test with complex legacy logic (e.g., procedural code, dynamic classes). |
Pre-requisites:
composer require genericmilk/docudoodle.php artisan vendor:publish --tag=docudoodle-config..env (API keys, output paths).Initial Run:
--skip-dirs="tests/*").CI/CD Integration:
- name: Generate Documentation
run: php artisan docudood
How can I help you explore Laravel packages today?