💡 Inspiration
The idea for O2N (Old-to-New) was born out of shared developer pain. Every year, trillions of dollars are spent maintaining legacy systems. Migrating old PHP scripts, legacy Python loops, or monolithic systems to modern stacks (like FastAPI or Next.js) is a nightmare. It is slow, manual, security-risky, and prone to breaking changes.
We asked ourselves: “Why can’t developers have a map and a compass for migration? What if we could use AI to scan, audit, and translate codebases into clean architectures in seconds, right from their local computer?” That is how O2N was born.
🚀 What it does
O2N is a premium codebase modernization console that guides developers through a 4-step wizard:
- Select Codebase: Instantly select a local directory using a native Windows File Explorer popup, or provide a public GitHub URL.
- Analyze & Map: O2N scans the files, runs static checks, categorizes security and syntactic findings, and automatically detects legacy tech to recommend the best target stack (e.g., PHP -> FastAPI).
- Slices & Configure: Select exactly which files to convert, specify custom output directories, and customize your targets.
- Interactive Preview: Review source code vs. modernized code side-by-side with tabbed navigation, post-conversion validation findings, and quick clipboard copying.
🛠️ How we built it
We integrated a robust stack to deliver a seamless developer experience:
- Frontend: Built with Next.js 16 and React 19 using client-only dynamic loading to bypass server hydration limits. We styled the interface with a custom Vercel-inspired glassmorphism Dark Theme.
- Backend: Built a high-performance FastAPI application. We implemented an isolated PowerShell subprocess loop to pop up the native Windows folder picker on the desktop without freezing the server threads.
- AI Agent Pipeline: Leveraged LangGraph to manage state and ran file translations using Claude Sonnet 5 (via the Anthropic API). We structured prompt formats to return precise, validated JSON file arrays and parse text blocks securely.
🚧 Challenges we ran into
- Headless Terminal Dialogs: Running a GUI dialog (
tkinter) inside a background command terminal caused the server thread to freeze. We overcame this by shifting to an isolated PowerShell Windows Forms subprocess that captures output and terminates cleanly. - Browser Extension Hydration Mismatches: Ad-blockers and browser shields (like Brave) inject styling attributes onto the DOM, causing React to crash with hydration mismatch overlays. We resolved this by refactoring the dashboard into a client-only dynamically imported component and adding console error interceptors.
- AI Thinking Blocks: Newer models return thinking streams that lack standard text properties, crashing standard JSON parsers. We rewrote the backend parsing module to securely extract text blocks and handle markdown blocks.
🎉 Accomplishments that we're proud of
- 100% Native OS Access: Bridging the web-to-desktop gap with a fully functional local directory picker.
- Dynamic Recommendations: Writing logic that scans files first and sets up stack defaults automatically based on actual codebase contents.
- Side-by-Side Visuals: Creating a stunning, glassmorphic UI that feels premium and responsive.
📚 What we learned
We learned the complexity of orchestrating LLMs for structural JSON code generation. Generating multi-file directory structures requires rigorous schema validation, safe path mapping (preventing directory traversal attacks), and robust error handling for API latency.
🔮 What's next for O2N
We plan to build:
- AST-based Code Dependency Graphs: Generating a visual interactive node graph of how legacy files import/depend on each other.
- Deep Semgrep Auditing: Fully integrating local containerized Semgrep scans for deep compliance analysis before and after conversion.
- Direct Git Commit Integration: Pushing the modernized codebase to a new branch automatically.
Built With
- anthropiapikey
- fastapi
- langraph
- moongodb
- nextjs
- python
- semgrep
- treesitter

Log in or sign up for Devpost to join the conversation.