Skip to main content

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:

FastAPI:

  • No additional requirements (Python only)

Flutter:

๐Ÿงฉ Extending DevForge

DevForge is designed to be easily extensible. See ARCHITECTURE.md for detailed documentation on adding new frameworks.

Quick Overview:

  1. Create a scaffolder in devforge/scaffolders/your_framework.py
  2. Extend FrameworkScaffolder base class
  3. Register it in scaffolders/__init__.py
  4. 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:

  1. Add New Frameworks: Create scaffolders for other popular frameworks
  2. Improve Existing Scaffolders: Enhance templates and structure
  3. Fix Bugs: Report and fix issues
  4. Documentation: Improve docs and examples

๐Ÿ“š Documentation

๐Ÿ› 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:

  1. Install the required tool (Node.js, Flutter, etc.)
  2. Restart your terminal
  3. Try the command again

๐Ÿ“„ License

MIT License - feel free to use this in your own projects!

๐Ÿ‘จโ€๐Ÿ’ป Author

Isaka Mtweve

๐ŸŒŸ Show Your Support

If you find DevForge helpful, consider:

  • โญ Starring the repository
  • ๐Ÿ› Reporting bugs
  • ๐Ÿ’ก Suggesting new features
  • ๐Ÿค Contributing code

Happy Forging! ๐Ÿ”ฅ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devforge_cli-1.0.0.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devforge_cli-1.0.0-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file devforge_cli-1.0.0.tar.gz.

File metadata

  • Download URL: devforge_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for devforge_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 75c2f96c6a3670e21e6308c0af3efbbd59a994301d5e10df350e337ee09a36cd
MD5 770a309b5d608919891e469e4cab77d7
BLAKE2b-256 7cdf7a38d94ac922971d334cc271150f7e552cae79f93af3674d8e0aa42a9888

See more details on using hashes here.

File details

Details for the file devforge_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: devforge_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for devforge_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 097104f7bd381a7f1e9faa95f319b49b67e2dd4c09c795c6a7ba3c6dc0fb1d59
MD5 ad92e6b8f79ac38d8b5b453353571e4b
BLAKE2b-256 ffc859bad788cd97512099ec922a5c9f992c063433297bca244e872ad779df91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page