Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 88 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ anyhow = "1.0"
clap = { version = "4.5.2", features = ["derive"] }
handlebars = "5.1.0"

[dev-dependencies]
tempfile = "3.8"

[lib]
name = "creator"
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Creator
# Creator v2.0 🚀

[![Code Quality](https://github.com/andraderaul/creator/actions/workflows/quality.yml/badge.svg)](https://github.com/andraderaul/creator/actions/workflows/quality.yml) [![Release](https://github.com/andraderaul/creator/actions/workflows/release.yml/badge.svg)](https://github.com/andraderaul/creator/actions/workflows/release.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

Expand All @@ -19,19 +19,24 @@

## Features

This is the current roadmap for **Creator**:
**Creator v2.0** is a complete architectural rewrite with powerful new capabilities:

- [x] **Folder Structure Definition**: Define and customize your project's folder structure using a `config.json` file.
- [x] **Dynamic Configuration System**: 100% configuration-driven CLI with no hardcoded commands
- [x] **Flexible Project Structures**: Support for any project architecture via JSON configuration
- [x] **Static & Dynamic Categories**: Create both predefined items and dynamic items at runtime
- [x] **Interactive CLI**: Rich hierarchical navigation with helpful error messages
- [x] **Template Engine**: Full Handlebars template support for consistent code generation
- [x] **Auto-Discovery**: Automatic detection of config files and source directories
- [x] **Preset System**: Ready-to-use presets for Clean Architecture and Module-based patterns
- [x] **CLI Commands**: Modern command interface with `create`, `list`, and `init` commands
- [x] **Performance Optimized**: <100ms startup time with efficient config parsing
- [x] **Graceful Error Handling**: Helpful error messages with quick-fix suggestions

- [x] **Source Directory Definition**: Define and customize where your project's folder structure will be created.
### **Breaking Changes from v1**:

- [x] **Generate Code Definition**: Generate code based on the config file.

- [ ] **CLI Interface**: Use a simple and intuitive command-line interface to create:
- [x] new features
- [x] new core
- [x] new application
- [ ] new subdirectory based on the config file
- ❌ Removed hardcoded commands (`new-feature`, `new-core`, etc.)
- ✅ New dynamic system with unlimited configurability
- ✅ Migration path available via `creator init` command

## Downloading Artifacts

Expand Down
77 changes: 77 additions & 0 deletions config-clean-architecture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"project": {
"name": "my-react-native-clean-app",
"version": "2.0",
"structure": {
"infra": {
"description": "External configurations and integrations",
"children": {
"clients": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"providers": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"config": {
"template": "templates/default.hbs",
"file_extension": "ts"
}
}
},
"features": {
"description": "Business features with dynamic creation support",
"allow_dynamic_children": true,
"default_structure": {
"modules": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"services": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"hooks": {
"template": "templates/hooks.hbs",
"file_extension": "ts"
}
}
},
"pages": {
"description": "Application pages/screens",
"children": {
"dashboard": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"login": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"profile": {
"template": "templates/components.hbs",
"file_extension": "tsx"
}
}
},
"core": {
"description": "Core utilities and shared code",
"children": {
"types": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"utils": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"hooks": {
"template": "templates/hooks.hbs",
"file_extension": "ts"
}
}
}
}
}
}
88 changes: 88 additions & 0 deletions config-module-based.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"project": {
"name": "my-react-native-modular-app",
"version": "2.0",
"structure": {
"application": {
"description": "Main application layer",
"children": {
"modules": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"core": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"design-system": {
"template": "templates/components.hbs",
"file_extension": "tsx"
}
}
},
"modules": {
"description": "Business modules with full dynamic support",
"allow_dynamic_children": true,
"default_structure": {
"containers": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"components": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"services": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"types": {
"template": "templates/default.hbs",
"file_extension": "ts"
}
}
},
"shared": {
"description": "Shared utilities and components",
"children": {
"components": {
"template": "templates/components.hbs",
"file_extension": "tsx"
},
"hooks": {
"template": "templates/hooks.hbs",
"file_extension": "ts"
},
"utils": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"constants": {
"template": "templates/default.hbs",
"file_extension": "ts"
}
}
},
"external": {
"description": "External integrations and APIs",
"children": {
"apis": {
"template": "templates/default.hbs",
"file_extension": "ts"
},
"clients": {
"template": "templates/default.hbs",
"file_extension": "ts"
}
},
"allow_dynamic_children": true,
"default_structure": {
"client": {
"template": "templates/default.hbs",
"file_extension": "ts"
}
}
}
}
}
}
Loading