Composable fullstack project generator
DryDrop is a composable full-stack project generator written in Rust. Its goal is to let you assemble a clean, maintainable full-stack project skeleton by choosing building blocks (web frameworks, databases, auth, UI, etc.) like Lego pieces.
- Modular Composition: Declare the modules your project needs; dependencies, conflicts, and file merging are handled automatically.
- Virtual File System (VFS): Build and merge file trees entirely in memory with support for diff/patch/merge operations.
- Template Rendering: Strong-typed templates powered by Askama for high-quality generated code.
- Plugin System: Inject custom logic at various stages of generation via hooks.
- Template Registry: Search, install, and update remote templates and modules.
- Multiple Interfaces: CLI, TUI, and Desktop app (planned).
- Safe File Operations: Read/write with automatic backups, suitable for updating existing projects.
DryDrop is organized as a Cargo workspace. Core logic lives under crates/, while user-facing applications are under apps/.
.
βββ apps/
β βββ cli/ # Command-line interface (drydrop)
β βββ tui/ # Terminal UI (planned)
β βββ desktop/ # Desktop application (planned)
β
βββ crates/
β βββ drydrop-core/ # Core domain models
β β βββ project/ # Project / ProjectName
β β βββ module/ # Module / ModuleId / ModuleName
β β βββ dependency.rs # Module dependency declarations (required / conflicts)
β β βββ error.rs
β β
β βββ drydrop-vfs/ # Virtual File System
β β βββ path.rs # VfsPath
β β βββ node.rs # Node = File | Directory
β β βββ file/ # FileNode + FileContent
β β βββ directory/ # DirectoryNode
β β βββ tree.rs # File tree structure
β β βββ merge.rs # Merge strategy for files from multiple modules
β β
β βββ drydrop-template/ # Template abstraction and loading
β β βββ template/mod.rs # Template trait
β β βββ loader.rs # Template loader
β β βββ manifest.rs # Template manifest
β β βββ metadata.rs
β β
β βββ drydrop-generator/ # Generation pipeline
β β βββ planner.rs # Plan file operations based on modules
β β βββ resolver.rs # Resolve module dependency graph
β β βββ validator.rs # Validation (conflicts, missing dependencies, etc.)
β β βββ pipeline.rs # Execute the generation flow
β β βββ generator.rs
β β
β βββ drydrop-render/ # Rendering engine
β β βββ askama.rs # Askama integration
β β
β βββ drydrop-diff/ # diff / patch / merge
β β βββ ... # Used for incremental updates on existing projects
β β
β βββ drydrop-fs/ # Safe filesystem operations
β β βββ reader.rs
β β βββ writer.rs
β β βββ backup.rs # Automatic backup before writes
β β
β βββ drydrop-plugin/ # Plugin system
β β βββ plugin.rs
β β βββ context.rs # Plugin execution context
β β βββ hooks.rs # Lifecycle hooks
β β βββ exports.rs
β β
β βββ drydrop-registry/ # Template / plugin registry
β βββ registry.rs
β βββ search.rs
β βββ install.rs
β βββ update.rs
β
βββ templates/ # Built-in templates (Askama)
β βββ askama/
β βββ axum/
β βββ actix/
β
βββ examples/ # Example projects
βββ plugins/ # Plugin examples
User selects modules
β
βΌ
drydrop-core (Project + Modules + Dependencies)
β
βΌ
drydrop-registry (Resolve remote modules/templates)
β
βΌ
drydrop-generator
ββ resolver β Build dependency graph
ββ planner β Produce VFS operation plan
ββ validator β Conflict / dependency checks
ββ pipeline β Execute
β
βΌ
drydrop-vfs (Assemble final file tree in memory)
β
βΌ
drydrop-render (Askama template rendering)
β
βΌ
drydrop-fs (Write to disk with backup)
β
βΌ
drydrop-plugin (post-generate hooks)
- Rust (recommended to manage via mise)
- The project pins Rust 1.96.0 (see
mise.toml)
# Install the Rust version specified by the project
mise installcargo build --workspace# Show help
cargo run -p cli -- --help
# Create a new project (currently a placeholder)
cargo run -p cli -- new my-app# Check compilation (recommended during development)
cargo check --workspace
# Run tests
cargo test --workspace
# Build release
cargo build --release --workspace
# Build only the CLI
cargo build -p cli- Extend
Module/ModuleIddefinitions indrydrop-core. - Add discovery and installation support in
drydrop-registry. - Add corresponding Askama templates under
templates/. - Handle module-specific logic (route registration, DI, etc.) in
drydrop-generator's resolver/planner. - Implement hooks in
drydrop-pluginif custom behavior is needed.
Templates currently live in templates/askama/<framework>/.
- Files with the
.askamasuffix are processed by Askama. - Keep the template structure close to the final generated project to ease maintenance.
drydrop-vfs is a core abstraction. Files generated by multiple modules are merged using strategies defined in merge.rs.
Common merge strategies (to be implemented):
- Direct overwrite (new files)
- Append content (routes, dependencies, etc.)
- Smart merge (using diff/patch)
Currently uses drydrop-core::error::Result (a type alias over std::result::Result).
Future work may migrate to snafu for richer error context (already declared in the workspace).
| Hook Stage | Description |
|---|---|
pre_resolve |
Before dependency resolution |
post_resolve |
After dependency resolution |
pre_generate |
Before file generation |
post_generate |
After file generation (VFS ready) |
pre_write |
Before writing to disk |
post_write |
After writing to disk |
| Component | Status | Notes |
|---|---|---|
CLI (drydrop new) |
Skeleton | Command parsing done; real logic is stub |
| drydrop-core | Model defined | Project / Module / Dependency etc. |
| drydrop-vfs | Model defined | Basic node and path structures |
| drydrop-template | Interface | Template trait + module layout |
| drydrop-generator | Module layout | pipeline/resolver/etc. modules created |
| Other crates | Placeholder | Most implementations are empty |
| Templates | Directories | Files are empty; real templates pending |
Total code: ~200 lines of effective Rust (as of the initial commit).
This is a very early-stage project and is intended as a foundation for long-term evolution.
-
MVP Generation Flow
- Make
drydrop new <name> --template axumproduce a runnable project - Complete Askama rendering + VFS write path
- Make
-
Module System
- Define built-in modules (web, db, auth, ...)
- Implement dependency resolution + conflict detection
-
VFS Merge Strategies
- File-level and content-level merging
- Support
drydrop add <module>on existing projects
-
Plugin System
- Define Hook traits
- Implement a simple example plugin
-
Registry
- Local template index
- Later: remote repository support
-
TUI / Desktop
- Interactive module selection UI
| Path | Responsibility |
|---|---|
apps/cli |
CLI entry point + subcommand implementations |
crates/drydrop-core |
Domain models (prefer immutable data) |
crates/drydrop-vfs |
In-memory file tree + merge logic |
crates/drydrop-generator |
Generation orchestration (most complex core) |
crates/drydrop-template |
Template abstraction and loading |
crates/drydrop-render |
Concrete renderer (Askama) |
crates/drydrop-registry |
Distribution of templates/modules/plugins |
crates/drydrop-plugin |
Extension points and lifecycle hooks |
crates/drydrop-fs |
Disk I/O + backup |
crates/drydrop-diff |
Diff & patch (for incremental updates) |
templates/ |
Built-in template sources |
Contributions of any kind are welcome! At this stage, the most valuable contributions include:
- Implementing core logic in any crate
- Writing the first working Askama template
- Designing and implementing the module dependency resolver
- Adding tests and documentation
Before submitting a PR, please ensure:
cargo check --workspace
cargo test --workspace
cargo clippy --workspace -- -D warningsMIT Β© 2026 NotNOne
- Askama β Type-safe template engine
- Clap β Command line argument parsing
- Snafu β Error handling
Note: This project is in an early design and scaffolding phase. The README will be updated continuously as implementation progresses. Before developing, it's recommended to first explore the module layout and public APIs of the relevant crates.
Chinese Documentation: See Docs/README_zh_CN.md