Board Game Code Refactoring and Optimization

Job ID: 40528456

Budget: $250 – $750 USD

Project Brief: https://docs.google.com/document/d/1ZrUvtWnuuRzfyejAWI1QEKIAhDrM-ngzMl4ZgxCIvJY/edit?tab=t.0

Job Description:I have a fully functioning, single-player web-based board game that was generated using an AI LLM (Claude). The game runs completely in a single HTML file, but at 2,623 lines, it has become too monolithic and unmanageable for further feature development.The game uses standard HTML/CSS for the UI (no Canvas) and vanilla JavaScript for the engine.Current File Breakdown:~220 lines of HTML markup~93 lines of CSS~2,310 lines of Vanilla JavaScript (handles board resolver, play-by-play engine, stats, local persistence, and UI rendering).

Scope of Work:
1. Deconstruct the Monolith: Separate the CSS, HTML, and JavaScript into their own distinct files.
2. Modularize the JavaScript: Split the 2,310 lines of JS into clean, ES6 modules based on concerns (e.g., separating the core engine logic, persistence/storage, and UI rendering/DOM manipulation).
3. Code Audit & Cleanup: Optimize redundant state management, ensure clean variable scoping, and fix any brittle "AI-written" code structures without breaking the existing game rules or logic.
4. Responsive Check: Ensure the standard HTML grid/layout scales smoothly across desktop and mobile browsers.

Requirements:
1. Strong expertise in native Vanilla JavaScript (ES6+), semantic HTML5, and CSS3.
2. Proven experience refactoring legacy or tightly coupled codebase architectures into modular structures.
3. Experience dealing with AI-generated code quirks is a major plus.
4. Must provide clean, well-commented code.

Helpful but not required: Understanding of Baseball and dice board games