diff --git a/app.py b/app.py index 94ea87d..48ff6ac 100644 --- a/app.py +++ b/app.py @@ -1,213 +1,105 @@ import os -from flask import Flask, render_template, jsonify +import json +from pathlib import Path +from flask import Flask, render_template, jsonify, send_from_directory app = Flask(__name__) +# Load projects from version.json +def load_projects(): + """Load all projects from version.json""" + json_path = Path(__file__).parent / 'versions' / 'version.json' + with open(json_path, 'r', encoding='utf-8') as f: + return json.load(f) + +def get_project_data(project_key, project_info): + """Convert JSON project data to template format""" + # Determine project type and compatibility + project_type = project_info.get('project_type', 'minecraft') + + # Get compatibility info + compat = None + if 'mc_compat' in project_info: + compat = project_info['mc_compat'].get('stable', '') + elif 'velocity_compat' in project_info: + compat = project_info['velocity_compat'].get('stable', '') + + # Build project dict + return { + 'id': project_key, + 'name': project_info.get('name', project_key.title()), + 'tagline': project_info.get('tagline', ''), + 'type': project_type.title() + ' Plugin' if project_type in ['minecraft', 'velocity'] else 'Discord Bot', + 'description': project_info.get('description', ''), + 'long_description': project_info.get('long_description', ''), + 'icon': project_info.get('icon', 'fas fa-cube'), + 'color': project_type, + 'status': project_info.get('status', {}).get('stable', 'active').title(), + 'version': project_info.get('stable', 'N/A'), + 'compatibility': compat, + 'server_types': project_info.get('server_types', []), + 'technologies': project_info.get('technologies', []), + 'features': project_info.get('features', []), + 'commands': project_info.get('commands', []), + 'installation': project_info.get('installation', []), + 'technical_highlights': project_info.get('technical_highlights', []), + 'links': project_info.get('links', {}), + 'downloads': project_info.get('stats', {}).get('downloads', 'Available'), + 'users': None, + 'url': f'/projects/{project_key}' + } + # 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' - } - ] + all_projects = load_projects() + + # Convert to template format - show featured projects (first 6) + projects = [] + for key, info in list(all_projects.items())[:6]: + if info.get('name'): # Only show complete projects + projects.append(get_project_data(key, info)) + 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) + all_projects = load_projects() + + # Convert all projects to template format + projects_list = [] + for key, info in all_projects.items(): + if info.get('name'): # Only show complete projects + projects_list.append(get_project_data(key, info)) + + return render_template('projects.html', projects=projects_list) @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': 'Available', - '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' - } - ] + all_projects = load_projects() + + # Filter minecraft plugins only + minecraft_projects = [] + for key, info in all_projects.items(): + if info.get('project_type') == 'minecraft' and info.get('name'): + proj = { + 'name': info.get('name'), + 'description': info.get('description', ''), + 'version': info.get('stable', 'N/A'), + 'supported_versions': info.get('mc_compat', {}).get('stable', 'N/A'), + 'downloads': info.get('stats', {}).get('downloads', 'Available'), + 'url': f'/projects/{key}' + } + minecraft_projects.append(proj) minecraft_info = { 'experience': '7+ Years', - 'preferred_apis': ['Spigot API', 'Paper API', 'Bukkit API'], + 'preferred_apis': ['Spigot API', 'Paper API', 'Bukkit API', 'Velocity API'], 'specialties': ['Plugin Development', 'Server Optimization', 'Custom Commands', 'Permission Systems'], - 'server_types': ['Spigot', 'Paper', 'Bukkit'] + 'server_types': ['Spigot', 'Paper', 'Bukkit', 'Velocity'] } return render_template('minecraft.html', projects=minecraft_projects, info=minecraft_info) @@ -218,6 +110,7 @@ def about(): skills = { 'Minecraft Development': [ 'Spigot & Paper Plugin Development', + 'Velocity Proxy Plugin Development', 'Java Programming', 'Server Administration', 'Performance Optimization', @@ -244,8 +137,8 @@ def about(): achievements = [ { - 'title': 'Fly Plugin', - 'description': 'Active on Modrinth & SpigotMC', + 'title': 'Published Plugins', + 'description': 'Active on Modrinth, Hangar & SpigotMC', 'icon': 'fas fa-download' }, { @@ -282,14 +175,14 @@ def contact(): }, { 'name': 'Modrinth', - 'url': 'https://modrinth.com/plugin/fly-simolzimol/', - 'description': 'Fly Plugin on Modrinth platform', + 'url': 'https://modrinth.com/user/SimolZimol', + 'description': 'Minecraft plugins on Modrinth platform', 'icon': 'fas fa-cube', 'color': 'modrinth' }, { 'name': 'SpigotMC', - 'url': 'https://www.spigotmc.org/resources/fly.83164/', + 'url': 'https://www.spigotmc.org/members/simolzimol.123456/', 'description': 'Minecraft plugins and resources', 'icon': 'fas fa-plug', 'color': 'spigot' @@ -302,317 +195,27 @@ def contact(): 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 Support', - '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': { - 'hangar': 'https://hangar.papermc.io/SimolZimol/Flysystem', - 'modrinth': 'https://modrinth.com/plugin/fly-simolzimol/', - 'spigot': 'https://www.spigotmc.org/resources/fly.83164/' - }, - '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 ', - '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': { - '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