befa393ba6af520a58435c407156548716f3df1d
Some checks failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
ci/woodpecker/push/woodpecker Pipeline failed
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
- Currently using SQLite (not PostgreSQL) - Redis not implemented yet - Disabled postgresql.enabled and redis.enabled in production and staging values - Removed unnecessary database environment variables from deployment
پیکربند - پلتفرم جامع مدیریت هاستینگ و زیرساخت ابری
📖 درباره پروژه
پیکربند یک پلتفرم حرفهای برای مدیریت هاستینگ، سرورهای ابری، دامین و خدمات DevOps است. این پلتفرم با الهام از سرویسهایی مانند Cloudways، DigitalOcean و پارس پک طراحی شده است.
🏗️ معماری
این پروژه بر اساس Clean Architecture و اصول SOLID طراحی شده است:
- Domain Layer: منطق کسبوکار اصلی
- Application Layer: موارد استفاده (Use Cases)
- Infrastructure Layer: پیادهسازیهای فنی
- Presentation Layer: رابط کاربری (Reflex)
🚀 تکنولوژیها
- Frontend/Backend: Python Reflex
- Database: PostgreSQL + SQLAlchemy
- Cache: Redis
- Task Queue: Celery
- Testing: pytest
- Code Quality: black, flake8, mypy, isort
📋 پیشنیازها
- Python 3.11+
- PostgreSQL 14+
- Redis 7+
- Node.js 18+ (برای Reflex)
🛠️ نصب و راهاندازی
1. کلون کردن پروژه
git clone https://github.com/yourusername/peikarband.git
cd peikarband
2. ایجاد محیط مجازی
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
3. نصب وابستگیها
pip install -r requirements.txt
pip install -r requirements-dev.txt # برای توسعه
4. تنظیم Environment Variables
cp .env.example .env
# ویرایش .env و تکمیل مقادیر
5. راهاندازی دیتابیس
# ایجاد دیتابیس
createdb peikarband
# اجرای migrations
alembic upgrade head
6. اجرای پروژه
# توسعه
python -m reflex run
# یا
make dev
🚢 Deployment
با Docker
# Build
docker build -t peikarband:latest .
# Run
docker-compose up -d
با Kubernetes/Helm
# Deploy
helm upgrade --install peikarband ./helm/peikarband \
--namespace production \
--set image.tag=0.1.0
# یا
make k8s-deploy
📁 ساختار پروژه
peikarband/
├── docs/ # مستندات
├── src/
│ ├── config/ # تنظیمات
│ ├── core/ # هسته اصلی
│ │ ├── domain/ # Domain entities & logic
│ │ └── application/ # Use cases & DTOs
│ ├── infrastructure/ # پیادهسازیهای فنی
│ ├── presentation/ # رابط کاربری
│ └── shared/ # کدهای مشترک
├── tests/ # تستها
└── scripts/ # اسکریپتهای کمکی
🧪 تست
# اجرای همه تستها
pytest
# با coverage
pytest --cov=src tests/
# تستهای خاص
pytest tests/unit/
pytest tests/integration/
📝 کدنویسی
استانداردها
- PEP 8: استاندارد کدنویسی Python
- PEP 20: Zen of Python
- Type Hints: همه جا استفاده شود
- Docstrings: Google Style
ابزارهای کیفیت کد
# Format
black src/
# Linting
flake8 src/
# Type checking
mypy src/
# Import sorting
isort src/
Pre-commit Hooks
pre-commit install
pre-commit run --all-files
📚 مستندات
مستندات کامل در پوشه docs/ موجود است:
- Handbook: راهنمای جامع پروژه
- Architecture: معماری سیستم
- Development: راهنمای توسعه
- API Reference: مستندات API
🔐 امنیت
- همه پسوردها با bcrypt hash میشوند
- استفاده از JWT برای authentication
- پشتیبانی از 2FA
- اطلاعات حساس رمزنگاری میشوند
🤝 مشارکت
برای مشارکت در پروژه:
- Fork کنید
- Branch جدید بسازید (
git checkout -b feature/amazing-feature) - Commit کنید (
git commit -m 'feat: add amazing feature') - Push کنید (
git push origin feature/amazing-feature) - Pull Request بسازید
📄 لایسنس
این پروژه تحت لایسنس MIT منتشر شده است.
👥 تیم
- Lead Developer: [Your Name]
- Architecture: Clean Architecture
- Methodology: Agile/Scrum
📞 تماس
- Website: https://peikarband.ir
- Email: support@peikarband.ir
- Telegram: @peikarband
نسخه: 0.1.0
آخرین بروزرسانی: 2025-01-24
Description
Languages
Python
81%
Shell
6.8%
Dockerfile
4.5%
Makefile
3.9%
CSS
2.6%
Other
1.2%