A professional, GUI-based project structure generator with intelligent Connector framework branding
Features β’ Installation β’ Quick Start β’ Documentation β’ Contributing
- Overview
- Features
- Installation
- Quick Start
- Project Structure
- Connector Branding System
- Templates
- Usage Guide
- Configuration
- Documentation
- Contributing
- License
- Credits
AutoMatic File Generator is a sophisticated PyQt5-based GUI tool that automates the creation of professional PHP project structures with:
- β Intelligent Branding System - Automatically generates and injects project-specific prefixes throughout your codebase
- β Pre-built Connector Framework - Production-ready infrastructure layer (Auth, Database, Security, Logger, Services)
- β Multiple Templates - Website, Microservice, and API templates out of the box
- β Real-time Preview - See your project branding (key, prefix, class names) as you type
- β Git Integration - Automatic git initialization and .gitignore generation
- β SQLite Logging - Full audit trail of all created projects
- β Cross-platform - Works on Windows, Linux, and macOS
Traditional project generators create generic structures. AutoMatic File Generator goes further by:
- Branding Your Infrastructure - Every function, class, and constant is automatically prefixed with your project name
- Preventing Naming Collisions - Multiple projects can coexist without conflicts
- Enforcing Best Practices - Follows proven architectural patterns from production systems
- Saving Hours of Setup - What takes hours manually is done in seconds
- Dark-themed professional UI with hover effects and animations
- Real-time branding preview showing generated keys and prefixes
- Progress tracking with detailed activity logs
- Background processing with cancellation support
Project Name: "NileAndSinai"
β
Auto-generates:
β’ Key: NSA
β’ Prefix: nsa_
β’ Bootstrap Class: NileAndSinaiBootstrap
β’ Version Constant: NSA_BOOTSTRAP_VERSION
All Connector files automatically updated with your project branding!
-
Connector Layer (Infrastructure)
- Authentication (JWT, Session, Token, Permissions)
- Database (PDO, Query Builder, Connection Pool)
- Security (CSRF, Headers, Rate Limiting, Origin Validation)
- Logger (Structured event logging)
- Services (Cache, Config, Health, Exception Handler)
- Helpers (Response, Sanitizer, Validator, Utilities)
- Exceptions (Custom typed exceptions)
-
Application Layers
- Website (Public site with Contents/Pages/Api/V1 structure)
- Accounts (User authentication and profile management)
- Admins (Admin panel with dashboard and analytics)
- Services (Business logic layer)
- Modules (Reusable components: nav, footer, SEO)
- Default Website Template - Full-featured web application structure
- Microservice Template - API-first microservice architecture
- Extensible - Easy to add custom templates
- Git Integration - Auto-initialize repositories
- Virtual Environment - Create Python venv placeholders
- Documentation - Auto-generate README and branding context docs
- Export Logs - CSV export of all project creation history
- Python 3.8 or higher
- PyQt5
git clone https://github.com/BOSS294/AutoMatic-File-Generator.git
cd AutoMatic-File-Generatorpip install PyQt5Or use requirements.txt (if provided):
pip install -r requirements.txtpython directory_creator.pyThe GUI should launch successfully.
python directory_creator.py-
Enter Project Name: Type your project name (e.g., "MyAwesomeProject")
- Watch the branding preview update in real-time
- Key:
MAP, Prefix:map_, Class:MyAwesomeProjectBootstrap
-
Select Parent Directory: Choose where to create your project
-
Choose Template: Select "Default Website Template" or "Microservice"
-
Configure Options:
- β Create README.md
- β Create .gitignore
- β Copy & inject Connector layer
- β Create branding context documentation
- β Init git repository
- β Create virtual environment
- β Open folder after creation
-
Click "Create Structure"
-
Done! Your project is ready with:
- Fully branded Connector layer
- Complete directory structure
- Documentation files
- Version-controlled API structure
Navigate to your project and check:
cd path/to/MyAwesomeProject/Assets/Connector
# Check function prefix
grep -r "function map_" .
# Check bootstrap class
grep -r "class MyAwesomeProjectBootstrap" .
# Verify no old branding remains
grep -r "NileAndSinai\|nsa_" . # Should be emptyMyAwesomeProject/
βββ Assets/
β βββ Connector/ # Branded infrastructure layer
β β βββ _bootstrap.php # Entry point (map_bootstrap, map_db, map_config)
β β βββ connector.php # Core environment & security
β β βββ Auth/ # JWT, Session, Token, Permissions
β β βββ Database/ # PDO, QueryBuilder, ConnectionPool
β β βββ Security/ # CSRF, Headers, RateLimiter, OriginValidator
β β βββ Logger/ # Structured event logging
β β βββ Services/ # Cache, Config, Health, ApiExceptionHandler
β β βββ Helpers/ # Response, Sanitizer, Validator, Utilities
β β βββ Exceptions/ # Custom exception hierarchy
β β
β βββ Website/ # Public site
β β βββ Contents/
β β β βββ Landing/ # Landing page components
β β β βββ Pages/ # Page-specific components
β β βββ Pages/ # Rendered pages (index, about, contact, etc.)
β β βββ Api/V1/Pages/ # API endpoints (versioned)
β β βββ Images/
β β βββ Scripts/
β β βββ Styles/
β β βββ Videos/
β β
β βββ Accounts/ # User authentication & profiles
β β βββ Contents/ # Auth, Profile, Dashboard components
β β βββ Pages/ # Login, register, dashboard, profile
β β βββ Api/V1/ # Versioned API structure
β β β βββ Auth/ # login.php, register.php, logout.php, me.php
β β β βββ Profile/ # overview.php, update.php, picture.php
β β β βββ Dashboard/ # overview.php
β β β βββ Settings/ # overview.php, update.php, password.php
β β βββ Scripts/
β β βββ Styles/
β β
β βββ Admins/ # Admin panel
β β βββ Contents/ # Dashboard, Analytics, Management components
β β βββ Pages/ # Admin pages
β β βββ Api/V1/ # Admin API endpoints
β β β βββ Auth/ # Admin authentication
β β β βββ Dashboard/ # stats.php, overview.php
β β β βββ Users/ # list.php, get.php, update.php
β β βββ Scripts/
β β βββ Styles/
β β
β βββ Services/ # Business logic layer
β β βββ Accounts/
β β βββ Auth/
β β βββ Products/
β β βββ Email/
β β
β βββ Modules/ # Reusable components
β β βββ nav.php # Site navigation
β β βββ footer.php # Site footer
β β βββ seo.php # SEO meta rendering
β β βββ base.css # Shared styles
β β βββ shared-scripts.js # Common JavaScript
β β
β βββ Extras/
β β βββ Documentations/ # Project docs
β β βββ Sqls/ # Database schemas & migrations
β β βββ Updates/ # Changelogs
β β βββ Connections/ # External service connections
β β
β βββ Miscellaneous/
β βββ Context/
β βββ Information/
β βββ Testing/
β
βββ index.php # Entry point
βββ .env # Environment configuration
βββ .env.example # Environment template
βββ composer.json # Composer dependencies
βββ composer.lock
βββ .gitignore # Git ignore rules
βββ .htaccess # Apache configuration
βββ README.md # Project README
βββ CONNECTOR_BRANDING_CONTEXT.md # Branding reference (auto-generated)
The branding system ensures every project has unique identifiers throughout its codebase.
"NileAndSinai" β NSA (capital letters)
"NexPlacify" β NXP (capital letters)
"MyProject" β MP (first 3 letters if < 2 capitals)-
File Headers
/** * MyProject V2 - CSRF Protection * Version: 2.0.0 */
-
Version Constants
const MP_BOOTSTRAP_VERSION = '2.0.0';
-
Bootstrap Classes
final class MyProjectBootstrap { public static function load(): void { ... } public static function boot(array $options = []): array { ... } }
-
Global Functions
function mp_bootstrap(array $options = []): array { ... } function mp_db(): PDO { ... } function mp_config(string $key, mixed $default = null): mixed { ... } function mp_log_error(string $message): void { ... }
-
Session Keys
private const SESSION_KEY = '_mp_csrf_token'; private const FINGERPRINT_KEY = '_mp_fingerprint';
-
Error Messages
[MyProject Logger Failure] Database connection lost [MyProject Blocker Logger Failure] Rate limit exceeded -
Copyright Headers
/** * MyProject and associated branding are project marks where applicable. * All rights reserved. */
Every project gets a CONNECTOR_BRANDING_CONTEXT.md with:
- Quick reference of all branded functions
- Usage examples
- Session key mappings
- Validation commands
- Guidelines for future AI
Full-featured web application with:
- Public website (landing, pages, contact)
- User accounts (auth, profile, dashboard)
- Admin panel (dashboard, analytics, user management)
- Service layer for business logic
- Modular components for reusability
- API versioning (V1)
Best for:
- E-commerce platforms
- SaaS applications
- Content management systems
- Community platforms
API-first architecture with:
- Versioned API structure (V1)
- Controllers and middleware
- Service layer
- Database models
- Docker support
- Testing structure
Best for:
- RESTful APIs
- Backend services
- Microservice architectures
- Mobile app backends
Create your own template by modifying _get_template_structure() in directory_creator.py.
from directory_creator import ProjectBranding
# Generate branding for your project
branding = ProjectBranding("MyAwesomeProject")
print(branding.project_key) # "MAP"
print(branding.project_prefix) # "map_"
print(branding.bootstrap_class) # "MyAwesomeProjectBootstrap"After generating your project, create API endpoints like this:
<?php
declare(strict_types=1);
require_once dirname(__DIR__, 4) . '/Connector/_bootstrap.php';
map_bootstrap([
'security' => true,
'session' => true,
'methods' => ['GET', 'POST'],
'json' => true,
]);
// Authenticate
$userId = $_SESSION['user_id'] ?? null;
if (!$userId) {
map_json_response(['success' => false, 'message' => 'Unauthorized'], 401);
}
// Validate CSRF for state-changing operations
if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
$csrf = $_POST['csrf_token'] ?? $_SERVER['HTTP_X_CSRF_TOKEN'] ?? '';
if (!map_validate_csrf($csrf)) {
map_json_response(['success' => false, 'message' => 'CSRF failed'], 403);
}
}
// Process request
try {
$pdo = map_db();
// Your business logic here
map_json_response(['success' => true, 'data' => $result]);
} catch (Exception $e) {
map_log_error($e->getMessage());
map_json_response(['success' => false, 'message' => 'Server error'], 500);
}After project creation, verify everything was branded correctly:
cd path/to/MyAwesomeProject/Assets/Connector
# Check all functions have correct prefix
grep -r "function map_" . | wc -l # Should return multiple results
# Check bootstrap class
grep -r "class MyAwesomeProjectBootstrap" .
# Verify no old branding remains
grep -r "nsa_\|NSA\|NileAndSinai" . # Should return NOTHING
# Check session keys
grep -r "_map_" .The generated .env file includes:
# Application
APP_ENV=development
APP_DEBUG=true
APP_URL=http://localhost
# Database
DB_DRIVER=mysql
DB_HOST=localhost
DB_PORT=3306
DB_NAME=database_name
DB_USER=root
DB_PASSWORD=
DB_CHARSET=utf8mb4
# Security
JWT_SECRET=your-secret-key-here
ALLOWED_ORIGINS=http://localhost,https://yourdomain.com
# Session
SESSION_LIFETIME=7200
SESSION_SECURE=false
SESSION_HTTP_ONLY=truemap_bootstrap([
'security' => true, // Apply security headers
'csp' => true, // Content Security Policy
'session' => true, // Start session management
'csrf' => true, // Enable CSRF protection
'json' => true, // Set JSON content type
'methods' => ['GET', 'POST'], // Allowed HTTP methods
'payload_limit' => 10, // Max payload size (MB)
'rate_limit' => [ // Rate limiting config
'enabled' => true,
'requests' => 60,
'window' => 60,
],
'exception_handler' => true, // Centralized exception handling
]);- CONNECTOR_BRANDING_GUIDE.md - Comprehensive branding system reference
- CONNECTOR_BRANDING_CONTEXT.md - Per-project branding reference (auto-generated)
- COMMON_IMPLEMENTATIONS_ANALYSIS.md - Architectural patterns and conventions
- Central Project Engineering Playbook - Best practices and standards
- Common Implementations Analysis - Pattern analysis
- Interactive Pattern Browser - Visual reference
We welcome contributions! Here's how you can help:
- Check existing issues first
- Provide detailed description
- Include steps to reproduce
- Attach screenshots if relevant
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
git clone https://github.com/BOSS294/AutoMatic-File-Generator.git
cd AutoMatic-File-Generator
pip install -r requirements.txt
python directory_creator.py- Follow PEP 8 for Python code
- Use type hints where applicable
- Add docstrings to functions and classes
- Keep functions focused and single-purpose
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Mayank Chawdhari (BOSS294) / Privonix Technologies
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR DEALINGS IN THE
SOFTWARE.
Mayank Chawdhari (aka BOSS294)
Organization: Privonix Technologies
- Inspired by production architectures from NileAndSinaiV2 and NexPlacify projects
- Built with PyQt5 for cross-platform GUI
- Connector framework design based on proven PHP 8+ patterns
- Python 3.8+
- PyQt5 for GUI
- SQLite for logging
- Git for version control
- Repository: https://github.com/BOSS294/AutoMatic-File-Generator
- Issues: https://github.com/BOSS294/AutoMatic-File-Generator/issues
- Discussions: https://github.com/BOSS294/AutoMatic-File-Generator/discussions
Made with β€οΈ by Mayank Chawdhari
If this project helped you, please consider giving it a β!