Files
website/app.py
SimolZimol dfe19266bf modified: app.py
new file:   projekte des/SimpleTeleport.md
	modified:   templates/project_detail.html
	modified:   templates/projects.html
2025-11-11 20:50:23 +01:00

614 lines
28 KiB
Python

import os
from flask import Flask, render_template, jsonify
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': 'LevelCraft',
'type': 'Minecraft Plugin',
'description': 'Closed-source progression plugin with item leveling and augmentations.',
'technologies': ['Java', 'Spigot', 'Paper'],
'status': 'Active',
'url': '/projects/levelcraft',
'icon': 'fas fa-chart-line',
'color': 'minecraft'
},
{
'name': 'SimpleTeleport',
'type': 'Minecraft Plugin',
'description': 'Comprehensive teleportation plugin with homes, warps, spawn, and back commands.',
'technologies': ['Java', 'Spigot', 'Paper'],
'status': 'Active',
'url': '/projects/simpleteleport',
'icon': 'fas fa-location-arrow',
'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': 'Multus',
'type': 'Discord Bot',
'description': 'Production-ready moderation and restart-safe giveaways with a Flask web dashboard.',
'technologies': ['Python', 'Discord.py', 'Flask', 'MySQL'],
'status': 'Production',
'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': 'Paused',
'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': '2.3',
'downloads': 'Available',
'url': '/projects/fly-plugin',
'icon': 'fas fa-paper-plane',
'color': 'minecraft',
'links': {
'hangar': 'https://hangar.papermc.io/SimolZimol/Flysystem',
'modrinth': 'https://modrinth.com/plugin/fly-simolzimol/',
'spigot': 'https://www.spigotmc.org/resources/fly.83164/'
}
},
{
'name': 'LevelCraft',
'type': 'Minecraft Plugin',
'description': 'Progression system introducing item leveling and augmentations.',
'long_description': 'LevelCraft adds a configurable progression system to Minecraft servers, including item-leveling mechanics and augmentation features to enhance gameplay and player goals.',
'technologies': ['Java', 'Spigot', 'Paper', 'Gradle'],
'status': 'Open Beta',
'version': 'Beta',
'url': '/projects/levelcraft',
'icon': 'fas fa-chart-line',
'color': 'minecraft',
'links': {}
},
{
'name': 'SimpleTeleport',
'type': 'Minecraft Plugin',
'description': 'Comprehensive teleportation plugin with homes, warps, spawn, and back commands.',
'long_description': 'SimpleTeleport provides essential teleportation features for Minecraft servers. Set homes, create warps, manage spawn points, and teleport back to previous locations with an intuitive command system.',
'technologies': ['Java', 'Spigot', 'Paper', 'Bukkit'],
'status': 'Active',
'version': '1.0',
'downloads': 'Available',
'url': '/projects/simpleteleport',
'icon': 'fas fa-location-arrow',
'color': 'minecraft',
'links': {
'hangar': 'https://hangar.papermc.io/SimolZimol/SimpleTeleport',
'spigot': 'https://www.spigotmc.org/resources/simpleteleport.130115/',
'modrinth': 'https://modrinth.com/plugin/simpleteleports'
}
},
{
'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': '0.8',
'url': '/projects/hoi4-elo-bot',
'icon': 'fab fa-discord',
'color': 'discord',
'links': {
'discord': 'https://discord.gg/pU2tXP6tAE'
}
},
{
'name': 'Multus',
'type': 'Discord Bot',
'description': 'Production: moderation, restart-safe giveaways (Steam/Epic), and a web dashboard. Available only on Ludi et Historia Discord.',
'long_description': 'Multus is a production-ready Discord bot with advanced moderation, a persistent giveaway engine (Steam/Epic ready), a Flask-based dashboard, and restart safety via MySQL.',
'technologies': ['Python', 'Discord.py', 'Flask', 'MySQL', 'aiohttp'],
'status': 'Production',
'version': '1.x',
'url': '/projects/discord-ai-bot',
'icon': 'fas fa-shield-alt',
'color': 'discord',
'links': {
'website': 'https://multus.devanturas.net/'
}
},
{
'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': 'Paused',
'version': 'dev-0.9.5',
'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'
},
{
'name': 'LevelCraft',
'description': 'Progression plugin with item leveling and augmentations',
'version': 'Beta',
'supported_versions': '1.21.x',
'downloads': 'Open Beta (Server)',
'url': '/projects/levelcraft'
},
{
'name': 'SimpleTeleport',
'description': 'Comprehensive teleportation with homes, warps, and spawn',
'version': '1.0',
'supported_versions': '1.19 - 1.21',
'downloads': 'Available',
'url': '/projects/simpleteleport'
}
]
minecraft_info = {
'experience': '7+ 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)
# Healthcheck endpoint for platforms like Coolify
@app.route('/health')
def health():
return jsonify(status='ok'), 200
# 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': '2.3',
'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 <player>',
'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 <player>',
'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': {
'hangar': 'https://hangar.papermc.io/SimolZimol/Flysystem',
'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': '0.8',
'status': 'Live',
'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 <type> <name>',
'description': 'Create new match (standard/competitive)',
'permission': 'User'
},
{
'command': '/hoi4setup <game> <@user> <team> <t-level>',
'description': 'Add player to match',
'permission': 'User'
},
{
'command': '/hoi4end <game> <winner/draw>',
'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': {
'discord': 'https://discord.gg/pU2tXP6tAE'
}
}
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': 'Multus',
'tagline': 'Moderation & Giveaways — Production-ready bot with a web dashboard',
'description': 'Multus provides advanced moderation, a 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': 'dev-0.9.8',
'status': 'Production',
'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',
'Available exclusively on Ludi et Historia Discord'
],
'commands': [
{ 'command': '!warn/@warn', 'description': 'Issue a warning with audit trail', 'permission': 'Moderator' },
{ 'command': '!mute/@mute <time>', 'description': 'Temporary mute with auto-unmute and role restore', 'permission': 'Moderator' },
{ 'command': '!giveaway start ...', 'description': 'Start a giveaway with title/prize/duration/sponsor', 'permission': 'Admin' },
{ 'command': '!giveaway edit <uuid> ...', 'description': 'Edit and auto-update original giveaway message', 'permission': 'Admin' }
],
'links': {
'website': 'https://multus.devanturas.net/'
},
'installation': [
'Create and configure MySQL database',
'Set Discord token and DB credentials as environment variables',
'Install Python dependencies',
'Run the bot and (optionally) the Flask dashboard'
]
}
return render_template('project_detail.html', project=project)
@app.route('/projects/discord-bot-stable-diffusion-amd')
def discord_bot_stable_diffusion_amd():
"""Detailed page for Discord Bot — Stable Diffusion (AMD)"""
project = {
'name': 'Discord Bot — Stable Diffusion (AMD)',
'tagline': 'AI image generation for AMD GPUs',
'description': 'Discord bot integrating Stable Diffusion image generation optimized for AMD GPUs with prompt-based commands.',
'long_description': (
'This project provides AI-powered text-to-image generation via Discord commands, with support optimized for AMD GPUs. '
'It focuses on reliable job handling, clean user experience, and practical configuration.'
),
'version': 'dev-0.9.5',
'status': 'Paused',
'technologies': ['Python', 'Discord.py', 'AI'],
'features': [
'Prompt-based image generation via slash or text commands',
'Optimized for AMD GPUs',
'Async processing and job queueing',
'Configurable parameters (model/prompt settings)'
],
'commands': [
{ 'command': '/sd generate <prompt>', 'description': 'Generate an image from a text prompt', 'permission': 'User' },
{ 'command': '/sd settings ...', 'description': 'View or adjust generation settings', 'permission': 'User' }
],
'links': {
'github': 'https://github.com/SimolZimol/Discord-Bot-stable-diffusion-AMD',
'issues': 'https://github.com/SimolZimol/Discord-Bot-stable-diffusion-AMD/issues'
},
'installation': [
'Install Python 3.10+',
'Set up required AI dependencies for AMD GPU support',
'Configure Discord token and model settings',
'Run the bot and test with a simple prompt'
]
}
return render_template('project_detail.html', project=project)
@app.route('/projects/levelcraft')
def levelcraft():
"""Detailed page for LevelCraft (Closed Source)"""
project = {
'name': 'LevelCraft',
'tagline': 'Augmentations and Item Leveling for Minecraft',
'description': 'A closed-source progression plugin introducing item-leveling mechanics and augmentations to enhance gameplay loops.',
'long_description': (
'LevelCraft brings a configurable progression system to your Minecraft server. Players can level items over time, '
'apply augmentations, and pursue long-term goals while maintaining server performance and balance. '
'Built with Java and the Spigot/Paper APIs using a Gradle build setup.'
),
'version': 'Latest',
'status': 'Active',
'compatibility': '1.21.x',
'server_types': ['Spigot', 'Paper'],
'technologies': ['Java', 'Spigot API', 'Paper API', 'Gradle'],
'features': [
'Item leveling mechanics tied to gameplay progression',
'Augmentations to enhance items and gear',
'Configurable XP curves and progression settings',
'Permission-based access control',
'Efficient, production-ready design'
],
'commands': [],
'links': {},
'installation': [
'go on devanturas.net using mc 1.21.x'
]
}
return render_template('project_detail.html', project=project)
@app.route('/projects/simpleteleport')
def simpleteleport():
"""Detailed page for SimpleTeleport"""
project = {
'name': 'SimpleTeleport',
'tagline': 'Complete teleportation solution for Minecraft servers',
'description': 'A comprehensive and lightweight teleportation plugin providing essential teleport features with an intuitive command system and full permission control.',
'long_description': (
'SimpleTeleport is designed to be lightweight and efficient while providing all essential teleportation features your server needs. '
'Set homes, create warps, manage spawn points, and teleport back to previous locations - all with extensive configuration options and customizable messages. '
'Perfect for survival servers, minigame servers, or any server that wants reliable teleportation without complexity.'
),
'version': '1.0',
'status': 'Active',
'compatibility': '1.19 - 1.21',
'server_types': ['Spigot', 'Paper', 'Bukkit'],
'technologies': ['Java', 'Spigot API', 'Paper API', 'Bukkit API'],
'features': [
'Complete home system with configurable limits per player',
'Server-wide warp system for public teleport points',
'Spawn management with first-join and death respawn options',
'Back command to return to your last location',
'Comprehensive permission system for fine-grained access control',
'Full configuration with customizable messages and placeholders',
'Color code support with & codes',
'YAML-based data storage for easy backup and transfer',
'Teleport delays with optional movement/damage cancellation',
'Economy integration support (Vault) with configurable costs',
'Command cooldowns to prevent spam'
],
'commands': [
{'command': '/sethome', 'description': 'Set your personal home location', 'permission': 'SimpleTeleport.sethome'},
{'command': '/home', 'description': 'Teleport to your home', 'permission': 'SimpleTeleport.home'},
{'command': '/home <player>', 'description': 'Teleport to another player\'s home', 'permission': 'SimpleTeleport.home.others'},
{'command': '/warp <name>', 'description': 'Teleport to a warp point', 'permission': 'SimpleTeleport.warp'},
{'command': '/setwarp <name>', 'description': 'Create a new warp point', 'permission': 'SimpleTeleport.setwarp'},
{'command': '/warps', 'description': 'List all available warps', 'permission': 'SimpleTeleport.warps'},
{'command': '/spawn', 'description': 'Teleport to the server spawn', 'permission': 'SimpleTeleport.spawn'},
{'command': '/spawn set', 'description': 'Set the server spawn location', 'permission': 'SimpleTeleport.setspawn'},
{'command': '/back', 'description': 'Teleport to your last location', 'permission': 'SimpleTeleport.back'}
],
'technical_highlights': [
'Configurable teleport delays with countdown messages',
'Optional cancellation on player movement or damage',
'Maximum homes per player with world restrictions',
'First-join and death respawn spawn options',
'Death location saving for /back command',
'Economy costs for homes, warps, and spawn (requires Vault)',
'Command cooldowns with configurable timers',
'Placeholder support: {player}, {warp}, {location}',
'Human-readable YAML data storage'
],
'links': {
'hangar': 'https://hangar.papermc.io/SimolZimol/SimpleTeleport',
'spigot': 'https://www.spigotmc.org/resources/simpleteleport.130115/',
'modrinth': 'https://modrinth.com/plugin/simpleteleports'
},
'installation': [
'Download the latest JAR from Hangar, Spigot, or Modrinth',
'Place the JAR into your server plugins/ folder',
'Start the server to generate config.yml and messages.yml',
'Configure settings in config.yml (teleport delays, home limits, etc.)',
'Customize messages in messages.yml with color codes',
'Reload the server or use /reload to apply changes'
]
}
return render_template('project_detail.html', project=project)
if __name__ == '__main__':
# Allow overriding via environment (e.g., Coolify sets PORT)
port = int(os.getenv('PORT', '5000'))
debug = os.getenv('FLASK_DEBUG', 'false').lower() == 'true'
app.run(debug=debug, host='0.0.0.0', port=port)