Skip to main content

Autoโ€‘Documented Component Structure

JCB automatically generates humanโ€‘readable documentation for your componentโ€™s architecture โ€” detailing its views, fields, templates, models, permissions, and logic

๐Ÿ“‹ What Is It?

Joomla Component Builder (JCB) includes a documentation engine that automatically extracts and compiles structural information from your componentโ€™s blueprint. This includes:

  • Admin Views & Site Views
  • Field definitions (types, constraints, bindings)
  • Dynamic GETs and linked tables
  • Snippets, Layouts, Templates
  • Menu and Route settings
  • Permissions, Field ACL, Custom Code hooks

It creates a hierarchical breakdown of how your component is built โ€” and this documentation can be compiled into:

  • Markdown (.md) files
  • README files (per entity or full component)
  • JSON/HTML exports (for advanced workflows)
  • Build summary reports

๐Ÿ“ฆ Whatโ€™s Included in the Structure Docs?

A typical auto-documentation export includes:

๐Ÿงฉ Component Overview

  • Component Name, Namespace, Slug
  • Joomla Version Compatibility
  • Created/Last Compiled Date
  • Total Views, Fields, Files, Layouts

๐Ÿง  View Breakdown

  • Admin Views & Site Views listed by name
  • Linked tables, field counts, template/layout binding
  • ACL settings per view

๐Ÿงพ Field Table

  • Field names, types, required/unique/nullable flags
  • Save/get hooks
  • Display settings (list/edit/config)
  • Associated models

๐Ÿ“š Templates & Layouts

  • List of all layouts and templates in use
  • Files generated for each (e.g., tmpl/default.php, layout_list.php)
  • Snippets and JS/CSS libraries linked per template

๐Ÿ”— Relationships & Logic

  • Subform relations between views
  • Dynamic GETs and related joins
  • Menu entries and routes
  • Joomla Update Server support settings

๐Ÿ“œ Code Metadata

  • Custom code injection points
  • Insert/replace tag references
  • Snippet/Template/Field reuse counts

๐Ÿ” Where It Appears

  • Build Summary modal (during compile)
  • Per-component README.md
  • Internal JCB documentation dashboard
  • Can be exported manually for publishing
  • Optionally embedded in distribution ZIPs

โœ… Why It Matters

  • Enables onboarding new developers without reverse engineering
  • Makes refactoring safer by exposing component structure
  • Supports maintainers by documenting how the component was built
  • Enhances transparency when sharing or publishing your work

๐Ÿ’ก Pro Tips

  • Enable README auto-generation in the compiler settings
  • Use the Entity-level โ€œREADME Viewโ€ to preview or export per-view documentation
  • Integrate with Git commits to track structural changes over time

๐Ÿ“ Conclusion

Autoโ€‘Documented Component Structure is more than a convenience โ€” it's an essential companion for long-term maintainability and collaborative development. By having clear, version-controlled documentation built right into your JCB workflow, your components stay understandable, testable, and future-ready.