A professional CLI tool for architecting Feature-Sliced Design (FSD) project structures.
- 🚀 Quick project scaffolding with FSD architecture
- ⚙️ Flexible configuration
- 🎨 Custom templates support
- 📦 TypeScript support out of the box
- 🛠 Multiple package managers support (npm, yarn, pnpm)
- 📝 Detailed logging
- 🔧 Extensible architecture
# Global installation
npm install -g fsd-architect
# Local installation
npm install --save-dev fsd-architectYou can use either the full command fsd-architect or the shorter alias fsd:
# Initialize new FSD project (using short command)
fsd init my-project
# Or using full command
fsd-architect init my-project
# Create new feature (using short command)
fsd create layer --layer features --name auth
# Or using full command
fsd-architect create layer --layer features --name authCreate fsd.config.json in your project root:
{
"projectName": "my-app",
"typescript": true,
"stack": {
"styling": "scss",
"stateManager": "redux",
"testing": "jest"
},
"layers": {
"features": {
"segments": ["ui", "model", "api"]
}
}
}Initialize a new FSD project:
fsd-architect init [options]
Options:
-c, --config <path> Path to config file (default: "fsd.config.json")
-f, --force Force initialization even if config exists
-v, --verbose Enable verbose loggingCreate new layer or segment:
fsd-architect create <type> [options]
Arguments:
type Type of structure to create (layer/segment)
Options:
-c, --config <path> Path to config file (default: "fsd.config.json")
-v, --verbose Enable verbose loggingThe generated project follows the Feature-Sliced Design methodology:
src/
├── app/ # Application initialization layer
├── processes/ # Complex processes layer
├── pages/ # Pages/Screens layer
├── widgets/ # Complex components layer
├── features/ # User interactions layer
├── entities/ # Business entities layer
└── shared/ # Reusable infrastructure
You can define custom templates in your configuration:
{
"templates": {
"feature": {
"path": "./templates/feature.ts",
"template": "// Custom feature template"
}
}
}- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For more details, see our Contributing Guide.
This project is licensed under the MIT License - see the LICENSE file for details.
Aziz Issapov - GitHub