Add comprehensive README for Phase 1
This commit is contained in:
parent
ec0164691b
commit
c298116f09
271
README.md
271
README.md
|
|
@ -1,246 +1,53 @@
|
|||
# 🚀 Hosting Platform - Automated DNS & SSL Management
|
||||
# 🚀 Hosting Platform - Professional WordPress Hosting
|
||||
|
||||
Modern, otomatik DNS ve SSL yönetim platformu. Cloudflare entegrasyonu ile domain'leri saniyeler içinde yapılandırın.
|
||||
Modern, modular hosting platform with container infrastructure and automated DNS management.
|
||||
|
||||
## 📋 Özellikler
|
||||
## 🌐 Live URLs
|
||||
|
||||
### 🎯 Core Features
|
||||
- ✅ **Cloudflare Entegrasyonu**: API token ile otomatik DNS yönetimi
|
||||
- ✅ **DNS Önizleme**: Değişiklikleri uygulamadan önce görüntüleyin
|
||||
- ✅ **Otomatik SSL**: Cloudflare SSL/TLS yapılandırması
|
||||
- ✅ **Load Balancer**: Hash-based IP dağıtımı
|
||||
- ✅ **Modern UI**: React + Vite ile hızlı ve responsive arayüz
|
||||
- ✅ **Auto-Deploy**: Git push ile otomatik deployment
|
||||
- ✅ **PostgreSQL**: Güvenilir veri saklama
|
||||
- ✅ **Redis**: Hızlı cache ve session yönetimi
|
||||
- **Customer Portal**: https://argeict.net
|
||||
- **API Backend**: https://api.argeict.net
|
||||
- **Git Repository**: https://gitea.argeict.net/hostadmin/hosting-platform
|
||||
|
||||
### 🆕 Yeni Özellikler (v2.0)
|
||||
- ✨ **CF Account Management**: Admin panelden Cloudflare hesaplarını yönetin
|
||||
- ✨ **Encrypted Token Storage**: API token'ları şifreli olarak saklama
|
||||
- ✨ **DNS Nameserver Checker**: Gerçek zamanlı nameserver kontrolü
|
||||
- ✨ **Advanced Domain Setup**: Gelişmiş domain kurulum sihirbazı
|
||||
- ✨ **CF Token Guide**: Adım adım Cloudflare token oluşturma rehberi
|
||||
- ✨ **Nameserver Instructions**: Kullanıcı dostu NS değiştirme talimatları
|
||||
## ✅ Phase 1: Foundation & Authentication (COMPLETED)
|
||||
|
||||
## 🏗️ Mimari
|
||||
### Backend Features
|
||||
- ✅ User authentication with JWT tokens
|
||||
- ✅ User and Customer models with SQLAlchemy
|
||||
- ✅ Secure password hashing with bcrypt
|
||||
- ✅ Protected API routes with decorators
|
||||
- ✅ Customer profile management
|
||||
- ✅ Subscription plans and limits
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ Cloudflare CDN │
|
||||
│ (SSL/TLS + DDoS Protection) │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ Nginx Reverse Proxy │
|
||||
│ (176.96.129.77 - Load Balancer) │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
│
|
||||
┌──────────────┴──────────────┐
|
||||
▼ ▼
|
||||
┌───────────────┐ ┌───────────────┐
|
||||
│ Frontend │ │ Backend │
|
||||
│ React + Vite │ │ Flask API │
|
||||
│ Port 3001 │ │ Port 5000 │
|
||||
└───────────────┘ └───────────────┘
|
||||
│
|
||||
┌────────────────┴────────────────┐
|
||||
▼ ▼
|
||||
┌──────────────┐ ┌──────────────┐
|
||||
│ PostgreSQL │ │ Redis │
|
||||
│ Port 5432 │ │ Port 6379 │
|
||||
└──────────────┘ └──────────────┘
|
||||
```
|
||||
### Frontend Features
|
||||
- ✅ Beautiful landing page with animations
|
||||
- ✅ Register/Login functionality
|
||||
- ✅ Customer dashboard with sidebar navigation
|
||||
- ✅ Auth context for global state management
|
||||
- ✅ Protected routes
|
||||
- ✅ Brand colors and design system from ARGE ICT logo
|
||||
|
||||
## 🛠️ Teknolojiler
|
||||
## 🎨 Design System
|
||||
|
||||
### Backend
|
||||
- **Flask 3.0** - Modern Python web framework
|
||||
- **SQLAlchemy 2.0** - ORM
|
||||
- **PostgreSQL 16** - Database
|
||||
- **Redis 7.0** - Cache & Sessions
|
||||
- **Cloudflare API** - DNS & SSL management
|
||||
### Brand Colors (from ARGE ICT logo)
|
||||
- **Primary Green**: #159052
|
||||
- **Dark Green**: #046D3F
|
||||
- **Light Green**: #53BA6F
|
||||
- **Orange**: #F69036
|
||||
- **Blue**: #0F578B
|
||||
- **Red**: #B42832
|
||||
|
||||
### Frontend
|
||||
- **React 18** - UI library
|
||||
- **Vite** - Build tool
|
||||
- **TailwindCSS** - Styling
|
||||
- **Axios** - HTTP client
|
||||
## 🏗️ Tech Stack
|
||||
|
||||
### DevOps
|
||||
- **Gitea** - Git repository
|
||||
- **Nginx** - Reverse proxy
|
||||
- **Supervisor** - Process management
|
||||
- **Systemd** - Service management
|
||||
**Backend**: Flask 3.0, SQLAlchemy 2.0, PostgreSQL, JWT, Redis
|
||||
**Frontend**: React 18, Vite, TailwindCSS, React Router
|
||||
**DevOps**: Nginx, Supervisor, Let's Encrypt, Gitea
|
||||
|
||||
## 📦 Kurulum
|
||||
## 📋 Next Steps (Phase 2)
|
||||
|
||||
### Gereksinimler
|
||||
- Ubuntu 22.04+
|
||||
- Python 3.12+
|
||||
- Node.js 18+
|
||||
- PostgreSQL 16
|
||||
- Redis 7.0
|
||||
- Customer Dashboard - DNS Module integration
|
||||
- Domain management with customer isolation
|
||||
- Project creation wizard
|
||||
|
||||
### Backend Kurulumu
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Environment variables
|
||||
cp .env.example .env
|
||||
# .env dosyasını düzenleyin
|
||||
|
||||
# Database migration
|
||||
flask db upgrade
|
||||
|
||||
# Başlatma
|
||||
python app/main.py
|
||||
```
|
||||
|
||||
### Frontend Kurulumu
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 🔧 Yapılandırma
|
||||
|
||||
### Environment Variables
|
||||
|
||||
```bash
|
||||
# Database
|
||||
DATABASE_URL=postgresql://user:pass@localhost:5432/hosting_db
|
||||
|
||||
# Redis
|
||||
REDIS_URL=redis://localhost:6379/0
|
||||
|
||||
# API
|
||||
API_HOST=0.0.0.0
|
||||
API_PORT=5000
|
||||
|
||||
# Load Balancer IPs
|
||||
LB_IPS=176.96.129.77,176.96.129.78,176.96.129.79
|
||||
|
||||
# Secret
|
||||
SECRET_KEY=your-secret-key-here
|
||||
```
|
||||
|
||||
## 🚀 API Endpoints
|
||||
|
||||
### Health Check
|
||||
```bash
|
||||
GET /health
|
||||
```
|
||||
|
||||
### DNS Management
|
||||
```bash
|
||||
POST /api/dns/validate-token
|
||||
POST /api/dns/preview-changes
|
||||
POST /api/dns/apply-changes
|
||||
POST /api/dns/check-nameservers # 🆕 Nameserver kontrolü
|
||||
```
|
||||
|
||||
### Domain Management
|
||||
```bash
|
||||
GET /api/domains
|
||||
GET /api/domains/<id>
|
||||
POST /api/domains
|
||||
PUT /api/domains/<id>
|
||||
DELETE /api/domains/<id>
|
||||
```
|
||||
|
||||
### Admin Endpoints (🆕)
|
||||
```bash
|
||||
GET /api/admin/cf-accounts # CF hesaplarını listele
|
||||
POST /api/admin/cf-accounts # Yeni CF hesabı ekle
|
||||
PUT /api/admin/cf-accounts/<id> # CF hesabını güncelle
|
||||
DELETE /api/admin/cf-accounts/<id> # CF hesabını sil
|
||||
```
|
||||
|
||||
## 📝 Lisans
|
||||
|
||||
MIT License - Detaylar için LICENSE dosyasına bakın.
|
||||
|
||||
## 👨💻 Geliştirici
|
||||
|
||||
Hosting Platform Team
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Deployment
|
||||
|
||||
### 🔗 Auto-Deploy Webhook (Önerilen)
|
||||
|
||||
Gitea'ya webhook ekleyerek otomatik deployment yapabilirsiniz:
|
||||
|
||||
**Webhook URL**: `https://api.argeict.net/webhook/deploy`
|
||||
|
||||
Detaylı kurulum için: [WEBHOOK_SETUP.md](WEBHOOK_SETUP.md)
|
||||
|
||||
```bash
|
||||
# Webhook test
|
||||
curl -X POST https://api.argeict.net/webhook/deploy \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"repository":{"name":"hosting-platform"}}'
|
||||
```
|
||||
|
||||
### 📦 Manuel Deployment (SSH)
|
||||
```bash
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
Bu script:
|
||||
1. ✅ SSH ile sunucuya bağlanır
|
||||
2. ✅ Gitea'dan son kodu çeker
|
||||
3. ✅ Backend dependencies yükler
|
||||
4. ✅ Database migration yapar
|
||||
5. ✅ Frontend build eder
|
||||
6. ✅ Servisleri restart eder
|
||||
7. ✅ Health check yapar
|
||||
|
||||
### Manuel Deployment
|
||||
|
||||
```bash
|
||||
# SSH ile sunucuya bağlan
|
||||
ssh root@176.96.129.77
|
||||
|
||||
# Proje dizinine git
|
||||
cd /opt/hosting-platform
|
||||
|
||||
# Git pull
|
||||
git pull origin main
|
||||
|
||||
# Backend güncelle
|
||||
cd backend
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python -c "from app.main import app, db; app.app_context().push(); db.create_all()"
|
||||
|
||||
# Frontend build
|
||||
cd ../frontend
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
# Servisleri restart et
|
||||
supervisorctl restart hosting-backend hosting-frontend
|
||||
```
|
||||
|
||||
### Servis Yönetimi
|
||||
|
||||
```bash
|
||||
# Servis durumu
|
||||
supervisorctl status
|
||||
|
||||
# Logları izle
|
||||
tail -f /var/log/hosting-backend.log
|
||||
|
||||
# Servisleri restart et
|
||||
supervisorctl restart hosting-backend hosting-frontend
|
||||
```
|
||||
## 📝 License
|
||||
|
||||
© 2026 ARGE ICT. All rights reserved.
|
||||
|
|
|
|||
Loading…
Reference in New Issue