Skip to content

ORYND/Orynd-core

Repository files navigation

Orynd Core

Orynd Core is the headless Expo Native Module backend that powers the Orynd cognitive prosthetic. It bridges React Native with low-level C++ Natural Language Processing libraries (llama.cpp and whisper.cpp) and local SQLite storage.

This repository enforces zero network requests during operation to guarantee absolute privacy and eliminate cloud latency.

🏗️ System Architecture & Low Level Design

graph TD
    UI[React Native Android Client] -->|JSI / Bridge| CORE[Orynd Core C++ Modules]
    
    subgraph Orynd Core Engine
    CORE --> WHISPER[react-native-whisper]
    CORE --> LLAMA[react-native-llama]
    CORE --> SQL[expo-sqlite]
    end
    
    WHISPER -->|Transcribes Audio -> Text| LLAMA
    LLAMA -->|Parses Text -> JSON Intent| SQL
    SQL -->|Persists JSON to Local DB| UI
Loading

🛠️ Technology Stack

  • Framework: React Native (Expo Native Modules)
  • Database: expo-sqlite
  • Speech-to-Text: react-native-whisper (ggml-tiny.en.bin)
  • Local SLM Engine: react-native-llama (Qwen2.5-0.5B-Instruct-Q4 GGUF)

🗄️ Database ER Diagram

The vault relies on a flat schema to rapidly serialize and render intent payloads.

erDiagram
    VAULT_ITEMS {
        string id PK "UUID string"
        string raw_transcript "The exact text output from Whisper"
        string intent_type "Strictly: 'task', 'event', or 'note'"
        string title "Short summary generated by the SLM"
        int due_date "Unix timestamp (nullable)"
        int is_completed "0 (false) or 1 (true)"
        int created_at "Unix timestamp of record creation"
    }
Loading

🔌 API Design

As this is a 100% local app, these are internal service functions acting over the JS/C++ bridge, not remote APIs.

  • startRecording(): Initializes the microphone hardware. Returns .wav absolute path.
  • transcribeAudio(audioPath): Invokes Whisper C++ binary. Returns string transcript.
  • routeIntent(transcript): Injects transcript into Qwen prompt. Returns JSON intent structure ({ intent_type, title, due_date }).
  • saveToVault(parsedData, rawTranscript): Executes SQLite INSERT.
  • getVaultItems(filterType): Selects rows for frontend rendering.

🔒 Security & Rate Limiting

  • Network Security: The INTERNET permission is explicitly stripped from the Android manifest.
  • Data Sandboxing: DB and Models live securely in FileSystem.documentDirectory.
  • Throttling: 1000ms debounce mechanisms at the C++ bridge layer to prevent simultaneous heavy inference threads (protecting against Android OOM crashes).

About

The offline backend engine powering Orynd. A headless React Native module that handles all local Whisper transcription, on-device SLM intent routing, and SQLite storage. It securely transforms raw audio into structured data entirely on your device, ensuring absolute privacy.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors