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
gexd info templateOutput:
ποΈ Available Templates
ββββββββββββββββββββββββββββββββ
π GetX Standard Architecture (getx)
Description: Feature-based modular architecture with GetX state management.
Perfect for rapid development with reactive programming patterns.
Best For: Medium to large applications, rapid prototyping, GetX enthusiasts
π Clean Architecture (clean)
Description: Domain-driven design with clear separation of concerns.
Follows Uncle Bob's Clean Architecture principles for maximum maintainability.
Best For: Enterprise applications, complex business logic, long-term projects
π‘ Use gexd info template <name> --full to see detailed structure2οΈβ£ Template Details (Basic)
gexd info template cleanOutput:
ποΈ Clean Architecture Template
βββββββββββββββββββββββββββββββββββββββββββββββ
π Description:
Domain-driven design with clear separation of concerns.
Follows Uncle Bob's Clean Architecture principles for maximum maintainability.
π― Best For:
Enterprise applications, complex business logic, long-term projects
β¨ Key Features:
Layered architecture, dependency inversion principle,
high testability, framework independence, clear boundaries
π Directory Structure:
π Clean Architecture Template Structure
βββ π lib
β βββ π core # Core application foundation
β βββ π domain # Business logic layer
β βββ π infrastructure # External dependencies
β βββ π presentation # UI layer
β βββ π shared # Shared components
βββ π assets/ # Project assets
π‘ Use --full flag to see the complete directory structure3οΈβ£ Complete Structure (Full)
gexd info template clean --fullShows 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
lib/app/
βββ modules/ # Feature modules
β βββ auth/ # Authentication feature
β βββ home/ # Home feature
β βββ profile/ # User profile feature
βββ core/ # Core utilities
βββ data/ # Data layerποΈ 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
lib/
βββ domain/ # Business logic
β βββ entities/ # Core business objects
β βββ usecases/ # Business rules
βββ infrastructure/ # External dependencies
β βββ datasources/ # Data access
β βββ repositories/ # Data abstraction
βββ presentation/ # UI layer
βββ pages/ # Application screens
βββ controllers/ # UI controllersπ Directory Structure Analysis
π Component Categories
ποΈ Core Components (Both Templates)
core/: Fundamental application infrastructureshared/: Reusable components across featuresassets/: Static resources and files
π Data Management
GetX:
lib/app/data/with models, services, providersClean:
lib/infrastructure/with repositories, datasources
π¨ Presentation Layer
GetX:
lib/app/modules/with feature-based organizationClean:
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
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
# Explore all options before starting new project
gexd info template
# Deep dive into specific template
gexd info template clean --full
gexd info template getx --full
# Make informed decision based on project requirementsπ Team Education
# Onboard new team members
gexd info template clean --full
# Show architecture during code reviews
gexd info template getx
# Reference during architectural discussionsποΈ Project Planning
# Planning phase: Understand structure implications
gexd info template clean --full
# Pre-development: Align team on organization
gexd info template getx
# Architecture review: Validate chosen approachπ Documentation Generation
# Generate structure documentation for wikis
gexd info template clean --full > docs/architecture.md
# Create template comparison documents
gexd info template > docs/template-options.mdπ¨ Advanced Usage Patterns
π¬ Architecture Analysis
# Compare structures side by side
gexd info template getx --full > getx_structure.txt
gexd info template clean --full > clean_structure.txt
diff getx_structure.txt clean_structure.txtπ Project Setup Workflow
# 1. Research templates
gexd info template
# 2. Analyze specific template
gexd info template clean --full
# 3. Create project with informed choice
gexd create my_project --template clean
# 4. Verify structure matches expectations
cd my_project && ls -la lib/π§ Development Integration
# During development: Reference structure for component placement
gexd info template clean --full | grep -A5 "presentation"
# Architecture validation: Ensure compliance with template
gexd info template cleanπ Structure Output Formats
π³ Tree Structure Format
π Clean Architecture Template Structure
βββ π lib
β βββ π core # Core application foundation
β β βββ π bindings # Initial dependency bindings
β β βββ π themes # App theme definitions
β βββ π domain # Business logic layer
β β βββ π entities # Core business objects
β β βββ π usecases # Business rules
β βββ π presentation # UI layer
β βββ π pages # Application screens
β βββ π controllers # UI controllers
βββ π assets/ # Project assetsπ 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"
# Problem: Invalid template name provided
gexd info template invalid_name
# Error: Unknown template: invalid_name
# β
Solution: Check available templates
gexd info template # Shows all available templatesβ Command not displaying properly
# Problem: Terminal encoding issues
gexd info template clean --full
# Output appears garbled
# β
Solution: Ensure UTF-8 terminal support
export LANG=en_US.UTF-8
gexd info template clean --fullβ Structure seems incomplete
# Problem: Basic structure missing details
gexd info template clean
# Shows minimal structure
# β
Solution: Use --full flag for complete structure
gexd info template clean --fullπ§ Advanced Troubleshooting
Template Updates
# If template structure seems outdated
gexd self-update # Update to latest version
gexd info template clean --full # Get latest structureComparison Issues
# For detailed template comparison
gexd info template getx --full > /tmp/getx.txt
gexd info template clean --full > /tmp/clean.txt
code --diff /tmp/getx.txt /tmp/clean.txt # Visual comparisonπ Related Commands
π Project Creation
gexd create- Create new project with chosen templategexd init- Initialize existing project with template
π§ Project Management
gexd info config- Check current project templategexd upgrade- Update project to latest template
π οΈ Development
gexd make- Generate components following template structuregexd locale generate- Add internationalization
π Further Reading
ποΈ Architecture Guides
π Best Practices
Generated automatically by gexd_doc
Last updated