- Lead with "The Search Problem Every Developer Faces" to create immediate connection - Showcase "Three-in-One Search" as the killer differentiator (Vector + Graph + Faceted) - Streamline to 8-line quickstart demo showing all three search types - Remove verbose technical details in favor of developer pain/solution narrative - Highlight MCP integration and LLM generation as coming features - Use collapsible sections for advanced features to maintain focus - Emphasize universal deployment and zero-config philosophy - 50% shorter while being 2x more compelling This positions Brainy as the solution to a universal developer problem rather than just another database option. |
||
|---|---|---|
| .github | ||
| brainy-models-package | ||
| docs | ||
| examples | ||
| models | ||
| models-cache/Xenova/all-MiniLM-L6-v2 | ||
| scripts | ||
| src | ||
| tests | ||
| .gitignore | ||
| .npmignore | ||
| .versionrc.json | ||
| brainy.png | ||
| CHANGELOG.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| favicon.ico | ||
| LICENSE | ||
| METADATA_OPTIMIZATION_PROPOSAL.md | ||
| METADATA_PERFORMANCE_ANALYSIS.md | ||
| MIGRATION_PLAN_DEPRECATED_METHODS.md | ||
| OFFLINE_MODELS.md | ||
| package-lock.json | ||
| package.json | ||
| PERFORMANCE_OPTIMIZATION_TODO.md | ||
| README.md | ||
| TENSORFLOW_TO_TRANSFORMERS_ANALYSIS.md | ||
| tsconfig.browser.json | ||
| tsconfig.json | ||
| tsconfig.unified.json | ||
| vitest.config.ts | ||
The Search Problem Every Developer Faces
"I need to find similar content, explore relationships, AND filter by metadata - but that means juggling 3+ databases"
❌ Current Reality: Pinecone + Neo4j + Elasticsearch + Custom Sync Logic
✅ Brainy Reality: One database. One API. All three search types.
🔥 The Power of Three-in-One Search
// This ONE query does what used to require 3 databases:
const results = await brainy.search("AI startups in healthcare", 10, {
// 🔍 Vector: Semantic similarity
includeVerbs: true,
// 🔗 Graph: Relationship traversal
verbTypes: ["invests_in", "partners_with"],
// 📊 Faceted: MongoDB-style filtering
metadata: {
industry: "healthcare",
funding: { $gte: 1000000 },
stage: { $in: ["Series A", "Series B"] }
}
})
// Returns: Companies similar to your query + their relationships + matching your criteria
Three search paradigms. One lightning-fast query. Zero complexity.
🚀 Install & Go
npm install @soulcraft/brainy
import { BrainyData } from '@soulcraft/brainy'
const brainy = new BrainyData() // Auto-detects your environment
await brainy.init() // Auto-configures everything
// Add data with relationships
const openai = await brainy.add("OpenAI", { type: "company", funding: 11000000 })
const gpt4 = await brainy.add("GPT-4", { type: "product", users: 100000000 })
await brainy.relate(openai, gpt4, "develops")
// Search across all dimensions
const results = await brainy.search("AI language models", 5, {
metadata: { funding: { $gte: 10000000 } },
includeVerbs: true
})
That's it. You just built a knowledge graph with semantic search and faceted filtering in 8 lines.
🏆 Why Brainy Wins
- 🧠 Triple Search Power - Vector + Graph + Faceted filtering in one query
- 🌍 Runs Everywhere - Same code: React, Node.js, serverless, edge
- ⚡ Zero Config - Auto-detects environment, optimizes itself
- 🔄 Always Synced - No data consistency nightmares between systems
- 📦 Truly Offline - Works without internet after initial setup
- 🔒 Your Data - Run locally, in browser, or your own cloud
🔮 Coming Soon
- 🤖 MCP Integration - Let Claude, GPT, and other AI models query your data directly
- ⚡ LLM Generation - Built-in content generation powered by your knowledge graph
- 🌊 Real-time Sync - Live updates across distributed instances
🎯 Perfect For
🤖 AI Chat Applications - ChatGPT-like apps with long-term memory and context
🔍 Semantic Search - Find "that thing like a cat but bigger" → returns "tiger"
🧬 Knowledge Graphs - Connect everything. Wikipedia meets Neo4j meets magic
🎯 Recommendation Engines - "Users who liked this also liked..." but actually good
📚 Smart Documentation - Docs that answer questions before you ask them
🌍 Works Everywhere - Same Code
// This EXACT code works in ALL environments
import { BrainyData } from '@soulcraft/brainy'
const brainy = new BrainyData()
await brainy.init()
// Works in: React, Vue, Angular, Node.js, Deno, Bun,
// Cloudflare Workers, Vercel Edge, AWS Lambda, browsers, anywhere
Brainy automatically detects and optimizes for your environment:
| Environment | Storage | Optimization |
|---|---|---|
| 🌐 Browser | OPFS | Web Workers, Memory Cache |
| 🟢 Node.js | FileSystem / S3 | Worker Threads, Clustering |
| ⚡ Serverless | S3 / Memory | Cold Start Optimization |
| 🔥 Edge | Memory / KV | Minimal Footprint |
🆚 Why Not Just Use...?
vs. Multiple Databases
❌ Pinecone + Neo4j + Elasticsearch - 3 databases, sync nightmares, 3x the cost
✅ Brainy - One database, always synced, built-in intelligence
vs. Traditional Solutions
❌ PostgreSQL + pgvector + extensions - Complex setup, performance issues
✅ Brainy - Zero config, purpose-built for AI, works everywhere
vs. Cloud-Only Vector DBs
❌ Pinecone/Weaviate/Qdrant - Vendor lock-in, expensive, cloud-only
✅ Brainy - Run anywhere, your data stays yours, cost-effective
vs. Graph Databases with "Vector Features"
❌ Neo4j + vector plugin - Bolt-on solution, not native, limited
✅ Brainy - Native vector+graph architecture from the ground up
📦 Advanced Features
🔧 MongoDB-Style Metadata Filtering
const results = await brainy.search("machine learning", 10, {
metadata: {
// Comparison operators
price: { $gte: 100, $lte: 1000 },
category: { $in: ["AI", "ML", "Data"] },
rating: { $gt: 4.5 },
// Logical operators
$and: [
{ status: "active" },
{ verified: true }
],
// Text operators
description: { $regex: "neural.*network", $options: "i" },
// Array operators
tags: { $includes: "tensorflow" }
}
})
15+ operators supported: $gt, $gte, $lt, $lte, $eq, $ne, $in, $nin, $and, $or, $not, $regex, $includes, $exists, $size
🔗 Graph Relationships & Traversal
// Create entities and relationships
const company = await brainy.add("OpenAI", { type: "company" })
const product = await brainy.add("GPT-4", { type: "product" })
const person = await brainy.add("Sam Altman", { type: "person" })
// Create meaningful relationships
await brainy.relate(company, product, "develops")
await brainy.relate(person, company, "leads")
await brainy.relate(product, person, "created_by")
// Traverse relationships
const products = await brainy.getVerbsBySource(company) // What OpenAI develops
const leaders = await brainy.getVerbsByTarget(company) // Who leads OpenAI
const connections = await brainy.findSimilar(product, {
relationType: "develops"
})
// Search with relationship context
const results = await brainy.search("AI models", 10, {
includeVerbs: true,
verbTypes: ["develops", "created_by"],
searchConnectedNouns: true
})
🌐 Universal Storage & Deployment
// Development: File system
const dev = new BrainyData({
storage: { fileSystem: { path: './data' } }
})
// Production: S3/R2
const prod = new BrainyData({
storage: { s3Storage: { bucketName: 'my-vectors' } }
})
// Browser: OPFS
const browser = new BrainyData() // Auto-detects OPFS
// Edge: Memory
const edge = new BrainyData({
storage: { memory: {} }
})
// Redis: High performance
const redis = new BrainyData({
storage: { redis: { connectionString: 'redis://...' } }
})
Extend with any storage: MongoDB, PostgreSQL, DynamoDB - see storage adapters guide
🐳 Docker & Cloud Deployment
# Production-ready Dockerfile
FROM node:24-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run download-models # Embed models for offline operation
RUN npm run build
FROM node:24-slim AS production
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/models ./models # Offline models included
CMD ["node", "dist/server.js"]
Deploy to: Google Cloud Run, AWS Lambda/ECS, Azure Container Instances, Cloudflare Workers, Railway, Render, Vercel, anywhere Docker runs.
📚 Documentation & Resources
- 🚀 Quick Start Guide - Get up and running in minutes
- 📖 API Reference - Complete method documentation
- 💡 Examples - Real-world usage patterns
- ⚡ Performance Guide - Scale to millions of vectors
- 🔧 Storage Adapters - Universal storage compatibility
🤝 Contributing
We welcome contributions! Please see: