A semantic knowledge graph application that bridges human cognition and machine intelligence through visual node-based interface, W3C semantic web standards, and AI-powered knowledge discovery.
Redstring enables you to create, connect, and explore concepts through an intuitive visual interface while maintaining full semantic web standards compliance. It's designed for the intersection of personal knowledge management and collective intelligence—where individual thinking becomes collaborative understanding through RDF-based linking.
Core Philosophy: Everything is connected. Most things can be generalized as a community of components and relations. Redstring makes these connections visible, explorable, and shareable.
- Node-based Interface: Drag-and-drop concept creation and connection
- Hierarchical Organization: Nodes can expand to reveal internal definition graphs
- Contextual Definitions: Same concept can have different meanings in different contexts
- Visual Abstractions: Multi-dimensional abstraction chains (specific → general)
- W3C Standards Compliant: Full RDF, OWL, and JSON-LD support
- Dual-Format Storage: Native Redstring format + RDF export for interoperability
- External Knowledge Sources: Direct integration with Wikidata, DBpedia, and Wikipedia
- Property-Based Discovery: Find related concepts through semantic relationships
- Cross-Domain Linking: Connect knowledge across different sources and domains
- Multi-Storage Sync: Save to all enabled storage locations simultaneously
- Local
.redstringfiles (first-class, independent storage) - Git repositories (GitHub/Gitea/GitLab - opt-in collaboration)
- Browser storage (universal fallback/cache)
- Local
- Source of Truth: Choose which storage drives your UI (matters for loading, not saving)
- Privacy by Design: Git/GitHub cannot access data unless you explicitly enable it
- Resilient: If one storage method fails, others still succeed
- Real-Time Sync: Sub-5-second auto-commits to Git repositories
- Hot-Swappable Providers: Switch between GitHub, GitLab, Gitea, or self-hosted
- Multi-Provider Redundancy: Backup to multiple Git providers simultaneously
- Instant Migration: Move your entire semantic space between providers in minutes
- Version History: Complete audit trail using Git's native capabilities
- Conflict Resolution: Git merge capabilities for collaborative knowledge building
- First-Class AI Integration: AI can interact with Redstring like a human user (requires manual setup)
- Model Context Protocol (MCP): Comprehensive tool suite for AI agents
- Semantic Discovery: AI-powered exploration of knowledge connections
- Enhanced Search: Multi-source queries (70% DBpedia, 20% Wikidata, 10% Wikipedia)
- Transparent Operations: Full visibility into AI tool calls and actions
Note: AI features are experimental and disabled by default. Users must explicitly enable and configure them.
- Automatic Migration: Files from older versions (v1.0.0, v2.0.0) auto-upgrade to v3.0.0
- Version Validation: Clear error messages for incompatible formats
- User Feedback: Migration progress displayed during import
- Data Protection: Comprehensive validation before any data changes
- Node.js 18+ and npm
- Git (for federation features)
- Modern browser with File System Access API support
# Clone the repository
git clone https://github.com/yourusername/redstring.git
cd redstring
# Install dependencies
npm install
# Start development server
npm run devThe application will be available at http://localhost:5173 (Vite dev server) or http://localhost:4000 (production server).
Option 1: Docker Compose (Recommended)
docker-compose -f deployment/docker/docker-compose.yml upOption 2: Manual (3 terminals)
# Terminal 1: Frontend
npm run dev
# Terminal 2: OAuth Server (for GitHub federation)
npm run oauth
# Terminal 3: Main Server
npm run serverA Universe is a complete workspace containing your knowledge graph. Each universe is independent with its own nodes, edges, and storage configuration.
- Create multiple universes for different projects or domains
- Switch between universes instantly
- Configure storage options per universe (local file, Git, browser)
Nodes represent concepts, entities, or ideas in your knowledge graph.
- Prototypes: The semantic concept (e.g., "Climate Policy")
- Instances: Specific occurrences of a concept in different graphs
- Expandable: Nodes can contain internal definition graphs
- Contextual: Same node can have different definitions in different contexts
Edges connect nodes and represent relationships between concepts.
- Directional: Specify arrow direction (one-way or bidirectional)
- Typed: Use connection type nodes to categorize relationships
- Semantic: Edges export as RDF triples for semantic web integration
Graphs are collections of nodes and edges that form coherent knowledge structures.
- Hierarchical: Graphs can define nodes, which can contain more graphs
- Spatial: Each graph has its own 2D canvas space
- Composable: Build complex knowledge structures from simpler components
Abstraction chains represent generalization hierarchies across multiple dimensions.
- Specific → General relationships (e.g., "Lawyer" → "Professional" → "Person")
- Multiple dimensions (e.g., by profession, by species, by social role)
- Exports as
rdfs:subClassOfrelationships in RDF
Redstring is designed as a local-first application where your data lives on your machine by default.
-
Local
.redstringFiles- First-class storage option
- Works completely independently without Git
- Use File System Access API to save directly to your filesystem
- Perfect for personal knowledge management
-
Git Repository Sync
- Opt-in collaboration and backup
- Supports GitHub, GitLab, Gitea, or self-hosted Git
- Real-time sync with sub-5-second auto-commits
- Enable only when you want to collaborate or backup to Git
-
Browser Storage (IndexedDB)
- Universal fallback and cache
- Always enabled for offline access
- Synchronizes with other storage options
When you save, Redstring saves to ALL enabled storage locations to keep them in sync:
Your Edit → Save
↓
├─→ Local File (if enabled) ✓
├─→ Git Repo (if enabled) ✓
└─→ Browser Cache (always) ✓
Source of Truth only matters when loading data—it determines which storage to trust if they differ.
Git federation enables collaborative knowledge building across teams and organizations.
- Provider Abstraction: Unified interface for GitHub, GitLab, Gitea, etc.
- Authentication: OAuth for GitHub, token auth for self-hosted
- Repository Structure: Standard layout with
universes/<slug>/<file>.redstring - Conflict Handling: Git merge capabilities with exponential backoff on conflicts
- Rate Limiting: Intelligent batching and circuit breaker protection
-
Create or Open Universe
- Start with local file storage
- Build your knowledge graph
-
Link Git Repository (Optional)
- Connect to GitHub/GitLab repository
- Enable Git sync for backup and collaboration
- Data stays local, with copies pushed to Git
-
Collaborate
- Team members clone repository
- Multiple people can work simultaneously
- Conflicts resolved through Git merge
-
Switch Providers
- Change Git provider anytime
- Export to new repository
- No data loss or migration complexity
Redstring supports experimental integration with Solid Pods for decentralized storage.
- WebID Authentication: Connect to any Solid Pod provider
- RDF Storage: Store cognitive spaces as RDF/Turtle files
- Cross-Pod References: Link concepts across different users' Pods
- Access Control: Granular permissions using Solid protocols
Note: Solid integration is experimental. Git federation is recommended for production use.
IMPORTANT: AI integration is experimental and disabled by default. These features require:
- Manual setup and configuration
- External AI service credentials
- Technical knowledge of MCP (Model Context Protocol)
- Explicit user opt-in to enable functionality
Most users will not use these features. Standard Redstring functionality works completely independently.
Redstring treats AI as a first-class user with comprehensive tool access via Model Context Protocol (MCP).
list_available_graphs- List all graphs in current universeget_active_graph- Get details about currently active graphopen_graph- Open a graph for viewing/editingset_active_graph- Switch to a different graph
add_node_prototype- Create new concept typesadd_node_instance- Add nodes to graphsupdate_node_prototype- Modify node properties (name, description, color)delete_node_instance- Remove nodes from graphsmove_node_instance- Reposition nodes on canvassearch_nodes- Find nodes by name or description
create_edge- Connect two nodes with a relationshipcreate_edge_definition- Define new relationship types
The AI integration provides complete transparency:
- AI Decision: AI decides to call a tool (e.g.,
open_graph) - MCP Server: Receives tool call and queues action
- Bridge Polling: Frontend polls for pending actions every 2 seconds
- Action Execution: Bridge executes action in Redstring store
- UI Update: Interface reflects changes in real-time
All steps are logged for debugging and transparency.
# Run the connection wizard
npm run ai-wizard
# Or test AI integration
npm run test:ai:allSee COMPREHENSIVE_AI_TOOLS.md for complete documentation.
Redstring integrates multiple semantic web sources for comprehensive knowledge discovery:
// Example: Search for related concepts
const results = await enhancedSemanticSearch('LittleBigPlanet', {
timeout: 25000,
limit: 50,
includeWikipedia: true
});
// Returns 40-70 related entities from:
// - DBpedia (70%): Property-based relationships, categories
// - Wikidata (20%): Fuzzy search, SPARQL queries
// - Wikipedia (10%): Article summaries, links- Direct Entity Search: Exact and fuzzy matching across sources
- Property-Based Search: Find entities through shared properties
- Category-Based Search: Discover concepts in related categories
- Relationship Traversal: Follow semantic connections between entities
Export your knowledge graph as standard RDF for semantic web integration:
// Export to RDF/Turtle
const rdfData = await exportToRDF(graphState);
// Import from RDF sources
const graphData = await importFromRDF(turtleString);Dual-Format Approach:
- Native Redstring format for application functionality
- RDF statements for semantic web interoperability
- Both formats maintained in
.redstringfiles
Link concepts across different knowledge bases using standard RDF:
# In alice's knowledge graph
@prefix alice: <https://alice.github.io/semantic/vocabulary/> .
@prefix bob: <https://bob.gitlab.com/knowledge/concepts/> .
alice:ClimatePolicy
alice:influences bob:EconomicGrowth ;
alice:derivedFrom <https://dbpedia.org/resource/Climate_change_policy> .Redstring uses a JSON-based format with JSON-LD context for semantic web compatibility:
{
"@context": "https://redstring.net/contexts/v1.jsonld",
"@type": "redstring:CognitiveSpace",
"format": "redstring-v3.0.0",
"metadata": {
"version": "3.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T12:00:00Z"
},
"graphs": { /* Graph definitions */ },
"nodes": { /* Node prototypes and instances */ },
"edges": { /* Edge definitions with RDF statements */ },
"userInterface": { /* UI state */ },
"federation": { /* Solid Pod references */ }
}- Current: v3.0.0 (includes format versioning system)
- Supported: v1.0.0, v2.0.0-semantic (auto-migrated)
- Format History: Metadata tracks migrations and changes
Edges are stored in both native and RDF formats:
{
"edge-id": {
"sourceId": "instance-a",
"destinationId": "instance-b",
"directionality": { "arrowsToward": [] },
"rdfStatement": {
"subject": { "@id": "node:prototype-a" },
"predicate": { "@id": "node:relationship-type" },
"object": { "@id": "node:prototype-b" }
}
}
}This enables:
- Full application functionality using instance IDs
- Semantic web interoperability using RDF triples
- AI reasoning over semantic relationships
See redstring-format-spec.md for complete specification.
redstring/
├── src/
│ ├── components/ # React UI components
│ ├── store/ # Zustand state management
│ ├── services/ # Core services
│ │ ├── universeManager.js # Universe orchestration
│ │ ├── gitSyncEngine.js # Git synchronization
│ │ ├── semanticWebQuery.js # Semantic search
│ │ └── solidAuth.js # Solid Pod integration
│ ├── formats/ # Import/export formats
│ │ ├── redstringFormat.js # Native format
│ │ └── rdfExport.js # RDF serialization
│ └── ...
├── deployment/
│ ├── app-semantic-server.js # Production server
│ ├── docker/ # Docker configs
│ └── gcp/ # Google Cloud deployment
├── test/
│ ├── formats/ # Format validation tests
│ └── ai/ # AI integration tests
├── docs/ # Additional documentation
└── universes/ # Local universe storage
universeManager.js: Orchestrates universes, loading, saving, switchinguniverseBackend.js: Façade for UI componentsgitFederationService.js: Git repository management and status
gitSyncEngine.js: Background sync with batching and conflict resolutiongitNativeProvider.js: Provider abstraction (GitHub, GitLab, Gitea)persistentAuth.js: Authentication and token management
semanticWebQuery.js: Multi-source semantic searchknowledgeFederation.js: Cross-domain knowledge linkingsolidAuth.js/solidData.js: Solid Pod integration
# Run all tests
npm test
# Format tests
npm run test:format
npm run test:consistency
npm run test:roundtrip
# AI integration tests
npm run test:ai:all
npm run test:mcp
npm run test:bridge- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
npm test) - Commit with clear messages
- Push to your fork
- Open a Pull Request
Note: This is significant work. Test your changes thoroughly and verify they work before submitting.
# Quick start
npm run dev
# Full stack with OAuth and main server
npm run dev:full# Build and run
npm run prod:docker
# Or use docker-compose
npm run prod:compose# Setup GCP project
npm run setup:gcp
# Deploy to production
npm run deploy:gcp:prod
# Deploy to test environment
npm run deploy:gcp:testFrontend (Port 4000) → Main Server → OAuth Server (Port 3002) → GitHub API
↓
Cloud Run Service
↓
Secret Manager (OAuth credentials)
Store in Google Cloud Secret Manager:
github-client-id: GitHub OAuth app client IDgithub-client-secret: GitHub OAuth app client secretgithub-app-private-key: GitHub App private key (optional)
GitHub OAuth App Settings:
- Homepage URL:
https://your-app.run.app - Callback URL:
https://your-app.run.app/oauth/callback
GitHub App Settings (optional, for enhanced features):
- Webhook URL:
https://your-app.run.app/api/github/webhook - Permissions: Repository contents (read/write)
Create .env file for local development:
# GitHub OAuth
GITHUB_CLIENT_ID=your_oauth_client_id
GITHUB_CLIENT_SECRET=your_oauth_client_secret
# GitHub App (optional)
GITHUB_APP_ID=your_app_id
GITHUB_APP_CLIENT_ID=your_app_client_id
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...your private key...
-----END RSA PRIVATE KEY-----"
# Server Configuration
NODE_ENV=development
PORT=4000
OAUTH_PORT=3002aiinstructions.txt- Project overview and recent enhancementsredstring-format-spec.md- File format specificationSEMANTIC_WEB_INTEGRATION.md- Semantic web features and RDF integrationCOMPREHENSIVE_AI_TOOLS.md- AI integration and MCP toolsGIT_FEDERATION.md- Git federation architecture and workflows
LOCAL_DEVELOPMENT.md- Local setup and testingDEPLOYMENT.md- Production deployment guideREDSTRING_FORMAT_VERSIONING.md- Format versioning systemDYNAMIC_FEDERATION_GUIDE.md- Dynamic federation and cross-domain linking
TROUBLESHOOTING.md- Common issues and solutionsAI_INTEGRATION_TROUBLESHOOTING.md- AI tool debuggingAUTH_401_FIX.md- OAuth authentication issues
- Your data lives on your machine by default
- Git/cloud sync is opt-in, not required
- Multiple storage options work together, not exclusively
- Privacy by design: no external access without explicit permission
- W3C standards compliant (RDF, OWL, JSON-LD)
- Dual-format storage (native + semantic)
- Cross-domain linking via RDF
- Integration with major knowledge bases (Wikidata, DBpedia, Wikipedia)
- Real-time sync with background commits
- Hot-swappable providers (GitHub, GitLab, Gitea)
- Multi-provider redundancy and backup
- Version history and conflict resolution via Git
- Model Context Protocol (MCP) integration
- Comprehensive tool suite for AI agents
- Transparent operation logging
- First-class AI user experience
- DBpedia search: ~2-5 seconds, 30-50 entities
- Wikidata search: ~1-3 seconds, 10-20 entities
- Wikipedia search: ~1-2 seconds, 1-5 articles
- Total: ~5-10 seconds, 40-70 total entities
- Auto-commit interval: 20-30 seconds (depending on auth method)
- Conflict retry: Exponential backoff with fresh SHA
- Circuit breaker: Opens after excessive API calls, resumes after cooldown
- Instant local updates (sub-100ms)
- Debounced drag operations to reduce churn
- Background persistence without blocking UI
- Additional Git providers (GitLab, Gitea native support)
- Enhanced semantic discovery UI
- Real-time collaborative editing
- Mobile app with full feature parity
- SPARQL endpoint for semantic queries
- Vocabulary alignment with standard ontologies
- Advanced AI reasoning over knowledge graphs
- Cross-Pod semantic linking (Solid)
- Federated query across multiple knowledge bases
- Automatic ontology extraction from text
- Collective intelligence features
- Planetary-scale knowledge federation
Redstring is built on the belief that everything is connected. Knowledge doesn't exist in isolation—it lives in the relationships between concepts, the contexts that shape meaning, and the communities that create understanding.
We're not just building a knowledge management tool. We're architecting infrastructure for distributed cognition—where individual thinking becomes collective intelligence through the power of semantic web standards and user-controlled data.
- User Sovereignty: Your data, your control, your infrastructure
- Semantic Standards: W3C compliance for true interoperability
- Local-First: Work offline, sync when you choose
- Privacy by Design: No external access without explicit permission
- Community Intelligence: Individual graphs compose into larger understanding
MIT License - See LICENSE file for details.
- Documentation: See
docs/directory - Issues: GitHub Issues
- Discussions: GitHub Discussions
An endless thank you to everyone who has provided input and support.
- Grant Eubanks
Built with:
- The help of nearly every mainstream LLM Since GPT 3
- React & Vite
- Zustand (state management)
- RDF.js & JSON-LD
- Model Context Protocol (MCP)
- Solid Project
- Express.js
- And many other amazing open source projects
The spark begins with your local files and Git repositories. It ends with a new type of knowledge that spans the planet.