Project Template Generator (PTG) هو أداة مطور بـ Python لإنشاء قوالب مشاريع احترافية وقابلة للتطوير لأكثر من 15 لغة برمجة وإطار عمل. يوفر PTG هياكل مشاريع نظيفة مع أفضل الممارسات، مما يساعد المطورين على بدء مشاريعهم بسرعة وكفاءة.
- 🎯 15+ لغة وإطار عمل مدعوم - Python, JavaScript, PHP, HTML, Docker
- 🔧 50+ نوع مكون متاح - Models, Services, Tests, APIs
- 📦 100+ ملف قالب جاهز - كود جاهز للإنتاج
- 🤖 إنشاء مكونات ديناميكي - مع التكوين التلقائي
- 🎨 واجهة سطر أوامر تفاعلية - مع Rich UI
- 🐳 قوالب Docker احترافية - Multi-stage builds وhealth checks
- 🧪 إعداد اختبارات شامل - مع pytest وcoverage
- 📚 توثيق مفصل - أدلة للمطورين والمستخدمين
| اللغة/الإطار | الأنواع المتاحة | الحالة |
|---|---|---|
| Python | general, data-mining, ml, flask, fastapi, sqlalchemy, mongoengine, pytest |
✄1�7 |
| JavaScript | general, react, vue, express, nodejs |
✄1�7 |
| PHP | general, mvc, laravel |
✄1�7 |
| HTML | general, responsive, bootstrap |
✄1�7 |
| Docker | general, web, api, microservices |
✄1�7 |
# تحميل وتشغيل سكريبت التثبيت
curl -sSL https://raw.githubusercontent.com/ptg/project-template-generator/main/scripts/install_linux.sh | bash# PowerShell (موصى به)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ptg/project-template-generator/main/scripts/install_windows.ps1" -OutFile "install.ps1"; .\install.ps1
# أو Command Prompt
curl -o install.bat https://raw.githubusercontent.com/ptg/project-template-generator/main/scripts/install_windows.bat && install.batgit clone https://github.com/Alqudimi/ProjectArchitect
pip install -r requirements.txt# Linux/macOS
./scripts/install_linux.sh
# Windows
./scripts/install_windows.batpip install .بعد التثبيت، تأكد من عمل الأداة:
ptg --help
ptg list languages# Python Flask
ptg create python flask my-web-app
# React Application
ptg create javascript react my-react-app
# Machine Learning Project
ptg create python ml data-analysis-project
# Docker Setup
ptg create docker general my-container-app
# PHP MVC
ptg create php mvc my-php-app# إضافة نموذج بيانات
ptg add model User --project ./my-flask-app
# إضافة خدمة
ptg add service AuthService --project ./my-project
# إضافة اختبار
ptg add test UserTest --project ./my-project# عرض اللغات المدعومة
ptg list languages
# عرض أطر العمل المتاحة لـ Python
ptg list frameworks python
# عرض المكونات المتاحة
ptg list components flask
# معلومات مشروع
ptg info --project ./my-project# تشغيل الوضع التفاعلي
ptg# إنشاء مشروع Flask
ptg create python flask ecommerce-api
# الانتقال للمشروع
cd ecommerce-api
# إضافة نماذج البيانات
ptg add model Product
ptg add model User
ptg add model Order
# إضافة خدمات
ptg add service ProductService
ptg add service AuthService
# إضافة اختبارات
ptg add test ProductTest
ptg add test AuthTest
# تشغيل المشروع
python main.py# إنشاء مشروع React
ptg create javascript react frontend-app
cd frontend-app
# إضافة مكونات
ptg add component UserProfile
ptg add component ProductList
ptg add service ApiService
# تشغيل التطوير
npm start# إنشاء مشروع ML
ptg create python ml price-prediction
cd price-prediction
# إضافة مكونات ML
ptg add model PredictionModel
ptg add dataset HousingData
ptg add pipeline DataPipeline
# تدريب النموذج
python train.py
# التنبؤ
python predict.pymy-flask-app/
├─┄1�7 app.py # النقطة الرئيسية للتطبيق
├─┄1�7 config.py # إعدادات التطبيق
├─┄1�7 requirements.txt # متطلبات Python
├─┄1�7 src/
┄1�7 ├─┄1�7 models/ # نماذج البيانات
┄1�7 ├─┄1�7 services/ # منطق الأعمال
┄1�7 ├─┄1�7 controllers/ # وحدات التحكم
┄1�7 └─┄1�7 utils/ # أدوات مساعدة
├─┄1�7 tests/ # الاختبارات
├─┄1�7 config/ # ملفات التكوين
├─┄1�7 docs/ # التوثيق
└─┄1�7 docker/ # إعداد Docker
├─┄1�7 Dockerfile
└─┄1�7 docker-compose.yml
يمكنك إضافة قوالب مخصصة عبر:
- إنشاء مجلد في
templates/ - إضافة ملف
template.yamlللتكوين - إنشاء ملفات القوالب باستخدام Jinja2
مثال على template.yaml:
name: "Custom Framework"
description: "قالب مخصص لإطار العمل الجديد"
language: "python"
framework: "custom"
version: "1.0.0"
variables:
project_name: "My Custom Project"
author: "Developer Name"
structure:
- src/
- tests/
- config/
components:
model:
template: "model.py.j2"
path: "src/models/{{ name }}.py"# إنشاء مكون مخصص
ptg component create MyComponent --template custom_template.py.j2# تشغيل جميع الاختبارات
pytest
# تشغيل اختبارات مع تغطية
pytest --cov=src --cov-report=html
# تشغيل اختبار محدد
pytest tests/test_template_engine.pyنرحب بمساهماتكم! يرجى مراجعة دليل المطورين للتفاصيل.
- Fork المستودع
- إنشاء branch للميزة (
git checkout -b feature/AmazingFeature) - Commit التغييرات (
git commit -m 'Add some AmazingFeature') - Push للـ branch (
git push origin feature/AmazingFeature) - فتح Pull Request
- 📋 دليل التثبيت - تعليمات التثبيت المفصلة
- 👤 دليل المستخدم - دليل شامل للاستخدام
- 🛠︄1�7 دليل المطورين - للمطورين والمساهمين
- 🎨 تطوير القوالب - إنشاء قوالب مخصصة
إذا واجهت أي مشاكل، يرجى فتح issue مع:
- وصف المشكلة
- خطوات إعادة الإنتاج
- معلومات النظام (OS, Python version)
- رسائل الخطأ (إن وجدت)
هذا المشروع مرخص تحت رخصة MIT - راجع ملف LICENSE للتفاصيل.
- Rich - للواجهة الجميلة في سطر الأوامر
- Jinja2 - لمحرك القوالب
- Click - لواجهة سطر الأوامر
- جميع المساهمين والمختبرين
- 🌐 الموقع: ptg-generator.dev
- 📧 البريد الإلكتروني: admin@ptg.dev
- 🐛 المشاكل: GitHub Issues
- 💬 المناقشات: GitHub Discussions
صنع بـ ❤️ من فريق PTG
إذا أعجبك المشروع، لا تنس إعطاؤه ⭄1�7 على GitHub!
Project Template Generator (PTG) is a comprehensive Python-based CLI tool for creating professional, scalable project templates for 15+ programming languages and frameworks. PTG provides clean project structures with best practices, helping developers kickstart their projects quickly and efficiently.
- 🎯 15+ supported languages & frameworks - Python, JavaScript, PHP, HTML, Docker
- 🔧 50+ available component types - Models, Services, Tests, APIs
- 📦 100+ ready-to-use template files - Production-ready code
- 🤖 Dynamic component generation - With auto-configuration
- 🎨 Interactive CLI interface - With Rich UI
- 🐳 Professional Docker templates - Multi-stage builds & health checks
- 🧪 Comprehensive testing setup - With pytest & coverage
- 📚 Detailed documentation - Developer and user guides
# Install PTG globally
pip install project-template-generator
# Create a new project
ptg create python flask my-web-app
# Add components
ptg add model User --project ./my-web-app
# List available options
ptg list languagesContributions are welcome! Please see our Developer Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the PTG Team
Give us a ⭄1�7 on GitHub if you like this project!