Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fe1e6d6
Add web client infrastructure: cpp-httplib server + React SPA frontend
tdev511 Apr 13, 2026
940f9b1
Add JWT auth, metadata API, and data read endpoints (Phase 2)
tdev511 Apr 13, 2026
0520982
docs: update engineering playbook with web client sections
tdev511 Apr 13, 2026
5a14704
docs: update research with code verification results
tdev511 Apr 14, 2026
4d8a8e4
Add form serializer and Formily renderer (Phase 3)
tdev511 Apr 14, 2026
5baa988
Add SPA layout, list views, and data components (Phase 4)
tdev511 Apr 14, 2026
10d52fc
Add reports, registers, charts, SSE events, and embed support (Phase …
tdev511 Apr 14, 2026
f95b7e2
Add web designer — browser-based configurator (Phase 7)
tdev511 Apr 14, 2026
97c2009
Add web debugger, AI assistant, and plugin system (Phase 8+9)
tdev511 Apr 14, 2026
545c6fc
Merge branch 'develop' of https://github.com/open-enterprise-solution…
tdev511 Apr 14, 2026
3995c6d
Fix Clang/macOS build: cross-platform compatibility fixes
tdev511 Apr 14, 2026
ed66776
Fix cross-platform build: all 10 targets compile on macOS/Clang
tdev511 Apr 14, 2026
11f4802
Fix CreateServerAppDataEnv: use Firebird when PostgreSQL unavailable
tdev511 Apr 14, 2026
3a2083e
Fix MSVC build: include path fix, auth improvements, frontend tweaks
tdev511 Apr 14, 2026
9255cc0
Fix login flow: token storage, auth provider, and anonymous login
tdev511 Apr 14, 2026
44061d0
Fix JWT: add DecodePayload fallback, allow anonymous sub
tdev511 Apr 14, 2026
bc93271
Add SPA fallback: non-API routes serve index.html for client-side rou…
tdev511 Apr 14, 2026
b8494df
Fix metadata loading: unwrap {data:{...}} response, fix MetaObjectRef…
tdev511 Apr 14, 2026
3f25b9a
Fix data display: map DB column names to attribute names, fix routing
tdev511 Apr 14, 2026
1a338fd
Remove all mock data, fix columns and forms from metadata
tdev511 Apr 14, 2026
1f81e94
Fix data types: read dates, numbers, booleans from correct DB columns
tdev511 Apr 14, 2026
360682e
Refactor: centralize resource mapping, fix designer tree, fix forms
tdev511 Apr 14, 2026
d49f083
Stabilize: fix login UI, reports routing, section overview, error han…
tdev511 Apr 14, 2026
54d20ef
Fix form data loading: unwrap {data:{...}} response, fix designer tree
tdev511 Apr 14, 2026
3955014
Link frontend.dll to daemon — enables ibValueForm and all 22 controls…
tdev511 Apr 14, 2026
d9a8654
Add ibWebMainFrame — enables CreateNewForm() in daemon service mode
tdev511 Apr 14, 2026
a92c1d5
Add ibWebVisualHost + ibWebControlProxy — server-side form rendering …
tdev511 Apr 14, 2026
ec8395a
Add ibWebSessionManager + session API routes
tdev511 Apr 14, 2026
834143f
docs: document server-side form rendering architecture
tdev511 Apr 14, 2026
8c65dad
Add React FormRenderer + useFormSession hook for server-side form ren…
tdev511 Apr 15, 2026
91dc7c2
Fix session route registration + session ID move-after-use bug
tdev511 Apr 15, 2026
e95574e
Fix SEGFAULT + production UI overhaul + bug fixes
tdev511 Apr 15, 2026
aa30490
Add smart control types: date picker, number input, reference lookup
tdev511 Apr 15, 2026
504d8f9
Fix enrichment: case-insensitive section name lookup for metadata typ…
tdev511 Apr 15, 2026
ce77380
Add CommandBar + properties panel to FormSessionPage — matches OesSch…
tdev511 Apr 15, 2026
dac181e
Fix form: load record data, remove duplicate header, add fillLayoutVa…
tdev511 Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,12 @@ build/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc

# Web client
web/node_modules/
web/dist/
web/.env.local

# Research docs (internal only)
docs/RESEARCH-*
105 changes: 99 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file gives an AI assistant (Claude Code or similar) the context needed to w

**Open Enterprise Solutions (OES)** is a C++17 cross-platform low-code enterprise application platform, conceptually similar to 1C:Enterprise. It lets developers define business applications through metadata (object types, forms, modules) and a built-in scripting language, without writing low-level code.

The runtime executes compiled bytecode, renders forms through wxWidgets, and stores all application data in a relational database (Firebird by default).
The runtime executes compiled bytecode, renders forms through wxWidgets (desktop) or a browser-based React SPA (web client), and stores all application data in a relational database (Firebird by default).

---

Expand All @@ -17,9 +17,12 @@ The runtime executes compiled bytecode, renders forms through wxWidgets, and sto
| Area | Technology |
|---|---|
| Language | C++17 |
| GUI | wxWidgets 3.3.2 (git submodule at `src/3rdparty/wxWidgets`) |
| Desktop GUI | wxWidgets 3.3.2 (git submodule at `src/3rdparty/wxWidgets`) |
| Web client | React SPA — Refine v5, shadcn/ui, Formily (in `web/`) |
| HTTP server | cpp-httplib (header-only, `src/3rdparty/cpp-httplib/httplib.h`) |
| JSON | nlohmann/json (`src/3rdparty/nlohmann/json.hpp`) |
| Build (Windows) | MSBuild — `enterprise.sln` (Visual Studio 2019/2022) |
| Build (cross-platform) | CMake — planned, `CMakeLists.txt` does not exist yet |
| Build (cross-platform) | CMake — `CMakeLists.txt` |
| Primary database | Firebird (embedded) |
| Optional databases | PostgreSQL, SQLite, MySQL, ODBC |
| License | LGPL 2.1 |
Expand All @@ -33,19 +36,28 @@ enterprise/
├── enterprise.sln # 9-project MSBuild solution
├── Common.props # Shared output paths and macros
├── ConfigurationDefs.props # Per-configuration preprocessor defines
├── CMakeLists.txt # Cross-platform CMake build
├── CLAUDE.md # This file
├── docs/
│ ├── ARCHITECTURE.md
│ └── BUILD.md
├── web/ # Web client (React SPA)
│ ├── src/ # TypeScript/React source
│ ├── dist/ # Built static files (served by daemon)
│ └── package.json
└── src/
├── 3rdparty/wxWidgets/ # Submodule
├── 3rdparty/
│ ├── wxWidgets/ # Submodule
│ ├── cpp-httplib/ # HTTP server (header-only)
│ └── nlohmann/ # JSON library (header-only)
└── engine/
├── backend/ # backend.dll — engine, compiler, DB, metadata, debugger
│ └── webServer/ # ibWebServer — HTTP server (cpp-httplib wrapper)
├── frontend/ # frontend.dll — wxWidgets UI, form renderer
├── enterprise/ # enterprise.exe
├── designer/ # designer.exe (IDE)
├── launcher/ # launcher.exe (connection chooser)
├── daemon/ # daemon.exe (background service)
├── daemon/ # daemon.exe (background service + HTTP server)
├── codeRunner/ # codeRunner.exe
├── classChecker/ # classChecker.exe
└── simplePlugin/ # simplePlugin.dll (example)
Expand Down Expand Up @@ -169,6 +181,70 @@ These are located primarily in the compiler and metadata loading paths. They mas

---

## Web Server

### Architecture

The web server uses **server-side form rendering** — forms live in memory on the server, browser receives JSON layouts and sends events back. daemon.exe links both backend.dll and frontend.dll.

```
Browser (React SPA)
│ HTTP (JSON layouts + events)
daemon.exe (backend.dll + frontend.dll)
├─ ibWebServer (cpp-httplib) ──► /api/* endpoints
├─ ibWebSessionManager ──► per-user sessions with forms in memory
├─ ibWebMainFrame ──► enables CreateNewForm() in service mode
└─ ibWebVisualHost ──► builds JSON proxy tree from ibValueForm
backend.dll ──► Database
```

### Key Files

| File | Purpose |
|---|---|
| `src/engine/backend/webServer/ibWebServer.h` | HTTP server (cpp-httplib wrapper) |
| `src/engine/frontend/visualView/webHost/ibWebVisualHost.h` | Server-side form rendering → JSON |
| `src/engine/frontend/visualView/webHost/ibWebControlProxy.h` | wxObject replacement for web |
| `src/engine/daemon/ibWebMainFrame.h` | CreateNewForm() in service mode |
| `src/engine/daemon/ibWebSessionManager.h` | Per-user sessions with forms |
| `src/engine/daemon/ibWebSessionRoutes.cpp` | Session API endpoints |
| `web/` | React SPA frontend (Vite + TypeScript) |

### Running the Web Server

```bash
# Start daemon with web server
./daemon --srv localhost --db mydb --ib_usr admin --ib_pwd "" --web-port 8765

# Test health endpoint
curl http://localhost:8765/api/health
```

### Web Client Stack

| Technology | Purpose |
|---|---|
| Refine v5 | CRUD framework, routing, auth |
| shadcn/ui | UI components (@oes/theme preset) |
| Formily v2 | JSON Schema → rendered forms |
| Phosphor Icons | 9000+ professional icons |
| AG Grid | Heavy data tables |
| Monaco Editor | Code editor (web designer/debugger) |

### Building the Web Client

```bash
cd web
npm install
npm run build # → web/dist/ (served by daemon)
npm run dev # → http://localhost:5173 (dev mode with API proxy)
```

---

## Build Commands

### Windows — MSBuild (preferred)
Expand Down Expand Up @@ -212,7 +288,7 @@ All feature work happens on branches cut from `develop`. Pull requests target `d
| Member variables | `m_` prefix | `m_pByteCode`, `m_strName` |
| Static members | `s_` prefix | `s_instance`, `s_listKeyWord` |
| Compile-time constants | `g_` prefix | `g_metaCatalogCLSID` |
| Macros (singletons) | lower camelCase | `appData`, `db_query`, `activeMetaData`, `debugServer` |
| Macros (singletons) | lower camelCase | `appData`, `db_query`, `activeMetaData`, `debugServer`, `webServer` |
| File names | camelCase or lowerCamelCase | `compileCode.cpp`, `databaseLayer.h` |
| CLSID strings | `XX_YYY` pattern | `"MD_CAT"`, `"VL_NUMB"` |

Expand Down Expand Up @@ -323,3 +399,20 @@ CI/CD, cross-platform builds (MSBuild + CMake), release management. PRs → deve

### Code Refactorer (`oes-code-refactorer`)
Fixes MSVC-specific code for Clang/GCC, breaks circular includes, modernizes to C++17 where appropriate. One refactoring per PR.

### Web Client Agents

| Agent | Purpose |
|---|---|
| `oes-frontend-engineer` | React, Refine, shadcn, Formily, API integration |
| `oes-api-builder` | REST API design, cpp-httplib handlers, JWT auth |
| `oes-ux-optimizer` | UX flows, navigation, keyboard-first patterns |
| `oes-ui-polisher` | Visual polish, animations, Enterprise Sharp design |
| `oes-design-system` | @oes/ui registry, Tailwind preset, ERP components |
| `oes-ai-integration` | AI config generation, MCP tools, vibe-coding pipeline |
| `oes-content-writer` | UX copywriting, error messages, tooltips, i18n |
| `oes-mobile-optimizer` | Responsive, PWA, touch, offline |
| `oes-accessibility` | WCAG, keyboard nav, screen readers |
| `oes-analytics-engineer` | Usage tracking, funnels, performance metrics |
| `oes-load-tester` | Load testing API, concurrent users |
| `oes-integration-master` | MCP servers, iframe embed, webhooks |
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ else()
add_compile_options(-Wall -Wno-unused-parameter -Wno-sign-compare)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-deprecated-declarations)
# Allow MSVC extension: binding temporary to non-const lvalue reference
# Used extensively in OES codebase (e.g. SaveData(ibWriterMemory& = ibWriterMemory()))
add_compile_options(-fms-extensions)
endif()
endif()

Expand Down
Loading