diff --git a/README.md b/README.md index 4a6abc5..7051297 100644 --- a/README.md +++ b/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/ -POST /api/domains -PUT /api/domains/ -DELETE /api/domains/ -``` - -### 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/ # CF hesabΔ±nΔ± gΓΌncelle -DELETE /api/admin/cf-accounts/ # 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.