Date: 2025-02-23
Status
Accepted
Context
We need a clear and maintainable project structure that:
- Separates concerns appropriately
- Makes dependencies clear
- Supports testing
- Handles configuration cleanly
- Organizes book assets effectively
Decision
We will implement the following project structure:
-
Code Organization
src/ ├── lib/ │ ├── book_processing/ # Book-specific logic │ ├── system/ # System-level operations │ ├── package_managers/ # Package management │ └── config/ # Configuration └── utils/ # CLI tools -
Asset Organization
content/ ├── metadata/ # Book metadata ├── chapters/ # Book content ├── images/ # Image assets └── templates/ # Layout templates -
Configuration Management
- YAML for metadata
- Environment-specific configs
- Clear validation rules
- Centralized defaults
-
Test Organization
spec/ ├── scripts/ # Mirrors src structure ├── support/ # Test helpers └── fixtures/ # Test data
Consequences
Positive
- Clear separation of concerns
- Intuitive file locations
- Easy to add new components
- Testable structure
- Consistent organization patterns
Negative
- More directories to maintain
- Need to document structure
- Must enforce organization rules
- Deeper file paths