How viethann/game-giai-ma-kho-bau works
Project type and purpose
• This is a full-stack monolithic web application built with Flask.
• Purpose: an educational “Treasure Hunt” decryption game where users progress through levels by decrypting messages with various algorithms (Caesar, Vigenère, RSA, AES), track progress, and view history.
File structure
• Top-level:
• app.py – defines Flask routes (controllers)
• main.py – application entry point (starts Flask)
• crypto_algorithms.py – business logic for encryption/decryption
• game_data.py – holds level- and practice-mode configurations (models)
• game_history.py – manages persistence of play history (models)
• game_history.json – flat file store for history (data storage)
• Directories:
• templates/ – Jinja2 HTML templates (views)
• static/
– css/style.css (presentation)
– js/game.js (client-side interactivity)
– image/ (assets)
• No external database or microservices: file-based persistence, single Python process.
README for further insights
• Tech stack: Flask, PyCryptodome
• Features highlight MVC pattern: controllers in app.py, views in templates, models in game_data.py & game_history.py
• Game modes (levels vs. practice) drive route logic.