Skip to content

Commit 00be05b

Browse files
committed
feat: add browser-native SQL drivers via WebAssembly and update documentation
1 parent 28514d7 commit 00be05b

4 files changed

Lines changed: 444 additions & 112 deletions

File tree

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,12 @@ ObjectQL is organized as a Monorepo to ensure modularity and universal compatibi
4646
| **[`@objectql/driver-sql`](./packages/drivers/sql)** | Node.js | SQL database driver (PostgreSQL, MySQL, SQLite, SQL Server) via Knex. |
4747
| **[`@objectql/driver-mongo`](./packages/drivers/mongo)** | Node.js | MongoDB driver with native aggregation pipeline support. |
4848
| **[`@objectql/driver-memory`](./packages/drivers/memory)** | Universal | **In-Memory Driver.** Zero dependencies, perfect for testing and browser apps. |
49-
| **[`@objectql/driver-localstorage`](./packages/drivers/localstorage)** | Browser | **Browser Storage.** Persistent client-side storage using LocalStorage. |
5049
| **[`@objectql/driver-fs`](./packages/drivers/fs)** | Node.js | File system driver with JSON file-based persistent storage. |
5150
| **[`@objectql/driver-excel`](./packages/drivers/excel)** | Node.js | Excel file driver for using `.xlsx` spreadsheets as a data source. |
5251
| **[`@objectql/driver-redis`](./packages/drivers/redis)** | Node.js | Redis driver (example/template implementation for key-value stores). |
5352
| **[`@objectql/sdk`](./packages/drivers/sdk)** | Universal | **Remote HTTP Driver.** Type-safe client for connecting to ObjectQL servers. |
54-
55-
### Runtime Layer
56-
57-
| Package | Environment | Description |
58-
| :--- | :--- | :--- |
59-
| **[`@objectql/server`](./packages/runtime/server)** | Node.js | HTTP server adapter for Node.js, Express, Next.js with REST and metadata APIs. |
53+
| **[`@objectql/driver-sqlite-wasm`](./packages/drivers/sqlite-wasm)** | Browser | **SQLite WASM Driver.** Browser-native SQL via WebAssembly + OPFS persistence. *(Coming Soon)* |
54+
| **[`@objectql/driver-pg-wasm`](./packages/drivers/pg-wasm)** | Browser | **PostgreSQL WASM Driver.** Full PG feature set in the browser via PGlite. *(Coming Soon)* |
6055

6156
### Tools Layer
6257

@@ -160,23 +155,30 @@ ObjectQL isolates the "What" (Query) from the "How" (Execution).
160155
* Perfect for testing, prototyping, and client-side state management
161156
* See [Browser Demo](./examples/browser-demo/) for live examples
162157

163-
#### LocalStorage Driver (`@objectql/driver-localstorage`)
158+
#### SQLite WASM Driver (`@objectql/driver-sqlite-wasm`) *(Coming Soon)*
159+
160+
* **Browser-native SQL** via WebAssembly (~300KB gzip)
161+
* **OPFS persistence** — GB-scale storage, data survives page refreshes
162+
* Reuses the Knex SQLite dialect — same query compilation as `driver-sql`
163+
* Perfect for offline-first apps and PWAs
164+
165+
#### PostgreSQL WASM Driver (`@objectql/driver-pg-wasm`) *(Coming Soon)*
164166

165-
* **Browser-native persistence** - Data survives page refreshes
166-
* Built on Web Storage API
167-
* Perfect for offline apps, PWAs, and user preferences
168-
* See [LocalStorage Demo](./examples/browser-localstorage-demo/) for examples
167+
* **Full PostgreSQL in the browser** via PGlite (~3MB gzip)
168+
* JSONB, full-text search, arrays, range types
169+
* IndexedDB/OPFS persistence
170+
* For apps that need PG-specific features client-side
169171

170172
### Browser Support 🌐
171173

172174
ObjectQL runs **natively in web browsers** with zero backend required! This makes it perfect for:
173175

174176
- 🚀 **Rapid Prototyping** - Build UIs without server setup
175-
- 📱 **Offline-First Apps** - PWAs with client-side data
177+
- 📱 **Offline-First Apps** - PWAs with client-side data via WASM SQL drivers
176178
- 🎓 **Educational Tools** - Interactive learning experiences
177179
- 🧪 **Testing** - Browser-based test environments
178180

179-
**Try it now:** Check out our interactive [Browser Demo](./examples/browser-demo/) and [LocalStorage Demo](./examples/browser-localstorage-demo/)!
181+
**Try it now:** Check out the [Browser Example](./examples/integrations/browser/)!
180182

181183
```javascript
182184
// Running ObjectQL in the browser - it's that simple!
@@ -296,9 +298,9 @@ This validation logic runs:
296298

297299
## 📊 Implementation Status
298300

299-
**Current Version:** 4.0.x
300-
**Overall Completion:** ~80%
301-
**Protocol Compliance:** 80/100 (see [Protocol Compliance Report](./PROTOCOL_COMPLIANCE_REPORT.md))
301+
**Current Version:** 4.2.0
302+
**Overall Completion:** ~85%
303+
**Protocol Compliance:** 85/100 (see [Protocol Compliance Report](./PROTOCOL_COMPLIANCE_REPORT.md))
302304

303305
### Production-Ready Features ✅
304306

@@ -310,10 +312,8 @@ ObjectQL has **mature, production-ready implementations** of core features:
310312
-**Action System (100%)** - Custom RPC operations
311313
-**Repository Pattern (100%)** - Full CRUD operations
312314
-**Security Plugin (100%)** - Comprehensive RBAC, FLS, and RLS with pre-compiled permission checks
313-
-**8 Database Drivers (100%)** - SQL, MongoDB, Memory, LocalStorage, FS, Excel, Redis, SDK
315+
-**7 Database Drivers (100%)** - SQL, MongoDB, Memory, FS, Excel, Redis, SDK
314316
-**3 Protocol Implementations** - GraphQL (85%), OData V4 (80%), JSON-RPC 2.0 (90%)
315-
-**AI Agent (100%)** - AI-powered code generation
316-
-**Server Runtime (95%)** - REST, GraphQL, Node.js adapters
317317
-**CLI Tools (100%)** - Complete development lifecycle
318318
-**VSCode Extension (90%)** - IntelliSense and validation
319319

@@ -333,9 +333,9 @@ ObjectQL has **mature, production-ready implementations** of core features:
333333

334334
These features have type definitions but require implementation in your application:
335335

336-
- ⚠️ **Workflows** - Build using state machine validation + hooks
337-
- ⚠️ **Audit Trails** - Use hooks to track changes (or use the security plugin's audit logging for permission checks)
338-
- ⚠️ **Multi-tenancy** - Filter by tenant ID in hooks
336+
- 🔜 **Workflows** - `@objectql/plugin-workflow` planned (Q1 Phase 3) — full state machine executor
337+
- 🔜 **Multi-tenancy** - `@objectql/plugin-multitenancy` planned (Q2) — automatic tenant isolation
338+
- ⚠️ **Audit Trails** - Use hooks to track changes (or use the security plugin's audit logging)
339339
- ⚠️ **Reports** - Use query API + external libraries
340340

341341
### Key Documents

0 commit comments

Comments
 (0)