Ahmad Fatih Hibatillah
Universitas Islam Negeri Sunan Kalijaga Yogyakarta, Yogyakarta

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Automating Clean Architecture Conformance via AST-Based Code Smell Detection and Auto-Refactoring in Laravel Projects Ahmad Fatih Hibatillah; Fitri Wulandari
Journal of Information System Research (JOSH) Vol 7 No 4 (2026): July 2026
Publisher : Forum Kerjasama Pendidikan Tinggi (FKPT)

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.47065/josh.v7i4.10618

Abstract

While MVC frameworks like Laravel accelerate development, their inherent architectural flexibility frequently induces structural code smells such as fat controllers and direct database access that inevitably lead to architectural erosion and technical debt. This research proposes a Visual Studio Code (VS Code) extension designed to automate Clean Architecture conformance through real-time Abstract Syntax Tree (AST) parsing. Utilizing the Tree-sitter parsing system, the extension continuously evaluates the codebase to detect architectural violations. Beyond passive diagnostics, the tool facilitates interactive auto-refactoring. To ensure business logic integrity during migration, the refactoring engine employs deterministic AST node transformations that safely isolate data access operations into dedicated service layers without altering operational behavior. Evaluation through Black-Box Testing confirmed high detection accuracy across predefined architectural anti-patterns. Furthermore, User Acceptance Testing (UAT) conducted with industry experts yielded an average acceptance score of 4.18 out of 5.00. Ultimately, this AST-based approach provides a pragmatic solution to actively prevent architectural decay, mitigate technical debt, and significantly enhance the long-term maintainability of Laravel-based projects. The main contribution of this research is the transition of architectural code smell mitigation from a passive diagnostic reporting mechanism into an active, real-time, AST-driven auto-refactoring tool directly integrated within the developer's workspace.