Skip to content

Commit cd7b9b4

Browse files
committed
docs: Clean up and fix README.md for clarity and accuracy
Fixed issues: - Corrected script paths (moved to subdirectories per DIRECTORY_STRUCTURE.md) - Fixed file references (_new.py suffixes removed) - Removed duplicate 'migrations' directory entry - Fixed API example commands (POST for search, correct endpoints) - Removed '(NEW)' labels that are no longer new - Re-added essential Configuration section with env variables - Added API documentation access points - Replaced Qdrant with PostgreSQL/pgvector in acknowledgments - Fixed project structure to match actual directory layout The README is now consistent, accurate, and follows the actual project structure.
1 parent 1572099 commit cd7b9b4

File tree

1 file changed

+50
-18
lines changed

1 file changed

+50
-18
lines changed

README.md

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
Second Brain v4.2.3 is built on **simplicity-first principles** with a unified database architecture:
3636

37-
### **🌐 Frontend (NEW)**
37+
### **🌐 Frontend**
3838
- **Modern Web UI**: SvelteKit + TypeScript + Tailwind CSS
3939
- **Real-time Updates**: WebSocket integration for live changes
4040
- **Knowledge Graph**: Interactive visualization of memory connections
@@ -99,25 +99,25 @@ second-brain/
9999
│ │ ├── user.py # User models
100100
│ │ └── api_models.py # API request/response models
101101
│ ├── routes/ # API routes
102-
│ │ └── v2_api_new.py # V2 API implementation
102+
│ │ └── v2_api.py # V2 API implementation
103103
│ ├── services/ # Business logic
104-
│ │ ├── memory_service_new.py # Memory operations
104+
│ │ ├── memory_service.py # Memory operations
105105
│ │ ├── service_factory.py # Service instances
106106
│ │ └── synthesis/ # Advanced features
107107
│ ├── static/ # Web UI files
108108
│ ├── utils/ # Utility functions
109109
│ ├── app.py # FastAPI application
110110
│ ├── config.py # Configuration
111-
│ └── database_new.py # Database operations
111+
│ └── database.py # Database operations
112112
├── tests/ # Test suites
113113
│ ├── unit/ # Unit tests
114114
│ ├── integration/ # Integration tests
115115
│ └── validation/ # Validation tests
116116
├── docs/ # Documentation
117117
├── scripts/ # Utility scripts
118-
├── docker/ # Docker configuration
119-
├── migrations/ # Database migrations
120-
├── frontend/ # SvelteKit web UI (NEW)
118+
├── k8s/ # Kubernetes configuration
119+
├── examples/ # Example configurations
120+
├── frontend/ # SvelteKit web UI
121121
│ ├── src/ # Source code
122122
│ │ ├── lib/ # Components and utilities
123123
│ │ └── routes/ # Page components
@@ -131,9 +131,9 @@ second-brain/
131131

132132
### **Core Components**
133133

134-
1. **V2 API** (`routes/v2_api_new.py`): RESTful API with WebSocket support
135-
2. **Memory Service** (`services/memory_service_new.py`): Memory CRUD operations
136-
3. **Database** (`database_new.py`): PostgreSQL with mock fallback
134+
1. **V2 API** (`routes/v2_api.py`): RESTful API with WebSocket support
135+
2. **Memory Service** (`services/memory_service.py`): Memory CRUD operations
136+
3. **Database** (`database.py`): PostgreSQL with mock fallback
137137
4. **Models** (`models/`): Pydantic models for validation
138138
5. **Configuration** (`config.py`): Environment-based configuration
139139

@@ -150,7 +150,7 @@ cd second-brain
150150
docker-compose up -d postgres
151151

152152
# Setup database schema
153-
python scripts/setup_postgres_pgvector.py
153+
python scripts/setup/setup_postgres_pgvector.py
154154

155155
# Start development environment
156156
make dev
@@ -162,7 +162,7 @@ cd frontend && npm install && npm run dev
162162
make test
163163

