Universal project scaffolder for React, FastAPI, and Flutter
Project description
๐ฅ DevForge
Universal project scaffolder for modern frameworks
DevForge is a powerful CLI tool that scaffolds production-ready projects with feature-based architecture for React, FastAPI, Flutter, and more. Built with extensibility in mind, adding new frameworks is as simple as creating a single file.
โจ Features
- ๐ฏ Feature-Based Architecture: Organizes code by features, not file types
- ๐ Highly Extensible: Add new frameworks in minutes
- ๐จ Best Practices: Follows industry standards for each framework
- ๐ Zero Configuration: Works out of the box
- ๐ก Interactive CLI: Friendly prompts guide you through setup
- ๐ฆ Multiple Frameworks: React, FastAPI, Flutter (and growing!)
๐ Quick Start
Installation
pip install -e .
Create a New Project
# React project with TypeScript
devforge init --react
# FastAPI backend
devforge init --fastapi
# Flutter mobile app
devforge init --flutter
๐ Available Commands
devforge init --<framework>
Create a new project for the specified framework
Options:
--react: Create a React + Vite project--fastapi: Create a FastAPI backend project--flutter: Create a Flutter mobile app
devforge list
Show all available frameworks
devforge version
Display DevForge version
๐ฏ Supported Frameworks
| Framework | Command | Description |
|---|---|---|
| โ๏ธ React | --react |
Vite + React with feature-based architecture |
| ๐ FastAPI | --fastapi |
FastAPI backend with modular features |
| ๐ Flutter | --flutter |
Flutter with Clean Architecture |
๐๏ธ Project Structure
React Projects
project-name/
โโโ src/
โ โโโ features/
โ โโโ auth/
โ โ โโโ components/
โ โ โโโ hooks/
โ โ โโโ pages/
โ โ โโโ services/
โ โ โโโ utils/
โ โ โโโ types/ # TypeScript only
โ โโโ [feature-name]/
โ โโโ ...
โโโ package.json
โโโ vite.config.js
FastAPI Projects
project-name/
โโโ app/
โ โโโ main.py
โ โโโ features/
โ โโโ auth/
โ โ โโโ models/
โ โ โโโ services/
โ โ โโโ routers/
โ โโโ [feature-name]/
โ โโโ ...
โโโ requirements.txt
Flutter Projects
project-name/
โโโ lib/
โ โโโ main.dart
โ โโโ features/
โ โโโ auth/
โ โ โโโ domain/ # Business logic
โ โ โโโ data/ # Data sources
โ โ โโโ presentation/ # UI components
โ โ โโโ screens/
โ โ โโโ widgets/
โ โโโ [feature-name]/
โ โโโ ...
โโโ pubspec.yaml
๐จ Usage Examples
Creating a React Project
$ devforge init --react
๐งฑ Project name: my-awesome-app
Use TypeScript? (y/n) [y]: y
Enter features (comma separated) [core]: auth,profile,dashboard
โ๏ธ Creating Vite project...
โ
React project 'my-awesome-app' forged successfully!
๐ฆ Next steps:
cd my-awesome-app
npm install
npm run dev
Creating a FastAPI Project
$ devforge init --fastapi
๐งฑ Project name: my-api
Enter features (comma separated) [core]: auth,users,posts
โ
FastAPI project 'my-api' forged successfully!
๐ฆ Next steps:
cd my-api
pip install -r requirements.txt
uvicorn app.main:app --reload
Creating a Flutter Project
$ devforge init --flutter
๐งฑ Project name: my_flutter_app
Enter features (comma separated) [core]: auth,profile,settings
โ๏ธ Creating Flutter project...
โ
Flutter project 'my_flutter_app' forged successfully!
๐ฆ Next steps:
cd my_flutter_app
flutter pub get
flutter run
๐ง Requirements
For All Projects
- Python 3.8 or higher
- pip
Framework-Specific Requirements
React:
- Node.js 18+ and npm
- Download from: https://nodejs.org
FastAPI:
- No additional requirements (Python only)
Flutter:
- Flutter SDK
- Download from: https://flutter.dev
๐งฉ Extending DevForge
DevForge is designed to be easily extensible. See ARCHITECTURE.md for detailed documentation on adding new frameworks.
Quick Overview:
- Create a scaffolder in
devforge/scaffolders/your_framework.py - Extend
FrameworkScaffolderbase class - Register it in
scaffolders/__init__.py - Add CLI option in
cli.py
That's it! Your new framework is ready to use.
Example minimal scaffolder:
from .base import FrameworkScaffolder
class MyFrameworkScaffolder(FrameworkScaffolder):
def get_framework_name(self) -> str:
return "MyFramework"
def get_emoji(self) -> str:
return "๐ฏ"
def prompt_user(self) -> Dict[str, any]:
# Prompt for configuration
pass
def create_base_project(self, config: Dict) -> Optional[Path]:
# Create project structure
pass
def create_feature_structure(self, project_path: Path,
features: List[str],
config: Dict) -> None:
# Create feature folders
pass
๐ค Contributing
Contributions are welcome! Here's how you can help:
- Add New Frameworks: Create scaffolders for other popular frameworks
- Improve Existing Scaffolders: Enhance templates and structure
- Fix Bugs: Report and fix issues
- Documentation: Improve docs and examples
๐ Documentation
- Architecture Guide - Detailed architecture documentation
- Adding Frameworks - Step-by-step guide
๐ Troubleshooting
Command Not Found
If you get "command not found" after installation, make sure Python's Scripts directory is in your PATH:
Windows:
C:\Users\<username>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.x\LocalCache\local-packages\Python3xx\Scripts
Linux/Mac:
export PATH="$HOME/.local/bin:$PATH"
npm/flutter Not Found
DevForge checks for required tools before scaffolding. If you see errors about missing tools:
- Install the required tool (Node.js, Flutter, etc.)
- Restart your terminal
- Try the command again
๐ License
MIT License - feel free to use this in your own projects!
๐จโ๐ป Author
Isaka Mtweve
- Email: isakamtweve69@gmail.com
๐ Show Your Support
If you find DevForge helpful, consider:
- โญ Starring the repository
- ๐ Reporting bugs
- ๐ก Suggesting new features
- ๐ค Contributing code
Happy Forging! ๐ฅ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devforge_cli-1.0.1.tar.gz.
File metadata
- Download URL: devforge_cli-1.0.1.tar.gz
- Upload date:
- Size: 37.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c69f3b57eb89fc1c241cfcbc09f5ca558b863d93de35be870a4f1f7bbc80a0b4
|
|
| MD5 |
f3d0345ea4b18ff9dfad4efb08256cc1
|
|
| BLAKE2b-256 |
db3bdf36ca0b55f5527f87c8a103c87293441d67cc1bd3f72a5be42ad1552f5d
|
File details
Details for the file devforge_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: devforge_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df48af98c4426cb3077526786c9510ae37dae7fd5911a0c987b76fa8466e9c3e
|
|
| MD5 |
41a3717f7a4f1ee4a3f29dc1025692e8
|
|
| BLAKE2b-256 |
2a1673e8e48cfdf1af0e36536e4fca5194f0d45d69ee2eedaa9d85088381101d
|