A personal knowledge management system powered by semantic search, LLMs, and vector embeddings.
Next.js UI → FastAPI API → Postgres + Pinecone + NVIDIA + Notion + OpenWA
second-brain/
apps/
web/ # Next.js frontend (port 3000)
api/ # FastAPI backend (port 8000)
docker-compose.yml
docker-compose.openwa.yml
.env.example
cp .env.example .env
# Edit .env with your API keys
docker compose up --build- Frontend: http://localhost:3000
- API docs: http://localhost:8000/docs
| Service | Technology | Role |
|---|---|---|
| Web | Next.js (standalone) | UI |
| API | FastAPI / Python | Business logic |
| Database | PostgreSQL 16 | Source of truth |
| Vector DB | Pinecone | Semantic search |
| LLM | NVIDIA (Llama 3.1 70B) | Chat & embeddings |
| Sync | Notion API | Task sync target |
| Messaging | OpenWA | WhatsApp gateway |
| Cache | Redis | Rate limiting / sessions |
User creates task in Next.js
↓
FastAPI /tasks
↓
Save task in Postgres
↓
Create embedding → upsert to Pinecone
↓
Optional: sync to Notion
↓
Optional: send/receive WhatsApp via OpenWA
See .env.example for all required config. Never commit .env to git.