A self-organizing knowledge graph platform that uses AI embeddings and graph algorithms to automatically discover semantic connections between ideas, visualized in an interactive 3D interface.
- Overview
- Project Structure
- Key Features
- Technology Stack
- Getting Started
- Development
- Architecture
- Documentation
- Project Status
Wired is a full-stack knowledge management system that transforms how you organize and connect ideas. Unlike traditional note-taking apps, Wired automatically discovers semantic relationships between your thoughts, creating a living network of interconnected concepts.
- Automatic Connection Discovery: AI analyzes content and creates semantic links without manual tagging
- Context-Aware Matching: Uses surrounding connections to find more relevant relationships
- Dynamic Relevance Scoring: Memory weight algorithm determines which ideas stay active
- 3D Graph Visualization: Interactive Three.js interface for exploring your knowledge network
- Temporal Intelligence: Graph temperature system simulates memory decay and reinforcement
- Personal knowledge management and second brain systems
- Research organization with automatic literature linking
- Project planning with interconnected task networks
- Creative ideation with inspiration mapping
- Learning systems with concept relationship tracking
This is a Turborepo monorepo containing multiple applications and shared packages:
wired/
โโโ apps/
โ โโโ api/ # NestJS Backend API
โ โ โโโ src/
โ โ โ โโโ connection-system/ # AI connection engine
โ โ โ โโโ entities/ # TypeORM entities
โ โ โ โโโ openai/ # AI integration layer
โ โ โ โโโ use-cases/ # Business logic
โ โ โ โโโ utils/ # Utility functions
โ โ โโโ README.md # Detailed API documentation
โ โ
โ โโโ web/ # Next.js Frontend (In Development)
โ โโโ app/ # Next.js 14 app directory
โ โโโ public/ # Static assets
โ
โโโ packages/
โ โโโ ui/ # Shared React components
โ โโโ eslint-config/ # Shared ESLint configurations
โ โโโ typescript-config/ # Shared TypeScript configs
โ
โโโ package.json # Root package configuration
โโโ turbo.json # Turborepo configuration
โโโ README.md # This file
- Automatic semantic link discovery using OpenAI embeddings
- Multi-factor similarity scoring (content, tags, type, recency)
- Context-aware matching using connection neighborhoods
- Bidirectional relationship creation with confidence scoring
- Graph Temperature: Type-based temporal windows for memory simulation
- Memory Weight: Dynamic relevance scoring with decay and reinforcement
- Tag-Based Boosting: Dual-layer semantic matching (content + metadata)
- Recency Weighting: Time-aware connection prioritization
- PostgreSQL with pgvector extension for efficient similarity search
- 1536-dimensional embeddings for semantic content representation
- Optimized cosine distance queries for candidate selection
- 11 node types (thought, idea, task, memory, goal, etc.)
- 8 semantic relation types (inspired_by, contradicts, similar_to, etc.)
- Computed properties (connection count, average confidence, last activity)
- Metadata tracking (tags, source, position, timestamps)
- 3D Graph Visualization: Interactive Three.js/React Three Fiber interface
- Real-time Updates: Live graph changes as connections form
- Node Management: Create, edit, and organize thoughts
- Exploration Tools: Navigate semantic relationships visually
- NestJS 11 - Modular Node.js framework
- TypeORM 0.3 - ORM with PostgreSQL support
- PostgreSQL + pgvector - Vector database for embeddings
- OpenAI API - GPT-4o-mini for completions, text-embedding-3-small for vectors
- TypeScript 5.7 - Type-safe development
- Next.js 14 - React framework with App Router
- Three.js / React Three Fiber - 3D visualization
- TypeScript - Type safety across the stack
- TailwindCSS - Utility-first styling
- Turborepo - Monorepo build system
- Yarn 4 - Package management with workspaces
- ESLint + Prettier - Code quality and formatting
- Jest - Testing framework
- Node.js 18+ or Bun
- PostgreSQL 14+ with pgvector extension
- OpenAI API Key
- Yarn 4 (or npm/pnpm)
# Clone the repository
git clone <repository-url>
cd wired
# Install dependencies
yarn install
# Set up environment variables
cp apps/api/.env.example apps/api/.env
# Edit apps/api/.env with your credentials-- Connect to PostgreSQL
psql -U postgres
-- Create database
CREATE DATABASE wired;
-- Enable vector extension
\c wired
CREATE EXTENSION IF NOT EXISTS vector;Create apps/api/.env:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/wired
# OpenAI
OPENAI_KEY=sk-proj-your-key-here
# Application
PORT=3000
NODE_ENV=development# Start all applications in development mode
yarn dev
# Or run specific apps
yarn dev --filter=api # Backend only
yarn dev --filter=web # Frontend only
# Build for production
yarn build
# Run linting
yarn lint
# Format code
yarn formatThe API will be available at http://localhost:3000
The web app will be available at http://localhost:3001
# Install dependencies for all workspaces
yarn install
# Run development servers (parallel)
yarn dev
# Build all packages
yarn build
# Lint all packages
yarn lint
# Format all code
yarn format
# Type check all packages
yarn check-types# API development
cd apps/api
yarn dev # Start dev server
yarn build # Build for production
yarn test # Run tests
yarn test:e2e # Run E2E tests
# Web development
cd apps/web
yarn dev # Start Next.js dev server
yarn build # Build for production
yarn start # Start production serverThis project uses Turborepo for:
- Parallel execution of tasks across workspaces
- Intelligent caching of build outputs
- Dependency graph awareness for optimal task scheduling
- Remote caching support (optional)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Client (Browser) โ
โ Next.js + Three.js + React โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTP/REST API
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ NestJS API Server โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Connection Engine Service โ โ
โ โ โข Candidate Selection โข Similarity Scoring โ โ
โ โ โข AI Classification โข Reinforcement Learning โ โ
โ โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ OpenAI Service Layer โ โ
โ โ โข Embeddings โข Completions โ โ
โ โ โข Relation Summaries โข Tag Generation โ โ
โ โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PostgreSQL + pgvector Extension โ
โ โข Nodes (with vector embeddings) โ
โ โข Connections (semantic relationships) โ
โ โข Metadata (tags, positions, sources) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- User creates a node โ Content sent to API
- API generates embeddings โ OpenAI creates 1536D vector
- AI analyzes content โ Extracts title, summary, sentiment, importance, type, tags
- Node saved to database โ PostgreSQL stores with vector
- Connection Engine activates โ Finds similar nodes using context-aware matching
- Relationships created โ Bidirectional connections with confidence scores
- Graph updates โ Frontend visualizes new connections in 3D
- API Documentation - Complete backend architecture, algorithms, and API reference
- Connection Engine deep dive
- Memory weight formula explanation
- Vector similarity algorithms
- Database schema and relationships
- Environment setup and configuration
Type-based temporal windows that determine how far back in time the system searches for connections. Active nodes maintain longer search windows, simulating human memory patterns.
A dynamic relevance score (0-1) that adjusts based on connection activity, recency, and importance. Nodes with high memory weight resist decay and form more connections.
Instead of comparing nodes in isolation, the system creates a context embedding by averaging a node's embedding with its connected neighbors, leading to more coherent clusters.
Dual-layer semantic matching using both content embeddings and metadata tag embeddings. Tags provide categorical similarity signals that boost connection confidence.
- NestJS API architecture
- PostgreSQL + pgvector integration
- OpenAI embedding and completion pipeline
- Connection Engine with multi-factor scoring
- Context-aware similarity matching
- Tag-based semantic boosting
- Memory weight and graph temperature algorithms
- Bidirectional relationship creation
- TypeORM entity models
- REST API endpoints
- Next.js frontend application
- 3D graph visualization with Three.js
- User authentication and authorization
- Real-time updates via WebSockets
- Node editing and management UI
- Advanced graph analytics dashboard
- Natural language search across nodes
- Clustering algorithms for concept groups
- Memory decay background jobs
- Multi-modal support (images, audio)
- Export/import functionality
- Collaborative graphs (shared spaces)
- Mobile application
# Run all tests
yarn test
# Run tests for specific package
yarn test --filter=api
# Run E2E tests
yarn test:e2e --filter=api
# Run tests in watch mode
yarn test:watch --filter=api
# Generate coverage report
yarn test:cov --filter=api# Build all apps and packages
yarn build
# Build specific app
yarn build --filter=api
yarn build --filter=web
# Start production server (after build)
cd apps/api && yarn start:prod
cd apps/web && yarn startThis is a portfolio project, but feedback and suggestions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run linting and tests (
yarn lint && yarn test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file for details
- OpenAI for GPT-4 and embedding models
- pgvector for PostgreSQL vector search capabilities
- NestJS team for the excellent framework
- Vercel for Next.js and Turborepo
- Inspired by research in cognitive science, neural networks, and knowledge graphs
- API Documentation
- Frontend Documentation (Coming Soon)
- NestJS Documentation
- Next.js Documentation
- Turborepo Documentation
- pgvector GitHub
- OpenAI API Reference
- Three.js Documentation
Built with TypeScript, NestJS, Next.js, and AI
A portfolio project demonstrating full-stack development, AI integration, and graph algorithms