[INIT-001] Initial project setup with Clean Architecture (feat)
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 / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
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 / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
- Implemented Clean Architecture with Domain, Application, Infrastructure, Presentation layers - Added comprehensive project structure following SOLID principles - Created Kubernetes deployment with Helm charts (HPA, PDB, NetworkPolicy) - Configured ArgoCD for automated deployment (production + staging) - Implemented CI/CD pipeline with GitHub Actions - Added comprehensive documentation (handbook, architecture, coding standards) - Configured PostgreSQL, Redis, Celery for backend services - Created modern landing page with Persian fonts (Vazirmatn) - Added Docker multi-stage build for production - Configured development tools (pytest, black, flake8, mypy, isort) - Added pre-commit hooks for code quality - Implemented Makefile for common operations
This commit is contained in:
217
README.md
Normal file
217
README.md
Normal file
@@ -0,0 +1,217 @@
|
||||
# پیکربند - پلتفرم جامع مدیریت هاستینگ و زیرساخت ابری
|
||||
|
||||
## 📖 درباره پروژه
|
||||
|
||||
پیکربند یک پلتفرم حرفهای برای مدیریت هاستینگ، سرورهای ابری، دامین و خدمات 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. کلون کردن پروژه
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yourusername/peikarband.git
|
||||
cd peikarband
|
||||
```
|
||||
|
||||
### 2. ایجاد محیط مجازی
|
||||
|
||||
```bash
|
||||
python -m venv venv
|
||||
source venv/bin/activate # On Windows: venv\Scripts\activate
|
||||
```
|
||||
|
||||
### 3. نصب وابستگیها
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-dev.txt # برای توسعه
|
||||
```
|
||||
|
||||
### 4. تنظیم Environment Variables
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# ویرایش .env و تکمیل مقادیر
|
||||
```
|
||||
|
||||
### 5. راهاندازی دیتابیس
|
||||
|
||||
```bash
|
||||
# ایجاد دیتابیس
|
||||
createdb peikarband
|
||||
|
||||
# اجرای migrations
|
||||
alembic upgrade head
|
||||
```
|
||||
|
||||
### 6. اجرای پروژه
|
||||
|
||||
```bash
|
||||
# توسعه
|
||||
python -m reflex run
|
||||
|
||||
# یا
|
||||
make dev
|
||||
```
|
||||
|
||||
## 🚢 Deployment
|
||||
|
||||
### با Docker
|
||||
|
||||
```bash
|
||||
# Build
|
||||
docker build -t peikarband:latest .
|
||||
|
||||
# Run
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### با Kubernetes/Helm
|
||||
|
||||
```bash
|
||||
# Deploy
|
||||
helm upgrade --install peikarband ./helm/peikarband \
|
||||
--namespace production \
|
||||
--set image.tag=0.1.0
|
||||
|
||||
# یا
|
||||
make k8s-deploy
|
||||
```
|
||||
|
||||
📖 [راهنمای کامل Deployment](docs/deployment/kubernetes.md)
|
||||
|
||||
## 📁 ساختار پروژه
|
||||
|
||||
```
|
||||
peikarband/
|
||||
├── docs/ # مستندات
|
||||
├── src/
|
||||
│ ├── config/ # تنظیمات
|
||||
│ ├── core/ # هسته اصلی
|
||||
│ │ ├── domain/ # Domain entities & logic
|
||||
│ │ └── application/ # Use cases & DTOs
|
||||
│ ├── infrastructure/ # پیادهسازیهای فنی
|
||||
│ ├── presentation/ # رابط کاربری
|
||||
│ └── shared/ # کدهای مشترک
|
||||
├── tests/ # تستها
|
||||
└── scripts/ # اسکریپتهای کمکی
|
||||
```
|
||||
|
||||
## 🧪 تست
|
||||
|
||||
```bash
|
||||
# اجرای همه تستها
|
||||
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
|
||||
|
||||
### ابزارهای کیفیت کد
|
||||
|
||||
```bash
|
||||
# Format
|
||||
black src/
|
||||
|
||||
# Linting
|
||||
flake8 src/
|
||||
|
||||
# Type checking
|
||||
mypy src/
|
||||
|
||||
# Import sorting
|
||||
isort src/
|
||||
```
|
||||
|
||||
### Pre-commit Hooks
|
||||
|
||||
```bash
|
||||
pre-commit install
|
||||
pre-commit run --all-files
|
||||
```
|
||||
|
||||
## 📚 مستندات
|
||||
|
||||
مستندات کامل در پوشه `docs/` موجود است:
|
||||
|
||||
- [Handbook](docs/handbook.md): راهنمای جامع پروژه
|
||||
- [Architecture](docs/architecture/): معماری سیستم
|
||||
- [Development](docs/development/): راهنمای توسعه
|
||||
- [API Reference](docs/api/): مستندات API
|
||||
|
||||
## 🔐 امنیت
|
||||
|
||||
- همه پسوردها با bcrypt hash میشوند
|
||||
- استفاده از JWT برای authentication
|
||||
- پشتیبانی از 2FA
|
||||
- اطلاعات حساس رمزنگاری میشوند
|
||||
|
||||
## 🤝 مشارکت
|
||||
|
||||
برای مشارکت در پروژه:
|
||||
|
||||
1. Fork کنید
|
||||
2. Branch جدید بسازید (`git checkout -b feature/amazing-feature`)
|
||||
3. Commit کنید (`git commit -m 'feat: add amazing feature'`)
|
||||
4. Push کنید (`git push origin feature/amazing-feature`)
|
||||
5. 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
|
||||
|
||||
Reference in New Issue
Block a user