CodeForge: Design and Implementation of an AI-Enhanced Browser-Based Online Integrated Development Environment with Sandboxed Code Execution and Dual-Mode AI Assistance
Keywords:
Online IDE, Monaco Editor, Code Execution Sandbox, AI Code Assistant, Dual-Mode AI, Flask, Bootstrap 5, Docker, Gemini API, SQLite, Browser-Based Development, Code Snippet Management.Abstract
This paper presents CodeForge, a comprehensive browser-based Online Integrated Development Environment (IDE)
that eliminates the installation and configuration barriers associated with traditional desktop development tools.
CodeForge integrates the Monaco Editor — the engine powering Visual Studio Code — with syntax highlighting and
IntelliSense for six programming languages (Python, JavaScript, Java, C++, HTML, and CSS), a sandboxed
subprocess-based Python execution engine with configurable import blocking and a 10-second timeout, and a dualmode
AI assistant supporting code analysis, explanation, refactoring, and generation through both an offline patternbased
engine (15+ templates) and online Google Gemini API integration. The system is built as a full-stack Flask web
application with SQLite persistence, Bootstrap 5 dark-themed responsive UI with emerald-green accents, and Docker
containerization for portable deployment. Formally, the system enforces security as is_safe(C) = ∀ b ∈ B : ('import '
+ b) ∉ tokens(C), preventing execution of code referencing any of 11 blocked modules. The AI selection function
R(action, C, l) provides Gemini-powered responses when available and falls back to deterministic pattern matching
otherwise, ensuring consistent availability. Comprehensive testing across 21 test cases achieves a 100% pass rate.
Comparative evaluation confirms CodeForge's superiority over Replit, CodePen, JSFiddle, Jupyter Notebooks, and
VS Code Web in the combination of AI-assisted coding, self-hostability, zero cost, and Monaco-grade editing.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Authors

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.










