Template


πŸ“ Description

Display template information and directory structure. The template command provides comprehensive information about available Gexd templates, their architecture patterns, directory structures, and usage recommendations to help you make informed decisions for your Flutter projects.


βš™οΈ Usage

gexd info template [template_name] [options]

πŸ“– Detailed Usage

Display template information and structure

Usage: gexd info template [template_name] [options]

Arguments:
  <template_name>    Template to display (getx, clean)
                     [Optional: Shows all templates if not specified]

Options:
  --full             Show full directory structure including optional components

Examples:
  gexd info template                  # List all available templates
  gexd info template clean            # Show clean template details
  gexd info template clean --full     # Show full directory structure
  gexd info template getx --full      # Show GetX template with full structure

🎯 Key Features

πŸ“š Template Overview

  • Complete Template List: Display all available architecture templates

  • Detailed Descriptions: Comprehensive explanation of each template's approach

  • Best Use Cases: Recommended scenarios and project types

  • Key Features: Architecture-specific capabilities and benefits

πŸ“ Directory Structure

  • Basic Structure: Essential directories and organization

  • Full Structure: Complete directory tree with optional components

  • Visual Tree: Beautiful ASCII tree representation

  • Component Descriptions: Explanation of each directory's purpose

πŸ—οΈ Architecture Information

  • Design Principles: Underlying architectural patterns

  • Organization Strategy: How code is structured and organized

  • Development Workflow: Recommended development approaches

  • Best Practices: Template-specific conventions and guidelines


πŸš€ Usage Modes

1️⃣ List All Templates

Output:

2️⃣ Template Details (Basic)

Output:

3️⃣ Complete Structure (Full)

Shows the complete directory tree with all optional components and detailed descriptions.


πŸ—οΈ Template Comparison

πŸ“Š GetX Template

🎯 Architecture Overview

  • Pattern: Feature-based modular architecture

  • State Management: GetX reactive programming

  • Organization: Module-centric structure

  • Dependencies: Built-in GetX ecosystem

✨ Key Strengths

  • Rapid Development: Minimal boilerplate, quick setup

  • Reactive Programming: Built-in state management and reactivity

  • Integrated Ecosystem: Routing, dependency injection, internationalization

  • Learning Curve: Gentle for developers familiar with GetX

🎯 Best For

  • Medium to Large Apps: Suitable for complex applications

  • Rapid Prototyping: Quick MVP development

  • GetX Enthusiasts: Teams comfortable with GetX patterns

  • Feature-Rich Apps: Applications requiring extensive functionality

πŸ“ Directory Highlights

πŸ›οΈ Clean Architecture Template

🎯 Architecture Overview

  • Pattern: Layered architecture with dependency inversion

  • State Management: Framework-agnostic (can use any)

  • Organization: Layer-centric structure

  • Dependencies: Minimal, focused on business logic

✨ Key Strengths

  • High Testability: Clear separation enables comprehensive testing

  • Framework Independence: Business logic isolated from UI framework

  • Scalability: Designed for large, complex applications

  • Maintainability: Clear boundaries and dependencies

🎯 Best For

  • Enterprise Applications: Large-scale business applications

  • Complex Business Logic: Applications with intricate rules

  • Long-term Projects: Applications requiring long-term maintenance

  • Team Development: Large development teams with clear responsibilities

πŸ“ Directory Highlights


πŸ” Directory Structure Analysis

πŸ“‚ Component Categories

πŸ›οΈ Core Components (Both Templates)

  • core/: Fundamental application infrastructure

  • shared/: Reusable components across features

  • assets/: Static resources and files

πŸ“Š Data Management

  • GetX: lib/app/data/ with models, services, providers

  • Clean: lib/infrastructure/ with repositories, datasources

🎨 Presentation Layer

  • GetX: lib/app/modules/ with feature-based organization

  • Clean: lib/presentation/ with layered organization

🧠 Business Logic

  • GetX: Embedded within modules and services

  • Clean: Isolated in lib/domain/ layer

πŸ”§ Optional Components (Shown with --full)

  • Middleware: Request/response processing

  • Extensions: Dart type extensions

  • Exceptions: Custom error handling

  • Interfaces: Contract definitions

  • Utils: Helper functions and utilities


πŸ’‘ Making Template Decisions

πŸ€” Decision Framework

Choose GetX Template When:

  • βœ… Rapid development is prioritized

  • βœ… Team is familiar with GetX ecosystem

  • βœ… Building medium to large applications

  • βœ… Want integrated state management solution

  • βœ… Prefer feature-based organization

Choose Clean Architecture When:

  • βœ… Building enterprise-grade applications

  • βœ… Complex business logic requirements

  • βœ… High testability is critical

  • βœ… Framework independence is important

  • βœ… Large development team with specialized roles

πŸ“Š Comparison Matrix

Aspect
GetX Template
Clean Architecture

Learning Curve

Moderate

Steep

Development Speed

Fast

Moderate

Testability

Good

Excellent

Scalability

Good

Excellent

Framework Coupling

High (GetX)

Low

Boilerplate

Low

Moderate

Team Size

Small-Medium

Medium-Large

Business Complexity

Moderate

High


πŸš€ Real-World Usage Examples

πŸ” Template Research

πŸ“š Team Education

πŸ—οΈ Project Planning

πŸ“– Documentation Generation


🎨 Advanced Usage Patterns

πŸ”¬ Architecture Analysis

πŸ“‹ Project Setup Workflow

πŸ”§ Development Integration


πŸ“Š Structure Output Formats

🌳 Tree Structure Format

πŸ“‹ Component Descriptions

Each directory includes:

  • πŸ“ Icon: Visual identification

  • Name: Directory/file name

  • # Comment: Purpose and usage description

🎯 Organizational Logic

  • Hierarchical: Shows parent-child relationships

  • Categorized: Groups related components

  • Descriptive: Explains purpose of each component

  • Visual: Easy to scan and understand


❓ Troubleshooting

Common Issues

❌ "Unknown template: template_name"

❌ Command not displaying properly

❌ Structure seems incomplete

πŸ”§ Advanced Troubleshooting

Template Updates

Comparison Issues


πŸ“‹ Project Creation

  • gexd create - Create new project with chosen template

  • gexd init - Initialize existing project with template

πŸ”§ Project Management

πŸ› οΈ Development

  • gexd make - Generate components following template structure

  • gexd locale generate - Add internationalization


πŸ“š Further Reading

πŸ—οΈ Architecture Guides

πŸ“– Best Practices


Generated automatically by gexd_doc

Last updated