Cross-platform infrastructure libraries by Rajeev Kumar Joshi.
rajeev-sdk is a modular, cross-platform infrastructure monorepo designed to eliminate business logic duplication across mobile, web, and edge environments. It centralizes critical operations—such as secure storage, network requests, data synchronization, and localization—into a high-performance, memory-safe Rust core.
These core components are exposed to native platforms and JavaScript runtimes via automatically generated type-safe bindings (using UniFFI and WebAssembly). The SDK also provides a comprehensive suite of front-end TypeScript packages for building robust application shells.
- Unified Rust Core: Critical paths (cryptography in
vault, offline-first synchronization insync) are written once in Rust, ensuring deterministic behavior and memory safety across all platforms. - Type-Safe FFI Boundaries: Uses Mozilla's UniFFI and
wasm-bindgento emit idiomatic Swift, Kotlin, and TypeScript interfaces automatically. - Pluggable Architecture: Components are strictly isolated in a monorepo setup (managed by Turborepo and Cargo), allowing consumers to adopt packages incrementally.
- Zero-Knowledge Secure Storage: The
vaultpackage utilizes AES-GCM and PBKDF2 for robust, cross-platform local encrypted storage (backed by SQLite/Rusqlite).
The project employs a hub-and-spoke FFI architecture:
- Rust Core (
packages/<module>/rust-core): The central implementation of all logic, state management, and side-effects. - FFI Layer: UniFFI generates C-ABI bindings and native scaffolds. For the web,
wasm-bindgenemits WebAssembly modules. - Language Wrappers (
packages/<module>/ts-wrapper): Idiomatic TypeScript APIs that internally call the Rust Core.
| Category | Technology |
|---|---|
| Languages | Rust (Edition 2024), TypeScript (5.9) |
| Build Systems | Turborepo, Cargo, Yarn 1.x |
| FFI & Bindings | UniFFI, wasm-bindgen |
| Core Libraries | serde, thiserror, aes-gcm, rusqlite, tokio |
| Runtimes | Node.js (>=18.0.0), WebAssembly, iOS Native, Android Native |
rajeev-sdk/
├── packages/
│ ├── vault/ # Secure storage (AES-GCM, SQLite)
│ ├── network/ # Networking layer
│ ├── sync/ # Offline-first data synchronization
│ ├── locale/ # Internationalization & l10n
│ ├── ui/ # Shared TS UI components
│ ├── app-shell/ # Core application scaffolding
│ ├── edge-ai/ # On-device AI processing utilities
│ ├── media/ # Media and camera abstractions
│ └── ... # Other TS abstractions (auth, payments, etc.)
├── examples/ # Reference integrations
│ ├── campus-connect/ # Multi-platform demonstration apps (Web, iOS, Android, WatchOS)
│ └── ...
├── tools/ # Release automation and platform-specific build scripts
├── Cargo.toml # Root Cargo workspace manifest
└── package.json # Root Node/Yarn workspace and Turborepo configuration
- Node.js
>= 18.0.0 - Yarn
1.x(Classic) - Rust Toolchain (latest stable via
rustup) - Platform-specific build chains (Xcode for iOS, Android Studio/NDK for Android)
-
Clone the repository:
git clone https://github.com/Rajeev02/rajeev-sdk.git cd rajeev-sdk -
Install Node dependencies:
yarn install
-
Build the Rust Core (Wasm/Native):
npm run build:rust
-
Build the TypeScript Wrappers:
npm run build:ts
The repository leverages Turborepo for task orchestration. Common commands include:
| Command | Description |
|---|---|
npm run build |
Full workspace build (Rust + TypeScript). |
npm run build:vault:ios |
Builds the vault module specifically for iOS targets. |
npm run build:vault:android |
Builds the vault module specifically for Android (JNI). |
npm run build:vault:wasm |
Compiles the vault module to WebAssembly. |
npm run clean |
Cleans Cargo targets and removes dist/node_modules across the tree. |
Testing is split across the Rust backend and the TypeScript frontend.
Run Rust Unit & Integration Tests:
npm run test:rust
# or directly: cargo test --workspaceRun TypeScript Tests:
npm run test:ts
# or directly: yarn workspaces foreach run testThe tools/ directory contains custom automation for semantic versioning and package registry publishing.
- Verify Release (Dry Run):
npm run release:dry
- Bump Versions (Patch/Minor/Major):
npm run release:patch
- Publish to Registry:
npm run publish:all
- Fork the repository and branch from
main. - Implement your feature or bug fix within the appropriate
rust-coreor TS package. - Verify that
npm run test:rustandnpm run test:tspass. - Submit a Pull Request. Ensure that API changes in Rust are reflected in UniFFI definitions.
This project is licensed under the MIT License. See the LICENSE file for details.