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