# FerrisUp Workspace Organization
This document outlines the logical organization of FerrisUp's codebase into workspaces that align with our new architecture.
## Workspace Overview
FerrisUp is organized into the following logical workspaces:
```
ferrisup/
├── core/ # Core functionality and shared utilities
├── project/ # Project generation and handling system
│ ├── handlers/ # Project handler implementations
│ └── templates/ # Template management system
├── commands/ # CLI commands implementation
└── utils/ # General utilities and helpers
```
## Workspace Details
### 1. Core
The **core** workspace contains the essential functionality of FerrisUp:
- Configuration management
- Error handling
- Core traits and interfaces
- Main application flow
Files in this workspace:
- `src/core/mod.rs` - Core workspace entry point
- `src/core/config.rs` - Configuration management
- `src/core/error.rs` - Error types and handling
### 2. Project
The **project** workspace handles all aspects of project generation:
#### 2.1 Handlers
The **handlers** subspace implements our new architecture for project handlers:
- `src/project/handlers/mod.rs` - Handler registration and lookup
- `src/project/handlers/traits.rs` - Common interfaces for all handlers
- `src/project/handlers/cli.rs` - CLI-based project handler
- `src/project/handlers/template.rs` - Template-based project handler
#### 2.2 Templates
The **templates** subspace manages template-based project generation:
- `src/project/templates/mod.rs` - Template system entry point
- `src/project/templates/manager.rs` - Template loading and application
- `src/project/templates/renderer.rs` - Template rendering
- `src/project/templates/variables.rs` - Variable substitution
### 3. Commands
The **commands** workspace implements the CLI commands:
- `src/commands/mod.rs` - Command registration
- `src/commands/new.rs` - Project creation command
- `src/commands/list.rs` - Template listing command
- Other command implementations
### 4. Utils
The **utils** workspace contains shared utilities and helpers:
- `src/utils/mod.rs` - Utils entry point
- `src/utils/file.rs` - File system operations
- `src/utils/prompt.rs` - User input handling
- `src/utils/spinner.rs` - Progress indicators
## Migration Strategy
To migrate to this workspace organization:
1. Create the new directory structure
2. Move existing code to appropriate locations
3. Update import paths
4. Refactor as needed to align with the new architecture
We'll approach this incrementally, starting with the core workspaces and then moving to the more specific ones, ensuring functionality is maintained throughout the process.
## Benefits of This Organization
- **Separation of Concerns**: Each workspace has a clear, focused responsibility
- **Ease of Navigation**: New contributors can quickly understand the codebase
- **Modularity**: Updates to one workspace minimally impact others
- **Testability**: Components can be tested in isolation
- **Extensibility**: New features can be added without global changes