No project description provided
Project description
๐ CFS - Common Folder Structure Generator
A powerful, manifest-driven project scaffold generator that creates production-ready applications with consistent, well-organized folder structures.
CFS automatically generates complete project structures for multiple frameworks, handling everything from initial project setup to dependency installation. Say goodbye to repetitive project configuration and hello to instant, production-ready codebases! โจ
๐ Table of Contents
- Features
- Supported Frameworks
- Installation
- Quick Start
- Framework Guides
- CLI Reference
- Project Structure
- Contributing
- License
โจ Features
โ
Multi-Framework Support - Spring Boot, Flutter, Django (more coming soon!)
โ
Manifest-Driven - Configure your project structure with simple YAML files
โ
Production-Ready - Generated projects follow industry best practices
โ
Automated Setup - From project creation to dependency installation
โ
Modular Architecture - Clean separation of concerns in all templates
โ
Customizable - Flexible variable system for personalized projects
โ
Interactive CLI - User-friendly command-line interface with colored output
โ
Dry Run Mode - Preview changes before generating files
โ
Comprehensive Validation - Strict checks for template files and configurations
๐ฏ Supported Frameworks
| Framework | Status | Backend/Frontend | Database | API Support |
|---|---|---|---|---|
| ๐ Spring Boot | โ Available | Backend (JVM) | PostgreSQL, MySQL, SQLite | REST, GraphQL, WebSocket |
| ๐ฑ Flutter | โ Available | Mobile/Web Frontend | N/A | REST, GraphQL, WebSocket |
| ๐ Django | โ Available | Backend (Python) | PostgreSQL, MySQL, SQLite | REST, GraphQL |
| โ๏ธ React | ๐ Coming Soon | Frontend | N/A | REST, GraphQL |
| โก Next.js | ๐ Coming Soon | Full-stack | Any | REST, GraphQL |
| ๐ฅ FastAPI | ๐ Coming Soon | Backend (Python) | Any | REST, GraphQL |
๐ฆ Installation
Prerequisites
- Python 3.9+ installed
- Git installed
- Framework-specific requirements:
- Spring Boot: Java 11+ and Maven/Gradle
- Flutter: Flutter SDK 3.0+
- Django: Python 3.9+
Install from Source
# Clone the repository
git clone https://github.com/yourusername/cfs-generator.git
cd cfs-generator
# Install dependencies
pip install -r requirements.txt
# Install CFS globally
pip install -e .
# Verify installation
cfs --version
Quick Install (Coming Soon)
pip install cfs-generator
๐ Quick Start
Generate Your First Project
# List available templates
cfs list
# Generate a Spring Boot project
cfs init springboot -p my-api -l java -a rest
# Generate a Flutter app
cfs init flutter -p my_mobile_app -a graphql
# Generate a Django backend
cfs init django -p my_backend --package-name myapp -d postgresql --use-graphql
Interactive Mode
Simply run without options to use interactive prompts:
cfs init springboot
The CLI will guide you through:
- Project name
- Package name
- Language selection
- API protocol
- Database engine (where applicable)
- Additional features
๐ Framework Guides
๐ Spring Boot
Create enterprise-grade Java/Kotlin REST, GraphQL, or WebSocket APIs with Spring Boot.
Features
โ
Java 11-21 or Kotlin support
โ
REST, GraphQL, WebSocket APIs
โ
PostgreSQL, MySQL, SQLite database support
โ
Modular architecture with controllers, services, repositories
โ
JPA/Hibernate ORM integration
โ
Exception handling and validation
โ
Docker configuration included
Usage
# Basic REST API with Java
cfs init springboot \
--project-name user-service \
--package-name com.company.users \
--language java \
--api-protocol rest
# GraphQL API with Kotlin
cfs init springboot \
-p product-api \
--package-name io.shop.products \
-l kt \
-a graphql
# WebSocket server
cfs init springboot \
-p chat-server \
--package-name com.chat.server \
-l java \
-a websocket
Project Structure
my-spring-api/
โโโ src/
โ โโโ main/
โ โ โโโ java/com/company/myapi/
โ โ โ โโโ controllers/ # REST/GraphQL controllers
โ โ โ โโโ models/ # JPA entities
โ โ โ โโโ services/ # Business logic
โ โ โ โโโ repositories/ # Data access layer
โ โ โ โโโ dtos/ # Data transfer objects
โ โ โ โโโ exceptions/ # Custom exceptions
โ โ โ โโโ MyApiApplication.java
โ โ โโโ resources/
โ โ โโโ application.properties
โ โโโ test/
โโโ pom.xml # Maven dependencies
โโโ Dockerfile
โโโ README.md
What You Get
- โ User CRUD operations (Create, Read, Update, Delete)
- โ Global exception handler
- โ Input validation with DTOs
- โ Database configuration (H2 for dev, production DB)
- โ Mapper pattern for entity โ DTO conversion
- โ Service layer with business logic
- โ Repository layer with JPA
Next Steps
cd my-spring-api
./mvnw spring-boot:run
# API available at: http://localhost:8080
# GraphQL playground: http://localhost:8080/graphql
๐ฑ Flutter
Build beautiful, natively compiled mobile, web, and desktop applications with Flutter.
Features
โ
Modular clean architecture (data/presentation/routes)
โ
GraphQL, REST, WebSocket API clients
โ
go_router for declarative navigation
โ
Provider for state management
โ
Authentication & Onboarding modules included
โ
Theming with dark mode support
โ
Custom widgets library
โ
Secure storage for sensitive data
Usage
# GraphQL mobile app
cfs init flutter \
--project-name shopping_app \
--package-name com.mycompany.shopping \
--api-protocol graphql
# REST API app
cfs init flutter \
-p weather_app \
--package-name io.weather.app \
-a rest
# WebSocket real-time app
cfs init flutter \
-p chat_app \
--package-name com.chat.mobile \
-a websocket
Project Structure
my_flutter_app/
โโโ lib/
โ โโโ core/ # Core infrastructure
โ โ โโโ api_config/ # API client setup
โ โ โ โโโ graphql/ # GraphQL config
โ โ โโโ constants/ # App constants
โ โ โโโ routes/ # App routing
โ โ โโโ storage/ # Secure storage
โ โ โโโ theme/ # Material theme
โ โโโ modules/ # Feature modules
โ โ โโโ authentication/
โ โ โ โโโ data/ # Models, services, GraphQL
โ โ โ โโโ presentation/ # Screens, widgets, providers
โ โ โ โโโ routes/ # Module routing
โ โ โโโ onboarding/
โ โโโ shared/ # Shared utilities
โ โ โโโ utilities/
โ โ โโโ helper_methods/ # Utility functions
โ โ โโโ widgets/ # Reusable widgets
โ โโโ app.dart # App widget
โ โโโ main.dart # Entry point
โโโ pubspec.yaml # Dependencies
โโโ .env.example
โโโ docs/
โโโ ARCHITECTURE.md
What You Get
๐ Authentication Module
- Login screen
- Password reset
- Change password
- Local & remote data sources
- JWT token management
๐ฏ Onboarding Module
- Splash screen
- Multi-page onboarding flow
- Smooth page indicators
- Skip/Next navigation
๐จ UI Components
- Custom buttons, text fields, dropdowns
- Loading indicators
- Date pickers
- Glass morphism containers
- Theme controller (light/dark)
๐ง Utilities
- Avatar color generator
- Date formatters
- Device security checker
- Input validators
- Custom clippers & animations
Packages Included
graphql_flutter- GraphQL clientgo_router- Declarative routingprovider- State managementflutter_secure_storage- Secure data storagedio&http- HTTP clientssizer- Responsive sizinghugeicons&heroicons- Icon librariessmooth_page_indicator- Page indicatorsflutter_animate- Animations- And many more...
Next Steps
cd my_flutter_app
flutter pub get
flutter run
# Configure your GraphQL endpoint in .env
# Edit lib/core/api_config/graphql/graphql_url_config.dart
๐ Django
Create powerful, scalable Python web applications with Django.
Features
โ
Python 3.9-3.12 support
โ
PostgreSQL, MySQL, SQLite databases
โ
GraphQL with Graphene-Django (optional)
โ
Celery for async tasks (optional)
โ
Redis caching and message broker
โ
Modular Django apps architecture
โ
JWT authentication
โ
Docker & docker-compose setup
โ
Comprehensive utilities (caching, rate limiting, validators)
Usage
# Full-featured Django backend
cfs init django \
--project-name ecommerce_backend \
--package-name ecommerce \
--database-engine postgresql \
--python-version 3.11 \
--use-graphql \
--use-celery
# Simple REST API
cfs init django \
-p blog_api \
--package-name blog \
-d sqlite
# Interactive mode
cfs init django
Project Structure
my_django_backend/
โโโ myapp_assets/ # Static assets & config
โ โโโ locations/ # CSV location data
โ โโโ countries.json
โ โโโ permissions.json
โโโ myapp_auth/ # Authentication app
โ โโโ models.py # User models
โ โโโ views.py
โ โโโ migrations/
โโโ myapp_audit_logs/ # Audit logging
โ โโโ models.py
โ โโโ schema.py # GraphQL schema
โ โโโ admin.py
โโโ myapp_backend/ # Core Django project
โ โโโ settings/
โ โ โโโ base.py # Base settings
โ โ โโโ development.py # Dev settings
โ โ โโโ production.py # Prod settings
โ โโโ urls.py # URL routing
โ โโโ schema.py # GraphQL root schema
โ โโโ celery.py # Celery config
โ โโโ wsgi.py
โ โโโ asgi.py
โโโ myapp_cache_core/ # Caching utilities
โ โโโ models.py
โ โโโ management/commands/
โโโ myapp_notifications/ # Notification system
โ โโโ models.py
โ โโโ tasks.py # Celery tasks
โ โโโ schema.py
โ โโโ signals.py
โโโ myapp_settings/ # App settings
โ โโโ models.py
โ โโโ management/commands/
โ โโโ seed_locations.py # Data seeding
โโโ myapp_files/ # File management
โโโ myapp_dto/ # Data Transfer Objects
โ โโโ auth_dto.py
โ โโโ enums.py
โ โโโ shared_dto.py
โโโ myapp_dto_builders/ # DTO builders
โ โโโ response_builder.py
โโโ myapp_mixins/ # Reusable mixins
โ โโโ base_crud.py
โ โโโ models.py
โโโ myapp_utils/ # Utility modules
โ โโโ cache/
โ โ โโโ decorators.py
โ โ โโโ manager.py
โ โ โโโ utils.py
โ โโโ decorators/
โ โ โโโ log_exceptions.py
โ โ โโโ permissions.py
โ โ โโโ scope.py
โ โโโ rate_limit/
โ โ โโโ decorators.py
โ โ โโโ middleware.py
โ โ โโโ token_bucket.py
โ โโโ validators/
โ โ โโโ input_validator.py
โ โ โโโ password_validator.py
โ โโโ authentication.py
โ โโโ notification_utils.py
โ โโโ user_utils.py
โโโ myapp_htmls/ # Email templates
โ โโโ account_activation.html
โ โโโ password-reset.html
โโโ logs/ # Application logs
โโโ docs/ # Documentation
โ โโโ API.md
โ โโโ ARCHITECTURE.md
โ โโโ DEPLOYMENT.md
โโโ manage.py
โโโ requirements.txt
โโโ requirements-dev.txt
โโโ Dockerfile
โโโ docker-compose.yml
โโโ .env.example
โโโ README.md
What You Get
๐ Authentication App
- Custom user model
- JWT authentication
- Permission system
- User management
๐ Audit Logs
- Track all user actions
- GraphQL queries for logs
- Admin interface
๐ Notifications
- Email notifications
- In-app notifications
- Celery async tasks
- Notification templates
โ๏ธ Settings App
- Application settings
- Location data (Countries, Regions, Districts, Wards, Streets)
- Data seeding commands
๐ File Management
- File upload/download
- Image processing
- File validation
๐ ๏ธ Utilities
- Caching: Redis-backed caching decorators
- Rate Limiting: Token bucket algorithm
- Decorators: Permissions, logging, scopes
- Validators: Input validation, password strength
- Authentication: JWT helpers, token management
Packages Installed
Core
django- Web frameworkdjangorestframework- REST APIdjango-cors-headers- CORS supportpython-decouple- Environment variables
Database
psycopg2-binary- PostgreSQL adaptermysqlclient- MySQL adapter (if selected)
GraphQL (optional)
graphene-django- GraphQL serverdjango-graphql-jwt- JWT authenticationgraphene-file-upload- File uploads
Celery (optional)
celery- Task queueredis- Message brokerdjango-celery-beat- Periodic tasksdjango-celery-results- Task results
Utilities
requests- HTTP clientPyJWT- JWT tokensgunicorn- WSGI serverwhitenoise- Static filesdjango-redis- Redis cache
Development
black- Code formatterflake8- Linterpytest- Testingpytest-django- Django testingfaker- Test data
Next Steps
cd my_django_backend
source venv/bin/activate
# Configure database in .env
cp .env.example .env
nano .env
# Run migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser
# Seed location data
python manage.py seed_locations
# Start development server
python manage.py runserver
# API available at: http://localhost:8000
# GraphQL endpoint: http://localhost:8000/graphql
# Admin panel: http://localhost:8000/admin
Running with Docker
# Build and run
docker-compose up --build
# Run migrations
docker-compose exec web python manage.py migrate
# Create superuser
docker-compose exec web python manage.py createsuperuser
๐ฎ CLI Reference
Global Options
cfs [COMMAND] [OPTIONS]
Commands
| Command | Description |
|---|---|
init |
Initialize a new project |
list |
List all available templates |
--version |
Show version information |
--help |
Show help message |
Init Options
| Option | Short | Description | Applicable To |
|---|---|---|---|
--project-name |
-p |
Project name | All |
--package-name |
Package/namespace | Spring Boot, Django | |
--language |
-l |
Programming language | Spring Boot |
--api-protocol |
-a |
API type (rest/graphql/websocket) | Spring Boot, Flutter |
--database-engine |
-d |
Database (postgresql/mysql/sqlite) | Django |
--python-version |
Python version (3.9-3.12) | Django | |
--use-graphql |
Include GraphQL support | Django | |
--use-celery |
Include Celery | Django | |
--output-dir |
-o |
Output directory | All |
--force |
-f |
Overwrite existing files | All |
--dry-run |
Preview without creating | All | |
--debug |
Show debug information | All |
Examples
# List available templates
cfs list
# Dry run to preview
cfs init springboot -p test-api --dry-run
# Force overwrite existing project
cfs init flutter -p my_app --force
# Debug mode for troubleshooting
cfs init django -p backend --debug
# Custom output directory
cfs init springboot -p api -o ~/projects
# Interactive mode
cfs init flutter
๐๏ธ Project Structure
cfs-generator/
โโโ cfs/
โ โโโ modules/
โ โ โโโ templates/
โ โ โโโ springboot/
โ โ โ โโโ core/
โ โ โ โ โโโ spring_generator.py
โ โ โ โ โโโ spring_manifest_loader.py
โ โ โ โโโ scripts/
โ โ โ โ โโโ pre_gen.sh
โ โ โ โ โโโ post_gen.sh
โ โ โ โโโ src_templates/
โ โ โ โโโ manifest.yml
โ โ โโโ flutter/
โ โ โ โโโ core/
โ โ โ โ โโโ flutter_generator.py
โ โ โ โ โโโ flutter_manifest_loader.py
โ โ โ โ โโโ exceptions/
โ โ โ โโโ scripts/
โ โ โ โโโ src_templates/
โ โ โ โโโ manifest.yaml
โ โ โโโ django/
โ โ โโโ core/
โ โ โ โโโ django_generator.py
โ โ โ โโโ django_manifest_loader.py
โ โ โ โโโ exceptions/
โ โ โโโ scripts/
โ โ โโโ src_templates/
โ โ โโโ manifest.yml
โ โโโ cli.py
โโโ docs/
โโโ tests/
โโโ requirements.txt
โโโ setup.py
โโโ README.md
โโโ LICENSE
๐ค Contributing
We welcome contributions! Here's how you can help:
Adding a New Framework
-
Create a new directory under
cfs/modules/templates/{framework_name} -
Implement the required files:
manifest.yml- Template configurationcore/{framework}_generator.py- Generator classcore/{framework}_manifest_loader.py- Validation classcore/exceptions/- Custom exceptionsscripts/pre_gen.sh- Pre-generation setupscripts/post_gen.sh- Post-generation setupsrc_templates/- Jinja2 template files
-
Update
cli.pyto include your framework inget_framework_modules() -
Test thoroughly:
cfs init {framework} -p test_project --dry-run cfs init {framework} -p test_project
-
Submit a pull request!
Reporting Issues
Found a bug? Have a suggestion? Please open an issue on GitHub with:
- Framework name
- Command used
- Expected vs actual behavior
- Error messages (if any)
- System information (OS, Python version, framework version)
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Inspired by Yeoman, Vue CLI, and Create React App
- Built with love using Python and Click
- Special thanks to all contributors
๐ฌ Contact
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: james.ntigwimbugwa@eganet.go.tz
Made with โค๏ธ by developers, for developers
โญ Star us on GitHub โ it motivates us a lot!
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 cfs_cli-0.2.2.tar.gz.
File metadata
- Download URL: cfs_cli-0.2.2.tar.gz
- Upload date:
- Size: 448.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd9f0d05270068bfcf5b97ab3178f8e554748477511709ced734b9338d8fb0c
|
|
| MD5 |
9ff59bd36139804f8aa05c48e9708091
|
|
| BLAKE2b-256 |
bad659d532d80004ff65c9aa93e3dea2be488c24857d5cfd3915d89d5449f327
|
File details
Details for the file cfs_cli-0.2.2-py3-none-any.whl.
File metadata
- Download URL: cfs_cli-0.2.2-py3-none-any.whl
- Upload date:
- Size: 549.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c6a915a496206de568f30bd76064c9f100996bf45cca64425fa05ef1a7c69a1
|
|
| MD5 |
a7689818ae1a90959d0bd2e9427ce34e
|
|
| BLAKE2b-256 |
f17932ba0acf3bf851a2f1eb7ea1f73fdddc4823be12bce7620344477cd6e35f
|