From 91b6deaf7f80125c3515cfe9c9fad0f9d70fd949 Mon Sep 17 00:00:00 2001 From: Sanjay Bhangar Date: Mon, 9 Feb 2026 17:01:15 +0530 Subject: [PATCH] add CLAUDE.md with overall structure and plan to migrate to ES modules --- CLAUDE.md | 185 ++++++++++++++++++++++++++++++++++++ ES_MODULE_MIGRATION_PLAN.md | 119 +++++++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 CLAUDE.md create mode 100644 ES_MODULE_MIGRATION_PLAN.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..aebeecd9 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,185 @@ +# OxJS Codebase Analysis + +## Overview +OxJS is a JavaScript UI framework created around 2008, predating modern JavaScript build tools and module systems. It uses a custom build system and loading mechanism that was innovative for its time but needs modernization. + +## Current Architecture + +### 1. Module Structure +The codebase is organized into distinct modules: +- **Ox**: Core library with utilities (Array, String, Math, Type, etc.) +- **UI**: User interface components and themes +- **Geo**: Geographic utilities +- **Image**: Image manipulation utilities +- **Unicode**: Unicode utilities + +Each module follows the pattern: +``` +source/ +├── ModuleName/ +│ ├── ModuleName.js (module loader) +│ ├── js/ (JavaScript files) +│ └── json/ (locale and config files) +``` + +### 2. Custom Import/Loading System + +#### Core Loader (`source/Ox.js`) +- The framework uses a custom `Ox.load()` function instead of ES modules +- Loading process: + 1. Detects script path from `