Pure JavaScript/TypeScript implementation of EntglDb - A peer-to-peer distributed database with offline-first capabilities.
# Windows
run-demo.bat
# macOS/Linux
./run-demo.sh# Windows
run-electron.bat
# macOS/Linux
./run-electron.sh# Windows
run-react-native.bat
# macOS/Linux
./run-react-native.shOr manually:
cd apps/demo
pnpm install
pnpm demo- @entgldb/protocol - Protocol Buffers definitions
- @entgldb/core - Core database engine (HLC, CRDT, Collections)
- @entgldb/persistence-sqlite - SQLite storage adapter
- @entgldb/network - P2P networking (TCP, WebSocket)
cd apps/sample-electron
pnpm install
pnpm devcd apps/sample-react-native
pnpm install
cd ios && pod install && cd ..
pnpm ios # or pnpm androidpnpm installpnpm buildpnpm testSee walkthrough.md for comprehensive documentation.
- ✅ Hybrid Logical Clocks (HLC) for distributed ordering
- ✅ Last-Write-Wins (LWW) conflict resolution
- ✅ SQLite persistence with WAL mode
- ✅ P2P Sync via TCP with Protocol Buffers (v4)
- ✅ Brotli Compression for efficient bandwidth usage
- ✅ Multi-platform: Node.js, Electron, React Native
- ✅ Type-safe TypeScript API
EntglDb.NodeJs/
├── packages/
│ ├── protocol/ # Protobuf definitions
│ ├── core/ # Database engine
│ ├── persistence-sqlite/ # SQLite adapter
│ └── network/ # P2P networking
└── apps/
├── demo/ # CLI demo
├── sample-electron/ # Desktop app
└── sample-react-native/ # Mobile app
Compatible with EntglDb.NET v0.7.0, EntglDb.Kotlin v0.7.0 Features: Brotli compression, Secure Handshake.
MIT