@@ -8,81 +8,143 @@ permalink: /getting-started/
88
99## Installation {#installation}
1010
11- ### From Source
11+ ### From Source (Recommended)
1212``` bash
1313go install github.com/rainmana/tinybrain/cmd/server@latest
1414```
1515
1616### Docker
1717``` bash
1818docker pull rainmana/tinybrain:latest
19- docker run -p 8080:8080 rainmana/tinybrain
19+ docker run -p 8090:8090 rainmana/tinybrain
2020```
2121
2222### Pre-built Binaries
2323Download from [ Releases] ( https://github.com/rainmana/tinybrain/releases )
2424
25+ ## PocketBase Integration {#pocketbase-integration}
26+
27+ TinyBrain now uses PocketBase as its backend, providing:
28+
29+ - ** Single Binary** : Everything in one executable with zero configuration
30+ - ** Admin Dashboard** : Web interface at http://127.0.0.1:8090/_/ for data management
31+ - ** REST API** : Full REST API at http://127.0.0.1:8090/api/ for external integrations
32+ - ** Real-time Updates** : Server-sent events for live memory updates
33+ - ** Data Persistence** : All data persists across server restarts
34+ - ** Comprehensive Testing** : 17/17 tests passing with full functionality verification
35+
2536## Basic Usage {#basic-usage}
2637
2738### 1. Start the Server
2839``` bash
29- tinybrain-server --config config.json
30- ```
40+ # Start with default data directory
41+ tinybrain serve --dir ~ /.tinybrain
3142
32- ### 2. Create a Session
33- ``` bash
34- curl -X POST http://localhost:8080/sessions \
35- -H " Content-Type: application/json" \
36- -d ' {
37- "name": "Security Assessment",
38- "task_type": "penetration_test",
39- "intelligence_type": "osint"
40- }'
43+ # Or with custom data directory
44+ tinybrain serve --dir /path/to/your/data
4145```
4246
43- ### 3. Store Intelligence
47+ ### 2. Access Admin Dashboard
4448``` bash
45- curl -X POST http://localhost:8080/memory \
46- -H " Content-Type: application/json" \
47- -d ' {
48- "session_id": "session-id",
49- "title": "OSINT Finding",
50- "content": "Social media analysis reveals...",
51- "category": "intelligence",
52- "intelligence_type": "osint",
53- "threat_level": "medium"
54- }'
49+ # Open admin dashboard in browser
50+ open http://127.0.0.1:8090/_/
51+
52+ # Or access REST API
53+ curl http://127.0.0.1:8090/api/
5554```
5655
57- ## Configuration {#configuration}
56+ ### 3. MCP Integration
57+ Add to your MCP client configuration (e.g., Claude Desktop):
5858
59- ### Basic Configuration
60- Create a ` config.json ` file:
59+ ``` json
60+ {
61+ "mcpServers" : {
62+ "tinybrain" : {
63+ "command" : " tinybrain" ,
64+ "args" : [" serve" , " --dir" , " ~/.tinybrain" ],
65+ "env" : {
66+ "TINYBRAIN_DB_PATH" : " ~/.tinybrain/memory.db"
67+ }
68+ }
69+ }
70+ }
71+ ```
72+
73+ ### 4. Create a Session (MCP)
74+ ``` json
75+ {
76+ "jsonrpc" : " 2.0" ,
77+ "id" : 1 ,
78+ "method" : " tools/call" ,
79+ "params" : {
80+ "name" : " mcp_tinybrain-mcp-server_create_session" ,
81+ "arguments" : {
82+ "name" : " Security Assessment" ,
83+ "task_type" : " penetration_test" ,
84+ "intelligence_type" : " osint"
85+ }
86+ }
87+ }
88+ ```
6189
90+ ### 5. Store Memory (MCP)
6291``` json
6392{
64- "database" : {
65- "path" : " ./tinybrain.db" ,
66- "max_connections" : 10
67- },
68- "server" : {
69- "host" : " localhost" ,
70- "port" : 8080
71- },
72- "security" : {
73- "classification_levels" : [" unclassified" , " confidential" , " secret" ],
74- "threat_levels" : [" low" , " medium" , " high" , " critical" ]
93+ "jsonrpc" : " 2.0" ,
94+ "id" : 2 ,
95+ "method" : " tools/call" ,
96+ "params" : {
97+ "name" : " mcp_tinybrain-mcp-server_store_memory" ,
98+ "arguments" : {
99+ "session_id" : " session-id" ,
100+ "title" : " OSINT Finding" ,
101+ "content" : " Social media analysis reveals..." ,
102+ "category" : " intelligence" ,
103+ "priority" : 7 ,
104+ "confidence" : 0.8 ,
105+ "tags" : " [\" osint\" , \" social-media\" , \" reconnaissance\" ]"
106+ }
75107 }
76108}
77109```
78110
111+ ## Configuration {#configuration}
112+
113+ ### PocketBase Configuration
114+ TinyBrain uses PocketBase with zero configuration by default:
115+
116+ ``` bash
117+ # Default configuration
118+ tinybrain serve --dir ~ /.tinybrain
119+
120+ # Custom data directory
121+ tinybrain serve --dir /path/to/your/data
122+
123+ # Custom port (if needed)
124+ tinybrain serve --dir ~ /.tinybrain --port 8090
125+ ```
126+
79127### Environment Variables
80128``` bash
81- export TINYBRAIN_DB_PATH=" ./ tinybrain.db"
129+ export TINYBRAIN_DB_PATH=" ~/. tinybrain/memory .db"
82130export TINYBRAIN_HOST=" localhost"
83- export TINYBRAIN_PORT=" 8080 "
131+ export TINYBRAIN_PORT=" 8090 "
84132```
85133
134+ ### Admin Dashboard Configuration
135+ Access the admin dashboard at http://127.0.0.1:8090/_/ to:
136+ - View and manage collections
137+ - Monitor system performance
138+ - Configure user access (future feature)
139+ - View real-time logs and metrics
140+
141+ ### REST API Configuration
142+ The REST API is automatically available at http://127.0.0.1:8090/api/ with:
143+ - Full CRUD operations for all collections
144+ - Real-time subscriptions
145+ - Authentication support (future feature)
146+ - Rate limiting and security controls
147+
86148## Next Steps
87149
88150- [ Core Features] ( core-features/ ) - Learn about memory management and sessions
0 commit comments