commit 09b0b2f3b77c67827e687d5018de2a1e151dd1f9 Author: SimolZimol <70102430+SimolZimol@users.noreply.github.com> Date: Sun Oct 26 19:13:18 2025 +0100 new file: .gitignore new file: Dockerfile new file: README.md new file: app.py new file: index.html new file: projekte des/PROJECT_DESCRIPTION.txt new file: projekte des/WEBSITE_DESCRIPTION.md new file: projekte des/website_project_description_en.txt new file: requirements.txt new file: script.js new file: static/css/styles.css new file: static/js/script.js new file: styles.css new file: templates/about.html new file: templates/base.html new file: templates/contact.html new file: templates/index.html new file: templates/minecraft.html new file: templates/project_detail.html new file: templates/projects.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d93d7e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,80 @@ +# Python bytecode and cache +__pycache__/ +*.py[cod] +*$py.class + +# Virtual environments +.venv/ +venv/ +env/ +ENV/ + +# Distribution / packaging +.build/ +build/ +dist/ +.eggs/ +*.egg-info/ +*.egg +wheels/ +share/python-wheels/ +pip-wheel-metadata/ + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +.coverage* +.tox/ +.nox/ +.pytest_cache/ +htmlcov/ +.junit/ +coverage.xml + +# Type checker / linters +.mypy_cache/ +.pyright/ +.ruff_cache/ +.pyre/ + +# C extensions +*.so + +# Django/Flask stuff +instance/ +*.db +*.sqlite3 +*.sqlite + +# Environment variables / secrets +.env +.env.* +*.env +.flaskenv + +# Logs +*.log +logs/ + +# IDEs and editors +.vscode/ +.idea/ +*.iml + +# OS files +.DS_Store +Thumbs.db +desktop.ini + +# Node (if used later) +node_modules/ + +# Docker +.dockerignore +# Local container data (if any) +**/.docker/* + +# Cache +.cache/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..52f3c2b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM python:3.10-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + PIP_NO_CACHE_DIR=1 \ + PORT=5000 + +WORKDIR /app + +# Keep image minimal; add build tools only if future deps require them +RUN apt-get update -y && apt-get install -y --no-install-recommends \ + build-essential \ + && rm -rf /var/lib/apt/lists/* + +# Install dependencies (better layer caching) +COPY requirements.txt ./ +RUN pip install --upgrade pip && pip install -r requirements.txt + +# Copy application code +COPY app.py ./ +COPY templates ./templates +COPY static ./static + +# Environment variables from Coolify (if used) +ENV DEMO=$DEMO + +EXPOSE 5000 + +# Production server +CMD ["gunicorn", "-w", "3", "-b", "0.0.0.0:5000", "app:app"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..c43bd93 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Devanturas by SimolZimol + +Professional Minecraft Plugin development and Discord bot programming, now powered by a Flask web app. + +## Features +- English website with sections: Home, Projects, Minecraft, About, Contact +- Projects overview plus individual project pages (detail pages with feature lists, commands, install steps) +- Dedicated Minecraft page with services and expertise +- External links for each project (GitHub, Modrinth, SpigotMC, Wiki, Issues) +- No links to private Gitea (as requested) + +## Project Structure +``` +website/ +├─ app.py # Flask app and routes +├─ requirements.txt # Python dependencies +├─ templates/ # Jinja2 templates +│ ├─ base.html +│ ├─ index.html +│ ├─ projects.html +│ ├─ project_detail.html +│ ├─ minecraft.html +│ ├─ about.html +│ └─ contact.html +└─ static/ + ├─ css/ + │ └─ styles.css + └─ js/ + └─ script.js +``` + +## Quickstart (Windows PowerShell) + +```pwsh +# 1) Navigate to the project directory +Set-Location -Path "c:\Users\Simon.Speedy\Documents\dev projekte\website" + +# 2) Create and activate a virtual environment +python -m venv .venv +.\.venv\Scripts\Activate.ps1 + +# 3) Install dependencies +pip install -r requirements.txt + +# 4) Run the development server +python app.py +# The site will be available at http://127.0.0.1:5000 +``` + +If `python` isn’t found, try `py` instead of `python` in the above commands. + +## Run with Docker (optional) + +```pwsh +# From project root +docker build -t devanturas-site . +docker run --rm -p 5000:5000 devanturas-site +# Open http://localhost:5000 +``` + +## Customization +- Add more projects by updating the data structures in `app.py` under `/projects` and the detail routes. +- To add Wiki/Issues links per project, populate the `links` dict with `wiki` and `issues` keys. If a project should not expose these, simply omit the keys and the template won’t render them. +- All styling lives in `static/css/styles.css`. JS behaviors live in `static/js/script.js`. + +## Domain Notes +Ready to deploy to any of your domains: +- devanturas.de, devanturas.eu, devanturas.net +- simolzimol.de, simolzimol.eu + +You can serve this Flask app via any WSGI-capable host (e.g., Gunicorn + reverse proxy) or a PaaS of your choice. + +## Privacy +- No links to the private Gitea instance are included. + +## License +Choose a license and add it here if you plan to publish the source. diff --git a/app.py b/app.py new file mode 100644 index 0000000..e56ec0d --- /dev/null +++ b/app.py @@ -0,0 +1,439 @@ +from flask import Flask, render_template + +app = Flask(__name__) + +# Main routes +@app.route('/') +def home(): + """Homepage with overview of Devanturas and featured projects""" + projects = [ + { + 'name': 'Fly Plugin', + 'type': 'Minecraft Plugin', + 'description': 'Lightweight flight plugin for survival servers with configurable speeds and permissions.', + 'technologies': ['Java', 'Spigot', 'Paper'], + 'status': 'Active', + 'url': '/projects/fly-plugin', + 'icon': 'fas fa-paper-plane', + 'color': 'minecraft' + }, + { + 'name': 'Hearts of Iron IV ELO Bot', + 'type': 'Discord Bot', + 'description': 'Sophisticated Discord bot with complete ELO rating system for HOI4 multiplayer communities.', + 'technologies': ['Python', 'Discord.py', 'MySQL', 'Docker'], + 'status': 'Production', + 'url': '/projects/hoi4-elo-bot', + 'icon': 'fab fa-discord', + 'color': 'discord' + }, + { + 'name': 'Discord AI Bot — Moderation & Giveaways', + 'type': 'Discord Bot', + 'description': 'Production-ready bot with advanced moderation, restart-safe giveaways, and a Flask web dashboard.', + 'technologies': ['Python', 'Discord.py', 'Flask', 'MySQL'], + 'status': 'Active', + 'url': '/projects/discord-ai-bot', + 'icon': 'fas fa-shield-alt', + 'color': 'discord' + }, + { + 'name': 'Discord Bot — Stable Diffusion (AMD)', + 'type': 'Discord Bot', + 'description': 'AI image generation bot optimized for AMD GPUs with Discord commands and queueing.', + 'technologies': ['Python', 'Discord.py', 'AI'], + 'status': 'Active', + 'url': '/projects/discord-bot-stable-diffusion-amd', + 'icon': 'fas fa-wand-magic-sparkles', + 'color': 'discord' + } + ] + return render_template('index.html', projects=projects) + +@app.route('/projects') +def projects(): + """Overview of all projects""" + all_projects = [ + { + 'name': 'Fly Plugin', + 'type': 'Minecraft Plugin', + 'description': 'Simple flight for survival servers with speed control and permission management.', + 'long_description': 'A lightweight, reliable Minecraft plugin that restores creative-like flying in survival mode. Designed for simplicity and performance.', + 'technologies': ['Java', 'Spigot', 'Paper', 'Bukkit'], + 'status': 'Active', + 'version': 'Latest', + 'downloads': 'Available', + 'url': '/projects/fly-plugin', + 'icon': 'fas fa-paper-plane', + 'color': 'minecraft', + 'links': { + 'modrinth': 'https://modrinth.com/plugin/fly-simolzimol/', + 'spigot': 'https://www.spigotmc.org/resources/fly.83164/' + } + }, + { + 'name': 'Hearts of Iron IV ELO Bot', + 'type': 'Discord Bot', + 'description': 'Advanced Discord bot for competitive HOI4 communities with ELO rating system.', + 'long_description': 'A sophisticated Discord bot featuring a complete ELO rating system similar to chess rankings, designed specifically for Hearts of Iron IV multiplayer communities.', + 'technologies': ['Python', 'Discord.py', 'MySQL', 'Docker', 'Coolify'], + 'status': 'Production', + 'version': '2.0', + 'users': 'Multiple Communities', + 'url': '/projects/hoi4-elo-bot', + 'icon': 'fab fa-discord', + 'color': 'discord', + 'links': { + 'github': 'https://github.com/SimolZimol/' + } + }, + { + 'name': 'Discord AI Bot — Moderation & Giveaways', + 'type': 'Discord Bot', + 'description': 'Moderation, restart-safe giveaways with Steam integration, and a web dashboard.', + 'long_description': 'Production-ready Discord bot with advanced moderation, persistent giveaway engine (Steam/Epic ready), Flask-based dashboard, and restart safety via MySQL.', + 'technologies': ['Python', 'Discord.py', 'Flask', 'MySQL', 'aiohttp'], + 'status': 'Active', + 'version': '1.x', + 'url': '/projects/discord-ai-bot', + 'icon': 'fas fa-shield-alt', + 'color': 'discord', + 'links': { + 'github': 'https://github.com/SimolZimol/' + } + }, + { + 'name': 'Discord Bot — Stable Diffusion (AMD)', + 'type': 'Discord Bot', + 'description': 'AI image generation with AMD GPUs, Discord commands, and job queuing.', + 'long_description': 'A Discord bot for Stable Diffusion image generation optimized for AMD GPUs. Provides prompt-based generation through slash/text commands with async processing.', + 'technologies': ['Python', 'Discord.py', 'AI'], + 'status': 'Active', + 'version': 'Latest', + 'url': '/projects/discord-bot-stable-diffusion-amd', + 'icon': 'fas fa-wand-magic-sparkles', + 'color': 'discord', + 'links': { + 'github': 'https://github.com/SimolZimol/Discord-Bot-stable-diffusion-AMD', + 'issues': 'https://github.com/SimolZimol/Discord-Bot-stable-diffusion-AMD/issues' + } + } + ] + return render_template('projects.html', projects=all_projects) + +@app.route('/minecraft') +def minecraft(): + """Dedicated Minecraft development page""" + minecraft_projects = [ + { + 'name': 'Fly Plugin', + 'description': 'Flight plugin for survival servers', + 'version': 'Latest', + 'supported_versions': '1.15 - 1.21', + 'downloads': 'Active', + 'url': '/projects/fly-plugin' + } + ] + + minecraft_info = { + 'experience': '3+ Years', + 'preferred_apis': ['Spigot API', 'Paper API', 'Bukkit API'], + 'specialties': ['Plugin Development', 'Server Optimization', 'Custom Commands', 'Permission Systems'], + 'server_types': ['Spigot', 'Paper', 'Bukkit'] + } + + return render_template('minecraft.html', projects=minecraft_projects, info=minecraft_info) + +@app.route('/about') +def about(): + """About SimolZimol and Devanturas""" + skills = { + 'Minecraft Development': [ + 'Spigot & Paper Plugin Development', + 'Java Programming', + 'Server Administration', + 'Performance Optimization', + 'Custom Commands & GUIs', + 'Permission System Integration' + ], + 'Discord Development': [ + 'Discord.py Bot Development', + 'Database Integration (MySQL)', + 'Asynchronous Programming', + 'Community Management Tools', + 'Slash Commands & Interactions', + 'Docker Deployment' + ], + 'General Programming': [ + 'Java, Python', + 'Database Design', + 'RESTful APIs', + 'Git Version Control', + 'Docker & Containerization', + 'Web Development (Flask)' + ] + } + + achievements = [ + { + 'title': 'Fly Plugin', + 'description': 'Active on Modrinth & SpigotMC', + 'icon': 'fas fa-download' + }, + { + 'title': 'Open Source', + 'description': 'Contributing to GitHub repositories', + 'icon': 'fab fa-github' + }, + { + 'title': 'Community', + 'description': 'Supporting Discord communities', + 'icon': 'fab fa-discord' + } + ] + + return render_template('about.html', skills=skills, achievements=achievements) + +@app.route('/contact') +def contact(): + """Contact information and links""" + contact_links = [ + { + 'name': 'GitHub', + 'url': 'https://github.com/SimolZimol/', + 'description': 'Open source projects and code repositories', + 'icon': 'fab fa-github', + 'color': 'github' + }, + { + 'name': 'Discord', + 'url': 'https://discordapp.com/users/253922739709018114', + 'description': 'Direct contact for questions and support', + 'icon': 'fab fa-discord', + 'color': 'discord' + }, + { + 'name': 'Modrinth', + 'url': 'https://modrinth.com/plugin/fly-simolzimol/', + 'description': 'Fly Plugin on Modrinth platform', + 'icon': 'fas fa-cube', + 'color': 'modrinth' + }, + { + 'name': 'SpigotMC', + 'url': 'https://www.spigotmc.org/resources/fly.83164/', + 'description': 'Minecraft plugins and resources', + 'icon': 'fas fa-plug', + 'color': 'spigot' + } + ] + return render_template('contact.html', links=contact_links) + +# Project detail pages +@app.route('/projects/fly-plugin') +def fly_plugin(): + """Detailed page for Fly Plugin""" + project = { + 'name': 'Fly Plugin', + 'tagline': 'Simple flight for survival servers', + 'description': 'A lightweight, reliable Minecraft plugin that restores creative-like flying in survival mode. Designed to be simple for players and server admins.', + 'long_description': '''Fly is a minimalist Minecraft plugin focused on providing reliable flight functionality for survival servers. + The plugin emphasizes simplicity, performance, and easy customization while maintaining compatibility across multiple server versions.''', + 'version': 'Latest', + 'status': 'Active Development', + 'compatibility': '1.15 - 1.21', + 'server_types': ['Spigot', 'Paper', 'Bukkit'], + 'technologies': ['Java', 'Spigot API', 'Paper API'], + 'features': [ + 'Toggle flight for yourself: /fly', + 'Toggle flight for others: /fly ', + 'Adjustable flight speed: /fly speed <1-10>', + 'Fully configurable messages and prefix', + 'Live configuration reload: /flyreload', + 'Permission-based access control', + 'Lightweight and efficient' + ], + 'commands': [ + { + 'command': '/fly', + 'description': 'Toggle your own flight', + 'permission': 'fly.fly' + }, + { + 'command': '/fly ', + 'description': 'Toggle another player\'s flight', + 'permission': 'other.fly' + }, + { + 'command': '/fly speed <1-10>', + 'description': 'Set your flight speed', + 'permission': 'fly.speed' + }, + { + 'command': '/flyreload', + 'description': 'Reload plugin configuration', + 'permission': 'fly.reload' + } + ], + 'links': { + 'modrinth': 'https://modrinth.com/plugin/fly-simolzimol/', + 'spigot': 'https://www.spigotmc.org/resources/fly.83164/', + 'github': 'https://github.com/SimolZimol/', + 'wiki': 'https://github.com/SimolZimol/fly-plugin/wiki', + 'issues': 'https://github.com/SimolZimol/fly-plugin/issues' + }, + 'installation': [ + 'Download the latest JAR file', + 'Place the JAR into your server plugins/ folder', + 'Start the server to generate config.yml', + 'Edit config.yml to customize messages and settings', + 'Use /flyreload to apply changes without restart' + ] + } + return render_template('project_detail.html', project=project) + +@app.route('/projects/hoi4-elo-bot') +def hoi4_elo_bot(): + """Detailed page for HOI4 ELO Bot""" + project = { + 'name': 'Hearts of Iron IV ELO Bot', + 'tagline': 'Competitive ranking system for HOI4 communities', + 'description': 'A sophisticated Discord bot designed specifically for Hearts of Iron IV multiplayer communities, featuring a complete ELO rating system similar to chess rankings.', + 'long_description': '''This bot transforms casual gaming communities into structured competitive environments while maintaining + the fun and social aspects that make multiplayer gaming enjoyable. By providing objective performance metrics and historical tracking, + it helps players improve their skills and creates lasting engagement within gaming communities.''', + 'version': '2.0', + 'status': 'Production Ready', + 'technologies': ['Python', 'Discord.py 2.3.2', 'MySQL', 'Docker', 'Coolify'], + 'features': [ + 'Dual Rating Modes: Standard and Competitive gameplay', + 'Chess-like ELO Algorithm with HOI4 modifications', + 'T-Level System: Country tier-based multipliers', + 'Intelligent draw handling with ELO adjustments', + 'Comprehensive player statistics and analytics', + 'Match history and leaderboards', + 'Hybrid slash and text commands', + 'Docker containerization support' + ], + 'commands': [ + { + 'command': '/hoi4create ', + 'description': 'Create new match (standard/competitive)', + 'permission': 'User' + }, + { + 'command': '/hoi4setup <@user> ', + 'description': 'Add player to match', + 'permission': 'User' + }, + { + 'command': '/hoi4end ', + 'description': 'Complete match and process ELO', + 'permission': 'User' + }, + { + 'command': '/hoi4stats [@user]', + 'description': 'View detailed player statistics', + 'permission': 'User' + }, + { + 'command': '/hoi4leaderboard [type] [limit]', + 'description': 'Display ranked player lists', + 'permission': 'User' + } + ], + 'technical_highlights': [ + 'Asynchronous Programming with Discord.py', + 'Normalized database schema with performance optimization', + 'Implementation of proven ELO rating algorithms', + 'Comprehensive error handling and logging', + 'Docker deployment with Coolify integration' + ], + 'links': { + 'github': 'https://github.com/SimolZimol/', + 'wiki': 'https://github.com/SimolZimol/hoi4-elo-bot/wiki', + 'issues': 'https://github.com/SimolZimol/hoi4-elo-bot/issues', + 'documentation': 'https://github.com/SimolZimol/hoi4-elo-bot/docs' + } + } + return render_template('project_detail.html', project=project) + +@app.route('/projects/discord-ai-bot') +def discord_ai_bot(): + """Detailed page for Discord AI Bot — Moderation & Giveaways""" + project = { + 'name': 'Discord AI Bot — Moderation & Giveaways', + 'tagline': 'Production-ready moderation, restart-safe giveaways, and a web dashboard', + 'description': 'Advanced moderation, persistent giveaway engine with Steam/Epic integration, and a Flask admin dashboard. Focused on reliability and UX.', + 'long_description': ( + 'A production-ready Discord bot combining advanced moderation (warnings, temporary mutes with auto-restore), ' + 'a restart-safe giveaway system with UUID-based IDs and Steam URL parsing, and a complementary Flask web dashboard. ' + 'All active processes persist to MySQL and recover on startup.' + ), + 'version': '1.x', + 'status': 'Active', + 'technologies': ['Python', 'Discord.py', 'Flask', 'MySQL', 'aiohttp'], + 'features': [ + 'Advanced Moderation: warnings, temp mutes, role restoration, detailed logs', + 'Persistent Giveaways: UUID IDs, sponsor attribution, Steam URL parsing', + 'Web Dashboard: Flask templates for admins and users', + 'Reliability: restart-safe process recovery from MySQL', + 'Clean UX: rich embeds, buttons, clear admin feedback' + ], + 'commands': [ + { 'command': '!warn/@warn', 'description': 'Issue a warning with audit trail', 'permission': 'Moderator' }, + { 'command': '!mute/@mute