Developer shares token cost challenge with Claude-built ERP system

The problem: Single-file architecture doesn't scale with AI assistants
A developer running a small freight forwarding business built a complete ERP system using Claude. The system grew to over 3,000 lines of code in a single HTML file containing all modules: dashboard, shipment tracking, cash flow, driver logs, and customer records.
The core issue: Every time they need to make even a small change, they must load the entire 3,000+ line file into Claude's context window. This consumes approximately 60,000-80,000 tokens per message. For a solo operator, this creates both expense and inefficiency problems.
The root cause is architectural: a single-file monolith forces Claude to re-read and re-understand all 3,000 lines of mixed HTML, CSS, and JavaScript each time, even when only tweaking one small function.
Potential solutions under consideration
The developer is evaluating two approaches:
- Split the file into modules — Separate JavaScript files per feature so only necessary code loads per session
- Migrate to Firebase — This was already on their roadmap and would naturally enforce a modular architecture
They're asking the community for advice on managing large codebases with Claude or other LLMs, specifically how to structure projects to keep token costs reasonable.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude Word Add-in: Parallel Processing of 100+ Page Legal Documents and Multi-Sheet Spreadsheets
Users report syncing multiple 40-100+ page legal documents and 10-worksheet spreadsheets in parallel via the Claude Word add-in, with agents pushing/pulling data and ensuring consistency across entire document packages.

Claude + Remotion: Building a Product Launch Video with Zero Animation Skills
A developer used Claude's deep knowledge of Remotion's API to build a 30-second animated product launch video for a stock market app — no CSS transitions, spring physics, typewriter effects, and staggered animations across 10 scene files.

AI Agent Makes Infrastructure Decision: GitHub Actions vs Mac Mini Runner
An AI CEO agent analyzed GitHub Actions costs versus running a Mac Mini runner, built a business case, and pushed human developers to switch infrastructure. The agent made a real infrastructure call based on cost analysis.

Enterprise AI agents: OpenClaw for channels, custom MCP tools, Cursor CLI runtime
Running AI agents in production for compliance, devops, and finance requires deterministic tooling, not raw API access. This post details a recipe: OpenClaw for channels, custom MCP per process, Cursor CLI as the agent runtime via ACPX, and self-hosted Kubernetes with immutable agent code.