164164
# Check performance (optional)
165-
python scripts/test_postgres_performance.py
165+
python scripts/testing/test_postgres_performance.py
166166
```
167167

168168
### **📋 What Just Happened?**
@@ -180,7 +180,7 @@ The setup automatically:
180180
```bash
181181
# Docker-first approach
182182
docker-compose up --build # Full development stack
183-
docker-compose exec app python scripts/test_runner.py --all
183+
docker-compose exec app python scripts/testing/test_runner.py --all
184184

185185
# Python virtual environment fallback
186186
python -m venv .venv # Create virtual environment
@@ -282,7 +282,7 @@ curl -X POST "http://localhost:8001/api/v2/memories" \
282282
}'
283283

284284
# Search memories
285-
curl -X GET "http://localhost:8001/api/v2/memories/search?query=meeting" \
285+
curl -X POST "http://localhost:8001/api/v2/search" \
286286
-H "Content-Type: application/json" \
287287
-H "X-API-Key: your-api-key" \
288288
-d '{
@@ -292,11 +292,43 @@ curl -X GET "http://localhost:8001/api/v2/memories/search?query=meeting" \
292292
}'
293293

294294
# Export memories
295-
curl -X GET "http://localhost:8001/api/v2/statistics" \
295+
curl -X GET "http://localhost:8001/api/v2/export" \
296296
-H "X-API-Key: your-api-key" \
297297
-o memories_backup.json
298298
```
299299

300+
## 🔧 **Configuration**
301+
302+
### **Environment Variables**
303+
304+
```bash
305+
# Database (PostgreSQL with pgvector) - REQUIRED
306+
DATABASE_URL=postgresql://secondbrain:changeme@localhost:5432/secondbrain
307+
308+
# OpenAI (for embeddings) - REQUIRED for vector search
309+
OPENAI_API_KEY=your-api-key
310+
311+
# Application
312+
ENVIRONMENT=development
313+
DEBUG=true
314+
API_TOKENS=your-api-token
315+
316+
# Performance
317+
EMBEDDING_BATCH_SIZE=10
318+
CONNECTION_POOL_SIZE=20
319+
320+
# Cipher Integration (Optional)
321+
CIPHER_ENABLED=false
322+
CIPHER_URL=http://localhost:3000
323+
```
324+
325+
### **API Documentation**
326+
327+
Once running, access:
328+
- **Swagger UI**: http://localhost:8001/docs
329+
- **Web Interface**: http://localhost:8001
330+
- **OpenAPI Schema**: http://localhost:8001/openapi.json
331+
300332
### **🤖 CI/CD System**
301333

302334
Our tiered CI/CD pipeline ensures fast feedback and reliable deployments:
@@ -339,8 +371,8 @@ python scripts/dev test --test-type integration # Integration tests
339371
python scripts/dev test --test-type validation # Validation tests
340372

341373
# Fallback .venv testing (when Docker unavailable)
342-
.venv/Scripts/python.exe scripts/test_runner.py --validation # Windows
343-
.venv/bin/python scripts/test_runner.py --validation # Unix
374+
.venv/Scripts/python.exe scripts/testing/test_runner.py --validation # Windows
375+
.venv/bin/python scripts/testing/test_runner.py --validation # Unix
344376
```
345377

346378
### **🔍 Test Categories**
@@ -512,7 +544,7 @@ This project is licensed under the GNU Affero General Public License v3.0 (AGPL-
512544

513545
### Third-Party Integrations
514546
- **[Cipher](https://github.com/campfirein/cipher)** by [Byterover](https://github.com/byterover) - AI memory layer for coding agents
515-
- **[Qdrant](https://qdrant.tech/)** - Vector database for semantic search
547+
- **[PostgreSQL](https://www.postgresql.org/)** with **[pgvector](https://github.com/pgvector/pgvector)** - Vector database and search
516548
- **[OpenAI](https://openai.com/)** - Embeddings and AI capabilities
517549
- **[FastAPI](https://fastapi.tiangolo.com/)** - Modern Python web framework
518550

0 commit comments

Comments
 (0)