Codebase Complexity
316,679 Python LOC, 521 doctypes, controller inheritance chains, complexity tiers, and what makes ERPNext hard to migrate.
ModernizeSpec is grounded in a 9-document research series produced during PearlThoughts’ ERPNext modernization effort in February 2026. The research combined deep web search, direct codebase analysis, experiment review, intern team output evaluation, GitHub organization analysis, Microsoft Teams channel analysis, and industry benchmarking.
A full ERPNext migration (all 521 doctypes, 768 API endpoints, 177 reports, full Frappe framework replacement) in 3 months is not achievable — even with unlimited AI credits and experienced engineers. The codebase represents ~216 person-years of effort (COCOMO estimate).
However, a strategically scoped migration of the core accounting engine (the highest-value 15-20% of the codebase) is achievable in 3 months with 3-5 skilled interns using AI tooling.
| Scenario | Scope | Team | Timeline | Feasibility |
|---|---|---|---|---|
| Full ERPNext replacement | 521 doctypes, all modules | 3-5 interns | 3 months | Not feasible |
| Core Accounting engine | ~60 doctypes, GL/AP/AR/Tax | 3-5 interns | 3 months | Achievable with AI |
| Core + Stock + Selling/Buying | ~150 doctypes | 3-5 interns | 6-9 months | Achievable with AI |
| Production-ready ERP (80% parity) | ~400 doctypes + framework | 8-12 engineers | 12-18 months | Achievable with AI |
Codebase Complexity
316,679 Python LOC, 521 doctypes, controller inheritance chains, complexity tiers, and what makes ERPNext hard to migrate.
AI Migration Landscape
Enterprise platforms (Amazon Q Transform, IBM watsonx), success stories (Airbnb 12x compression), and the 8 key patterns from industry research.
Feasibility Forecast
4 scenarios analyzed, Go vs Kotlin comparison, intern velocity data, cost projections ($16.8K-$38.3K for 3 months).
Standard Feasibility
Market gap analysis: no existing standard combines legacy measurement + DDD mapping + extraction sequencing + parity verification. 100% generalizable.
| Phase | Compression | AI Impact |
|---|---|---|
| Understanding legacy code | 5-10x with graph-RAG + code intelligence | High |
| Mechanical translation | 10-50x for typed code | High |
| Test generation | 3-5x for table-driven tests | Medium-High |
| Architecture decisions | 1x (no compression) | None — needs human judgment |
| Framework design | 1x (no compression) | None — needs senior engineering |
No standard combines:
This gap is what ModernizeSpec fills.