feat: add zero-configuration Brainy service template with augmentation-first architecture
- Implement WebSocket augmentation for real-time communication - Implement WebRTC augmentation for peer-to-peer connections - Implement HTTP augmentation as minimal REST fallback - Add auto-discovery augmentation for data pattern analysis - Add adaptive storage augmentation for intelligent resource management - Add environment adapter augmentation for universal compatibility - Template auto-detects environment (browser, Node.js, serverless, containers) - Intelligent transport selection (WebRTC → WebSocket → HTTP) - Automatic storage optimization (memory → filesystem → S3) - Zero configuration required - just npm start - Includes intelligent verb scoring by default - Works in any environment without configuration - Full documentation and examples included
This commit is contained in:
parent
c38c8de10a
commit
768acf66ad
30 changed files with 3548 additions and 0 deletions
52
examples/brainy-service-template/config/default.json
Normal file
52
examples/brainy-service-template/config/default.json
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"service": {
|
||||
"name": "brainy-service-template",
|
||||
"port": 3000,
|
||||
"cors": {
|
||||
"enabled": true,
|
||||
"origins": ["http://localhost:3000", "http://localhost:3001"]
|
||||
},
|
||||
"rateLimit": {
|
||||
"windowMs": 900000,
|
||||
"maxRequests": 100
|
||||
}
|
||||
},
|
||||
"brainy": {
|
||||
"storage": {
|
||||
"type": "filesystem",
|
||||
"path": "./data"
|
||||
},
|
||||
"features": {
|
||||
"intelligentVerbScoring": false,
|
||||
"realTimeUpdates": false,
|
||||
"distributedMode": false,
|
||||
"metadataIndexing": true
|
||||
},
|
||||
"intelligentVerbScoring": {
|
||||
"enabled": false,
|
||||
"enableSemanticScoring": true,
|
||||
"enableFrequencyAmplification": true,
|
||||
"enableTemporalDecay": true,
|
||||
"temporalDecayRate": 0.01,
|
||||
"minWeight": 0.1,
|
||||
"maxWeight": 1.0,
|
||||
"baseConfidence": 0.5,
|
||||
"learningRate": 0.1
|
||||
},
|
||||
"cache": {
|
||||
"autoTune": true,
|
||||
"hotCacheMaxSize": 5000
|
||||
},
|
||||
"logging": {
|
||||
"verbose": false
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"level": "info",
|
||||
"format": "json",
|
||||
"timestamp": true
|
||||
},
|
||||
"health": {
|
||||
"timeout": 5000
|
||||
}
|
||||
}
|
||||
20
examples/brainy-service-template/config/development.json
Normal file
20
examples/brainy-service-template/config/development.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"service": {
|
||||
"port": 3000
|
||||
},
|
||||
"brainy": {
|
||||
"features": {
|
||||
"intelligentVerbScoring": true
|
||||
},
|
||||
"intelligentVerbScoring": {
|
||||
"enabled": true,
|
||||
"baseConfidence": 0.6
|
||||
},
|
||||
"logging": {
|
||||
"verbose": true
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"level": "debug"
|
||||
}
|
||||
}
|
||||
28
examples/brainy-service-template/config/production.json
Normal file
28
examples/brainy-service-template/config/production.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"service": {
|
||||
"cors": {
|
||||
"origins": ["https://yourdomain.com"]
|
||||
},
|
||||
"rateLimit": {
|
||||
"windowMs": 900000,
|
||||
"maxRequests": 1000
|
||||
}
|
||||
},
|
||||
"brainy": {
|
||||
"storage": {
|
||||
"type": "s3",
|
||||
"s3": {
|
||||
"bucketName": "${BRAINY_S3_BUCKET}",
|
||||
"region": "${BRAINY_S3_REGION}",
|
||||
"accessKeyId": "${BRAINY_S3_ACCESS_KEY}",
|
||||
"secretAccessKey": "${BRAINY_S3_SECRET_KEY}"
|
||||
}
|
||||
},
|
||||
"cache": {
|
||||
"hotCacheMaxSize": 50000
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"level": "warn"
|
||||
}
|
||||
}
|
||||
35
examples/brainy-service-template/config/test.json
Normal file
35
examples/brainy-service-template/config/test.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"service": {
|
||||
"name": "brainy-service-test",
|
||||
"port": 0
|
||||
},
|
||||
"brainy": {
|
||||
"storage": {
|
||||
"type": "memory"
|
||||
},
|
||||
"features": {
|
||||
"intelligentVerbScoring": true,
|
||||
"realTimeUpdates": false,
|
||||
"distributedMode": false
|
||||
},
|
||||
"intelligentVerbScoring": {
|
||||
"enabled": true,
|
||||
"enableSemanticScoring": true,
|
||||
"enableFrequencyAmplification": true,
|
||||
"enableTemporalDecay": false,
|
||||
"baseConfidence": 0.6,
|
||||
"learningRate": 0.1
|
||||
},
|
||||
"cache": {
|
||||
"autoTune": false,
|
||||
"hotCacheMaxSize": 1000
|
||||
},
|
||||
"logging": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"level": "error",
|
||||
"format": "json"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue