richardtekula f3d184c5a2 Fix: Pridaná coolify sieť pre Traefik routing
- Pridaná coolify sieť do postgres a backend služieb
- Deklarovaná coolify ako external network
- Umožní Traefik-u routovať požiadavky na backend
- Opravuje "no available server" chybu

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 17:33:43 +01:00

📚 Ebook Translation System

Enterprise-grade systém na správu prekladov e-kníh s kupónovým systémom.

🎯 Komponenty

  • Backend API (FastAPI) - REST API server
  • Admin Dashboard - Webové rozhranie pre správu
  • PostgreSQL - Databáza
  • Chrome Extension - Automatická aplikácia prekladov

🚀 Quick Start

Lokálne (Docker)

# 1. Vytvorte .env
cp .env.production .env
nano .env  # Upravte heslá

# 2. Spustite
./docker-start.sh
# ALEBO
docker-compose up -d --build

# 3. Otvorte
http://localhost:8000/login

Production (Coolify)

Detailný návod: GITEA_COOLIFY_SETUP.md

# 1. Push do Git
git init
git add .
git commit -m "Initial commit"
git push origin main

# 2. V Coolify
- New Resource → Docker Compose
- Pripojte Git repo
- Nastavte Environment Variables
- Deploy!

📖 Dokumentácia

🔧 Tech Stack

  • Backend: FastAPI, Python 3.11+
  • Database: PostgreSQL 15
  • Frontend: HTML5, CSS3, Vanilla JS
  • Extension: Chrome Extension (Manifest V3)
  • Deployment: Docker, Docker Compose, Coolify

📝 Environment Variables

# Database
POSTGRES_DB=ebook_prod
POSTGRES_USER=ebook_user
POSTGRES_PASSWORD=changeme

# Security
SECRET_KEY=generate-new-32-chars
DEBUG=false
ENVIRONMENT=production

# Admin
ADMIN_USERNAME=admin
ADMIN_PASSWORD=changeme

# CORS
CORS_ORIGINS=https://your-domain.com

Vygenerovať SECRET_KEY:

python3 -c "import secrets; print(secrets.token_urlsafe(32))"

🎮 Usage

Admin Panel

  1. Login: https://your-domain.com/login
  2. Generate kupóny
  3. Upload translation Excel súbor
  4. Manage kupóny

Chrome Extension

  1. Načítať extension do Chrome
  2. Upraviť config.jsAPI_BASE
  3. Zadať kupón
  4. Vybrať jazyk
  5. Spustiť preklad

🔐 Security

  • Bcrypt password hashing
  • Session-based authentication
  • CORS protection
  • SQL injection prevention
  • HTTPS/SSL (production)
  • Environment-based secrets

🐛 Troubleshooting

Health Check

curl https://your-domain.com/health

Logs

docker-compose logs -f backend

Database

docker-compose exec postgres psql -U ebook_user -d ebook_prod

📊 API Endpoints

  • GET /health - Health check
  • POST /admin/login - Admin login
  • POST /generate - Generate coupons
  • GET /list - List coupons
  • POST /verify - Verify coupon
  • POST /upload-translations - Upload translation file
  • GET /translations/latest - Download translations

Full API Docs: https://your-domain.com/docs

🤝 Contributing

  1. Fork the repo
  2. Create feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing)
  5. Open Pull Request

📄 License

MIT License - see LICENSE file for details

📞 Support

  • Documentation: See /docs folder
  • Issues: GitHub Issues
  • Health Check: /health endpoint

Built with ❤️ using FastAPI, Docker, and modern web technologies

Description
No description provided
Readme 176 KiB
Languages
Python 58.7%
HTML 20.8%
JavaScript 16.9%
Shell 3%
Dockerfile 0.6%