Skip to content

EPIC: Implement NodeSpace Business Logic Layer #116

Closed

Description

@malibio

Overview

This epic tracks the complete implementation of the NodeSpace Business Logic Layer - a Rust-based system with libsql that provides core data management, node operations, and AI integration.

Architecture

Pure JSON schema architecture with:

  • packages/core: Universal node model, database layer (libsql + Turso), business services
  • packages/nlp-engine: AI/ML services (embeddings, intent classification via llama.cpp-rs)

Key design principles:

  • Pure JSON Schema: ALL entity data in properties field - no complementary tables, no ALTER TABLE migrations
  • Schema-as-Node: Schemas stored as nodes with node_type = "schema", id = type_name
  • Zero Migration Risk: Critical for desktop apps (10,000+ user machines, no rollback possible)
  • Rule-Based Indexing: JSON path indexes created based on query frequency (not LLM-driven)
  • Local-First: Embedded Turso with sync via embedded replicas
  • AI-Native: Built-in vector embeddings (F32_BLOB) and semantic search
  • Multi-Platform: Shared logic for desktop (Tauri) and AI agents (MCP stdio server)

Implementation Phases

Phase 1: Core Package Foundation

Phase 2: Node Types & Services

Phase 3: NLP Engine Package

Phase 4: Integration & Testing

Success Criteria

  • Pure JSON schema with no ALTER TABLE risk
  • Built-in node types as schema nodes
  • Turso + JSON path indexes performing well
  • Vector embeddings (F32_BLOB) for semantic search
  • Rule-based IndexManager for dynamic indexes
  • Auto-reference detection (primitive vs entity types)
  • Tauri integration
  • MCP stdio server
  • Reactive state synchronization
  • User-defined schemas without table creation
  • Performance optimized (0-100K nodes free tier)

Documentation

  • docs/architecture/business-logic/overview.md
  • docs/architecture/business-logic/database-schema.md
  • docs/architecture/business-logic/node-behavior-system.md
  • docs/architecture/data/storage-architecture.md
  • docs/architecture/core/technology-stack.md

Activity

  1. malibio commented on Dec 5, 2025

    @malibio
    CollaboratorAuthor

    Epic complete. The Business Logic Layer is fully implemented:

    • SurrealDB backend with nodes table
    • NodeBehavior trait system with Text, Header, Task, CodeBlock, QuoteBlock, OrderedList, Date, Schema behaviors
    • NodeService with CRUD operations
    • QueryService for SQL queries
    • Embedding architecture for semantic search
    • Domain event system
    • MCP server integration
    • Tauri commands layer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions