2025-08-06 16:35:14 -07:00
|
|
|
<div align="center">
|
2025-06-24 11:41:30 -07:00
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|

|
|
|
|
|
|
|
|
|
|
[](https://badge.fury.io/js/%40soulcraft%2Fbrainy)
|
|
|
|
|
[](https://opensource.org/licenses/MIT)
|
**feat(tests, docs, storage): add statistics storage tests and enhance documentation**
- **Tests**: Added new `statistics-storage.test.ts` to validate statistics storage functionality across scenarios including saving, retrieving, time-based partitioning, and backward compatibility. Ensured tests dynamically handle missing environment variables by skipping S3-related tests when credentials are unavailable.
- **Docs**: Enhanced `statistics.md` with detailed explanations of scalability improvements, including adaptive flush timing, batched updates, and time-based partitioning. Improved readability and structure.
- **Storage**: Updated all storage adapters to integrate time-based partitioning and maintain backward compatibility with legacy statistics storage formats.
- **Dependencies**: Added `dotenv` to support environmental variable management for storage adapter tests.
**Purpose**: Strengthen system reliability by adding comprehensive test coverage for statistics storage, improve scalability documentation, and ensure consistency across storage adapters with robust implementations.
2025-07-24 16:24:02 -07:00
|
|
|
[](https://nodejs.org/)
|
2025-07-04 12:19:48 -07:00
|
|
|
[](https://www.typescriptlang.org/)
|
2025-06-24 11:41:30 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
# BRAINY: The Brain in a Jar Databaseā¢
|
2025-06-24 11:41:30 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**The world's only Vector + Graph + AI database and realtime data platform**
|
2025-08-06 14:39:33 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
*Zero-to-Smart⢠technology that thinks so you don't have to*
|
2025-08-07 13:57:48 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
</div>
|
2025-08-07 13:57:48 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
---
|
2025-08-07 14:25:35 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š THE AMAZING BRAINY: See It In Action!
|
2025-08-07 13:57:48 -07:00
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|
```javascript
|
|
|
|
|
import { BrainyData } from '@soulcraft/brainy'
|
2025-08-07 14:25:35 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// š§Ŗ Initialize your brain-in-a-jar
|
|
|
|
|
const brainy = new BrainyData() // Zero config - it's ALIVE!
|
|
|
|
|
await brainy.init()
|
2025-08-07 13:57:48 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// š¬ Feed it knowledge with relationships
|
2025-08-07 19:33:03 -07:00
|
|
|
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")
|
2025-08-07 13:57:48 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// ā” One query to rule them all - Vector + Graph + Faceted search!
|
2025-08-07 19:33:03 -07:00
|
|
|
const results = await brainy.search("AI language models", 5, {
|
|
|
|
|
metadata: { funding: { $gte: 10000000 } }, // MongoDB-style filtering
|
|
|
|
|
includeVerbs: true // Graph relationships
|
2025-08-08 06:10:34 -07:00
|
|
|
}) // Plus semantic vector search!
|
2025-08-07 19:33:03 -07:00
|
|
|
```
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**š 8 lines. Three search paradigms. One brain-powered database.**
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š« WHY BRAINY? The Problem We Solve
|
|
|
|
|
|
|
|
|
|
### ā The Old Way: Database Frankenstein
|
2025-08-07 13:53:17 -07:00
|
|
|
|
|
|
|
|
```
|
2025-08-08 06:10:34 -07:00
|
|
|
Pinecone ($$$) + Neo4j ($$$) + Elasticsearch ($$$) + Sync Hell = š±
|
2025-08-07 19:33:03 -07:00
|
|
|
```
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### ā
The Brainy Way: One Smart Brain
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
```
|
|
|
|
|
Vector Search + Graph Relations + Metadata Filtering + AI Intelligence = š§ āØ
|
|
|
|
|
```
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**Your data gets a brain upgrade. No assembly required.**
|
|
|
|
|
|
|
|
|
|
## ā” QUICK & EASY: From Zero to Smart in 60 Seconds
|
|
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
npm install @soulcraft/brainy
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Your First Brainy App
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
import { BrainyData } from '@soulcraft/brainy'
|
|
|
|
|
|
|
|
|
|
// It's alive! (No config needed)
|
|
|
|
|
const brainy = new BrainyData()
|
|
|
|
|
await brainy.init()
|
|
|
|
|
|
|
|
|
|
// Feed your brain some data
|
|
|
|
|
await brainy.add("Tesla", { type: "company", sector: "automotive" })
|
|
|
|
|
await brainy.add("SpaceX", { type: "company", sector: "aerospace" })
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// Ask it questions (semantic search)
|
|
|
|
|
const similar = await brainy.search("electric vehicles")
|
|
|
|
|
|
|
|
|
|
// Use relationships (graph database)
|
|
|
|
|
await brainy.relate("Tesla", "SpaceX", "shares_founder_with")
|
|
|
|
|
|
|
|
|
|
// Filter like MongoDB (faceted search)
|
|
|
|
|
const results = await brainy.search("innovation", {
|
|
|
|
|
metadata: { sector: "automotive" }
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## š NEW! Talk to Your Data with Brainy Chat
|
2025-08-06 14:39:33 -07:00
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|
```javascript
|
|
|
|
|
import { BrainyChat } from '@soulcraft/brainy'
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
const chat = new BrainyChat(brainy) // Your data becomes conversational!
|
2025-08-07 19:33:03 -07:00
|
|
|
const answer = await chat.ask("What patterns do you see in customer behavior?")
|
2025-08-08 06:10:34 -07:00
|
|
|
// ā AI-powered insights from your knowledge graph!
|
2025-08-07 19:33:03 -07:00
|
|
|
```
|
2025-08-05 19:29:59 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**One line. Zero complexity. Optional LLM for genius-level responses.**
|
2025-08-07 19:33:03 -07:00
|
|
|
[š **Learn More About Brainy Chat**](BRAINY-CHAT.md)
|
2025-08-05 19:29:59 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š® NEW! Brainy CLI - Command Center from the Future
|
|
|
|
|
|
|
|
|
|
### š¬ Talk to Your Data
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Have conversations with your knowledge graph
|
|
|
|
|
brainy chat "What patterns exist in customer behavior?"
|
|
|
|
|
brainy chat "Show me all connections between startups"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### š„ Add & Import Data
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Import with AI understanding
|
|
|
|
|
brainy import data.csv --cortex --understand
|
|
|
|
|
|
|
|
|
|
# Add individual items
|
|
|
|
|
brainy add "OpenAI" --type company --metadata '{"founded": 2015}'
|
|
|
|
|
|
|
|
|
|
# Bulk import with relationships
|
|
|
|
|
brainy import relationships.json --detect-entities
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### š Explore & Query
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Search semantically
|
|
|
|
|
brainy search "artificial intelligence companies"
|
|
|
|
|
|
|
|
|
|
# Query with filters
|
|
|
|
|
brainy query --filter 'funding>1000000' --type company
|
|
|
|
|
|
|
|
|
|
# Visualize relationships
|
|
|
|
|
brainy graph "OpenAI" --depth 2 --format ascii
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### š Manage & Migrate
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Export your brain
|
|
|
|
|
brainy export my-brain.json --include-embeddings
|
|
|
|
|
|
|
|
|
|
# Migrate between storage backends
|
|
|
|
|
brainy migrate s3://old-bucket file://new-location
|
|
|
|
|
|
|
|
|
|
# Backup and restore
|
|
|
|
|
brainy backup --compress
|
|
|
|
|
brainy restore backup-2024.tar.gz
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### š Environment & Secrets
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Store configuration securely
|
|
|
|
|
brainy config set api.key "sk-..." --encrypt
|
|
|
|
|
brainy config set storage.s3.bucket "my-brain"
|
|
|
|
|
|
|
|
|
|
# Load environment profiles
|
|
|
|
|
brainy env use production
|
|
|
|
|
brainy env create staging --from .env.staging
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### š Monitor & Optimize
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Real-time dashboard
|
|
|
|
|
brainy monitor --dashboard
|
|
|
|
|
|
|
|
|
|
# Performance analysis
|
|
|
|
|
brainy stats --detailed
|
|
|
|
|
brainy optimize index --auto
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Command your data empire from the terminal!**
|
|
|
|
|
[š **Full CLI Documentation**](docs/brainy-cli.md)
|
|
|
|
|
|
|
|
|
|
## 𧬠NEW! Cortex AI - Your Data Gets a PhD
|
|
|
|
|
|
|
|
|
|
**Cortex automatically understands and enhances your data:**
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
// Enable Cortex Intelligence during import
|
|
|
|
|
const brainy = new BrainyData({
|
|
|
|
|
cortex: {
|
|
|
|
|
enabled: true,
|
|
|
|
|
autoDetect: true // Automatically identify entities & relationships
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Import with understanding
|
|
|
|
|
await brainy.cortexImport('customers.csv', {
|
|
|
|
|
understand: true, // AI analyzes data structure
|
|
|
|
|
detectRelations: true, // Finds hidden connections
|
|
|
|
|
confidence: 0.8 // Quality threshold
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Your data becomes self-aware (in a good way)!**
|
|
|
|
|
|
|
|
|
|
## š NEW! Augmentation Pipeline - Plug in Superpowers
|
|
|
|
|
|
|
|
|
|
**8 types of augmentations to enhance your brain:**
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
// Add augmentations like installing apps on your brain
|
|
|
|
|
brainy.augment({
|
|
|
|
|
type: 'PERCEPTION', // Visual/pattern recognition
|
|
|
|
|
handler: myPerceptor
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
brainy.augment({
|
|
|
|
|
type: 'COGNITION', // Deep thinking & analysis
|
|
|
|
|
handler: myThinker
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Premium augmentations (coming soon!)
|
|
|
|
|
brainy.augment({
|
|
|
|
|
type: 'NOTION_SYNC', // Bi-directional Notion sync
|
|
|
|
|
license: 'premium'
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Augmentation Types:**
|
|
|
|
|
|
|
|
|
|
- šÆ **SENSE** - Input processing
|
|
|
|
|
- š§ **MEMORY** - Long-term storage
|
|
|
|
|
- š **COGNITION** - Deep analysis
|
|
|
|
|
- š **CONDUIT** - Data flow
|
|
|
|
|
- ā” **ACTIVATION** - Triggers & events
|
|
|
|
|
- šļø **PERCEPTION** - Pattern recognition
|
|
|
|
|
- š¬ **DIALOG** - Conversational AI
|
|
|
|
|
- š **WEBSOCKET** - Real-time sync
|
|
|
|
|
|
|
|
|
|
## šŖ POWERFUL FEATURES: What Makes Brainy Special
|
|
|
|
|
|
|
|
|
|
### ā” Performance That Defies Science
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Vector Search (1M embeddings): 2-8ms latency š
|
|
|
|
|
Graph Traversal (100M relations): 1-3ms latency š„
|
|
|
|
|
Combined Vector+Graph+Filter: 5-15ms latency ā”
|
|
|
|
|
Throughput: 10K+ queries/sec š«
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### š Write Once, Run Anywhere (Literally)
|
|
|
|
|
|
|
|
|
|
- **Browser**: Uses OPFS, Web Workers - works offline!
|
|
|
|
|
- **Node.js**: FileSystem, Worker Threads - server-ready!
|
|
|
|
|
- **Edge/Serverless**: Memory-optimized - deploys anywhere!
|
|
|
|
|
- **React/Vue/Angular**: Same code, automatic optimization!
|
|
|
|
|
|
|
|
|
|
### š® The Power of Three-in-One Search
|
2025-08-05 19:29:59 -07:00
|
|
|
|
2025-08-06 12:29:32 -07:00
|
|
|
```javascript
|
2025-08-08 06:10:34 -07:00
|
|
|
// This ONE query replaces THREE databases:
|
2025-08-06 16:26:39 -07:00
|
|
|
const results = await brainy.search("AI startups in healthcare", 10, {
|
|
|
|
|
// š Vector: Semantic similarity
|
|
|
|
|
includeVerbs: true,
|
2025-08-08 06:10:34 -07:00
|
|
|
|
2025-08-06 16:26:39 -07:00
|
|
|
// š Graph: Relationship traversal
|
|
|
|
|
verbTypes: ["invests_in", "partners_with"],
|
2025-08-08 06:10:34 -07:00
|
|
|
|
2025-08-06 16:26:39 -07:00
|
|
|
// š Faceted: MongoDB-style filtering
|
2025-08-06 12:29:32 -07:00
|
|
|
metadata: {
|
2025-08-06 16:26:39 -07:00
|
|
|
industry: "healthcare",
|
|
|
|
|
funding: { $gte: 1000000 },
|
|
|
|
|
stage: { $in: ["Series A", "Series B"] }
|
2025-08-06 12:29:32 -07:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### š§ Self-Learning & Auto-Optimization
|
2025-08-07 07:57:41 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**Brainy gets smarter the more you use it:**
|
2025-08-07 07:57:41 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- Auto-indexes frequently searched fields
|
|
|
|
|
- Learns query patterns for faster responses
|
|
|
|
|
- Optimizes storage based on access patterns
|
|
|
|
|
- Self-configures for your environment
|
2025-08-07 07:57:41 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š ADVANCED FEATURES: For Mad Scientists
|
|
|
|
|
|
|
|
|
|
### š¬ MongoDB-Style Query Operators
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
const results = await brainy.search("quantum computing", {
|
|
|
|
|
metadata: {
|
|
|
|
|
$and: [
|
|
|
|
|
{ price: { $gte: 100, $lte: 1000 } },
|
|
|
|
|
{ category: { $in: ["electronics", "computing"] } },
|
|
|
|
|
{
|
|
|
|
|
$or: [
|
|
|
|
|
{ brand: "Intel" },
|
|
|
|
|
{ brand: "IBM" }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ tags: { $includes: "quantum" } },
|
|
|
|
|
{ description: { $regex: "qubit|superposition" } }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**15+ operators**: `$gt`, `$gte`, `$lt`, `$lte`, `$eq`, `$ne`, `$in`, `$nin`, `$regex`, `$includes`, `$all`, `$size`,
|
|
|
|
|
`$and`, `$or`, `$not`
|
|
|
|
|
|
|
|
|
|
### š§Ŗ Specialized Deployment Modes
|
2025-08-07 07:57:41 -07:00
|
|
|
|
|
|
|
|
```javascript
|
2025-08-08 06:10:34 -07:00
|
|
|
// High-speed data ingestion
|
2025-08-07 19:33:03 -07:00
|
|
|
const writer = new BrainyData({
|
2025-08-07 07:57:41 -07:00
|
|
|
writeOnly: true,
|
2025-08-07 19:33:03 -07:00
|
|
|
allowDirectReads: true // For deduplication
|
2025-08-07 07:57:41 -07:00
|
|
|
})
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// Read-only search cluster
|
2025-08-07 19:33:03 -07:00
|
|
|
const reader = new BrainyData({
|
2025-08-07 07:57:41 -07:00
|
|
|
readOnly: true,
|
2025-08-08 06:10:34 -07:00
|
|
|
frozen: true // Maximum performance
|
2025-08-07 07:57:41 -07:00
|
|
|
})
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// Custom storage backend
|
2025-08-07 19:33:03 -07:00
|
|
|
const custom = new BrainyData({
|
|
|
|
|
storage: {
|
|
|
|
|
type: 's3',
|
2025-08-08 06:10:34 -07:00
|
|
|
s3Storage: {
|
|
|
|
|
bucketName: 'my-brain',
|
|
|
|
|
region: 'us-east-1'
|
|
|
|
|
}
|
2025-08-07 07:57:41 -07:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### š Framework Integration Examples
|
2025-08-07 07:57:41 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
<details>
|
|
|
|
|
<summary>š¦ <strong>See Framework Examples</strong></summary>
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
#### React
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
```jsx
|
|
|
|
|
import { BrainyData } from '@soulcraft/brainy'
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
function App() {
|
|
|
|
|
const [brainy] = useState(() => new BrainyData())
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
brainy.init()
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
const search = async (query) => {
|
|
|
|
|
return await brainy.search(query, 10)
|
|
|
|
|
}
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
return <SearchInterface onSearch={search} />
|
|
|
|
|
}
|
2025-08-06 16:38:52 -07:00
|
|
|
```
|
|
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
#### Vue 3
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
```vue
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
<script setup>
|
|
|
|
|
import { BrainyData } from '@soulcraft/brainy'
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
const brainy = new BrainyData()
|
|
|
|
|
await brainy.init()
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
const search = async (query) => {
|
|
|
|
|
return await brainy.search(query, 10)
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
```
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
#### Angular
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
```typescript
|
|
|
|
|
|
|
|
|
|
@Injectable({ providedIn: 'root' })
|
|
|
|
|
export class BrainyService {
|
|
|
|
|
private brainy = new BrainyData()
|
|
|
|
|
|
|
|
|
|
async init() {
|
|
|
|
|
await this.brainy.init()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
search(query: string) {
|
|
|
|
|
return this.brainy.search(query, 10)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</details>
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### š³ Docker & Cloud Deployment
|
|
|
|
|
|
|
|
|
|
```dockerfile
|
|
|
|
|
FROM node:24-slim
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY . .
|
|
|
|
|
RUN npm install
|
|
|
|
|
RUN npm run download-models # Bundle models for offline use
|
|
|
|
|
CMD ["node", "server.js"]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Deploy to AWS, GCP, Azure, Cloudflare Workers, anywhere!
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|
## š Premium Features (Optional)
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**Core Brainy is FREE forever. Premium augmentations for enterprise:**
|
|
|
|
|
|
|
|
|
|
### š Enterprise Connectors (Coming Soon!)
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- **Notion** ($49/mo) - Bi-directional workspace sync
|
2025-08-07 19:33:03 -07:00
|
|
|
- **Salesforce** ($99/mo) - CRM integration
|
2025-08-08 06:10:34 -07:00
|
|
|
- **Slack** ($49/mo) - Team knowledge capture
|
|
|
|
|
- **Asana** ($44/mo) - Project intelligence
|
2025-08-07 13:53:17 -07:00
|
|
|
|
|
|
|
|
```bash
|
2025-08-08 06:10:34 -07:00
|
|
|
brainy augment trial notion # Start 14-day free trial
|
2025-08-07 13:53:17 -07:00
|
|
|
```
|
|
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|
## šØ What You Can Build
|
2025-08-07 13:53:17 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**The only limit is your imagination:**
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- **š¤ AI Assistants** - ChatGPT with perfect memory
|
|
|
|
|
- **š Semantic Search** - Find by meaning, not keywords
|
|
|
|
|
- **šÆ Recommendation Engines** - Netflix-level suggestions
|
|
|
|
|
- **𧬠Knowledge Graphs** - Wikipedia meets Neo4j
|
|
|
|
|
- **šļø Computer Vision** - Search images by content
|
|
|
|
|
- **šµ Music Discovery** - Spotify's algorithm in your app
|
|
|
|
|
- **š Smart Documentation** - Self-answering docs
|
|
|
|
|
- **š”ļø Fraud Detection** - Pattern recognition on steroids
|
|
|
|
|
- **š Real-time Collaboration** - Multiplayer knowledge bases
|
|
|
|
|
- **š„ Medical Diagnosis** - Symptom matching with AI
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š Complete Documentation
|
2025-08-06 09:52:45 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### Getting Started
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- [**Quick Start Guide**](docs/getting-started/) - Up and running in 5 minutes
|
|
|
|
|
- [**Installation**](docs/getting-started/installation.md) - All environments covered
|
|
|
|
|
- [**Basic Concepts**](docs/getting-started/concepts.md) - Understand the brain
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### Core Features
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- [**API Reference**](docs/api-reference/) - Every method documented
|
|
|
|
|
- [**Search Guide**](docs/api-reference/search.md) - Master all search types
|
|
|
|
|
- [**Graph Operations**](docs/api-reference/graph.md) - Relationships explained
|
|
|
|
|
- [**MongoDB Operators**](docs/api-reference/operators.md) - Query like a pro
|
2025-08-06 16:38:52 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### Advanced Topics
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- [**Brainy CLI**](docs/brainy-cli.md) - Command-line superpowers
|
|
|
|
|
- [**Brainy Chat**](BRAINY-CHAT.md) - Conversational AI interface
|
|
|
|
|
- [**Cortex AI**](CORTEX.md) - Intelligence augmentation
|
|
|
|
|
- [**Augmentation Pipeline**](docs/augmentations/) - Plugin architecture
|
|
|
|
|
- [**Performance Tuning**](docs/optimization-guides/) - Speed optimization
|
|
|
|
|
- [**Deployment Guide**](docs/deployment/) - Production best practices
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### Examples & Tutorials
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- [**Example Apps**](docs/examples/) - Full applications
|
|
|
|
|
- [**Code Recipes**](docs/examples/recipes.md) - Common patterns
|
|
|
|
|
- [**Video Tutorials**](docs/tutorials/) - Visual learning
|
2025-08-06 12:29:32 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š Why Not Just Use...?
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### vs. Multiple Databases
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
ā **Pinecone + Neo4j + Elasticsearch** = 3x cost, sync nightmares, 3 APIs
|
|
|
|
|
ā
**Brainy** = One database, always synced, one simple API
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### vs. Cloud-Only Vector DBs
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
ā **Pinecone/Weaviate** = Vendor lock-in, expensive, cloud-only
|
|
|
|
|
ā
**Brainy** = Run anywhere, own your data, pay once
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### vs. Traditional Graph DBs
|
2025-08-04 14:33:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
ā **Neo4j + vector plugin** = Bolt-on solution, limited capabilities
|
|
|
|
|
ā
**Brainy** = Native vector+graph from the ground up
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š Real-World Performance & Scale
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**How Brainy handles production workloads:**
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### š Benchmark Numbers
|
2025-08-05 15:34:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- **10M vectors**: 5-15ms search latency (p95)
|
|
|
|
|
- **100M relationships**: 1-3ms traversal
|
|
|
|
|
- **Metadata filtering**: O(1) field access via hybrid indexing
|
|
|
|
|
- **Concurrent queries**: 10,000+ QPS on single instance
|
|
|
|
|
- **Index size**: ~100 bytes per vector (384 dims)
|
|
|
|
|
|
|
|
|
|
### šÆ Scaling Strategies
|
|
|
|
|
|
|
|
|
|
**Scale Up (Vertical)**
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
// Optimize for large datasets on single machine
|
|
|
|
|
const brainy = new BrainyData({
|
|
|
|
|
hnsw: {
|
|
|
|
|
maxConnections: 32, // More connections = better recall
|
|
|
|
|
efConstruction: 400, // Higher quality index
|
|
|
|
|
efSearch: 100 // More accurate search
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-08-05 15:34:39 -07:00
|
|
|
```
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
**Scale Out (Horizontal)**
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
```javascript
|
|
|
|
|
// Shard by category for distributed deployment
|
|
|
|
|
const shards = {
|
|
|
|
|
products: new BrainyData({ defaultService: 'products-shard' }),
|
|
|
|
|
users: new BrainyData({ defaultService: 'users-shard' }),
|
|
|
|
|
content: new BrainyData({ defaultService: 'content-shard' })
|
|
|
|
|
}
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
// Or use read/write separation
|
|
|
|
|
const writer = new BrainyData({ writeOnly: true })
|
|
|
|
|
const readers = [/* multiple read replicas */]
|
|
|
|
|
```
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### šļø Architecture That Scales
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
ā
**Distributed Index** - Partition by metadata fields or ID ranges
|
|
|
|
|
ā
**Smart Partitioning** - Semantic clustering or hash-based sharding
|
|
|
|
|
ā
**Real-time Sync** - WebRTC & WebSocket for live collaboration
|
|
|
|
|
ā
**GPU Acceleration** - Auto-detected for embeddings when available
|
|
|
|
|
ā
**Metadata Index** - Separate B-tree indexes for fast filtering
|
|
|
|
|
ā
**Memory Mapped Files** - Handle datasets larger than RAM
|
|
|
|
|
ā
**Streaming Ingestion** - Process millions of items without OOM
|
|
|
|
|
ā
**Progressive Loading** - Start serving queries before full index load
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## šø Recent Updates
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### šÆ v0.57.0 - The Cortex Revolution
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
- Renamed CLI from "neural" to "brainy"
|
|
|
|
|
- Cortex AI for data understanding
|
|
|
|
|
- Augmentation pipeline system
|
|
|
|
|
- Premium connectors framework
|
2025-08-06 16:41:03 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
### ā” v0.46-v0.51 - Performance Revolution
|
|
|
|
|
|
|
|
|
|
- 95% package size reduction
|
|
|
|
|
- MongoDB query operators
|
|
|
|
|
- Filter discovery API
|
|
|
|
|
- Transformers.js migration
|
|
|
|
|
- True offline operation
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-04 10:14:33 -07:00
|
|
|
## š¤ Contributing
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|
We welcome contributions! See [Contributing Guidelines](CONTRIBUTING.md)
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-04 10:14:33 -07:00
|
|
|
## š License
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-07 19:33:03 -07:00
|
|
|
[MIT](LICENSE) - Core Brainy is FREE forever
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-04 10:14:33 -07:00
|
|
|
---
|
2025-08-04 08:56:05 -07:00
|
|
|
|
2025-08-04 10:14:33 -07:00
|
|
|
<div align="center">
|
2025-08-06 16:26:39 -07:00
|
|
|
|
2025-08-08 06:10:34 -07:00
|
|
|
## š§ Ready to Give Your Data a Brain?
|
|
|
|
|
|
|
|
|
|
**[Get Started ā](docs/getting-started/) | [Examples ā](docs/examples/)**
|
|
|
|
|
|
|
|
|
|
*Zero-to-Smart⢠- Because your data deserves a brain upgrade*
|
|
|
|
|
|
|
|
|
|
**Built with ā¤ļø by [Soulcraft Research](https://soulcraft.com)**
|
|
|
|
|
*Powered by the BXL9000⢠Cognitive Engine*
|
|
|
|
|
|
|
|
|
|
</div>
|