A production-grade backend system that ingests data from Slack and GitHub, extracts structured knowledge using LLMs, stores embeddings in a vector database, and enables semantic querying.
- Ingest: Captures messages and events from Slack & GitHub
- Process: Uses OpenAI LLM to extract summaries, decisions, and entities
- Store: Saves embeddings in PostgreSQL (with PgVector extension)
- Query: Provides semantic search via natural language
digital-memory/
โโโ SYSTEM_DESIGN.md # Complete architecture & design
โโโ .env.example # Environment configuration template
โโโ docker-compose.yml # Local development environment
โ
โโโ backend/
โ โโโ ingestion-service/ # Go service for data ingestion
โ โโโ api-service/ # Go service for querying
โ โโโ ai-service/ # Python service for LLM processing
โ
โโโ database/
โ โโโ migrations/ # PostgreSQL migration scripts
โ
โโโ docs/
โ โโโ SETUP.md # Step-by-step setup guide
โ โโโ API.md # API documentation
โ โโโ EXAMPLES.md # Example usage & queries
โ
โโโ test_data/
โโโ sample_slack_messages.json
โโโ sample_github_events.json
โโโ load_test_data.py
- Docker & Docker Compose
- Go 1.21+
- Python 3.10+
- PostgreSQL CLI (psql)
- OpenAI API key
cd "Digital Memory"
cp .env.example .env
# Edit .env with your API keys and configurationdocker-compose up -d# See docs/SETUP.md for detailed migration steps# Terminal 1: Ingestion Service
cd backend/ingestion-service
go run cmd/main.go
# Terminal 2: AI Service
cd backend/ai-service
python -m app.main
# Terminal 3: API Service
cd backend/api-service
go run cmd/main.gopython test_data/load_test_data.pycurl -X POST http://localhost:8000/api/v1/query \
-H "Content-Type: application/json" \
-d '{"query": "What database decisions were made?", "top_k": 5}'- SYSTEM_DESIGN.md - Architecture, design decisions, data models
- docs/SETUP.md - Detailed setup guide (WIP)
- docs/API.md - Complete API reference (WIP)
- docs/EXAMPLES.md - Usage examples and test cases (WIP)
-
Go Ingestion Service (Port 8001)
- Accepts Slack webhooks and GitHub events
- Validates and stores raw data
- Publishes to message queue
-
Python AI Service (Port 8002)
- Consumes events from queue
- Calls OpenAI API for processing
- Generates embeddings
- Stores results in PostgreSQL + PgVector
-
Go API Service (Port 8000)
- Provides
/queryendpoint for semantic search - Converts queries to embeddings
- Returns relevant results with metadata
- Provides
Slack/GitHub Events
โ
[Ingestion Service] โ PostgreSQL + Redis Queue
โ
[AI Service] โ OpenAI API + Embedding Generation
โ
PostgreSQL + PgVector
โ
[API Service] โ /query endpoint
โ
Client Response
| Component | Technology | Why |
|---|---|---|
| Ingestion | Go | Fast, concurrent, minimal overhead |
| Queue | Redis Streams | Lightweight, MVP-friendly |
| Processing | Python + FastAPI | Rich LLM ecosystem |
| LLM | OpenAI | Reliable, high quality |
| Vector DB | PostgreSQL + PgVector | Simplified deployment, single DB |
| API | Go | High performance |
| Metadata DB | PostgreSQL | Proven, scalable |
Raw incoming data from sources
Processed knowledge with:
- Summary
- Entities (services, people, APIs)
- Decisions
- Tags
- Embeddings
- Webhook signature validation (Slack/GitHub)
- JWT authentication for API
- Rate limiting
- Environment-based secrets
- HTTPS ready
# Run all tests
./scripts/test.sh
# Test ingestion service
cd backend/ingestion-service && go test ./...
# Test API service
cd backend/api-service && go test ./...
# Test AI service
cd backend/ai-service && pytest tests/All services include:
- Structured logging (JSON format)
- Health check endpoints
- Metrics endpoints
- Error tracking
- Slack & GitHub ingestion
- LLM-based knowledge extraction
- Vector embeddings + semantic search
- Knowledge graph construction
- Temporal reasoning
- Entity relationship discovery
- Causal analysis
- Reasoning engine (LangChain agents)
- Question-answering over knowledge
- Integration recommendations
This is a production-ready system template. Feel free to:
- Extend with new data sources
- Add more processing services
- Customize LLM prompts
- Deploy to production infrastructure
MIT
For issues or questions about the implementation, refer to:
- SYSTEM_DESIGN.md for architecture questions
- docs/SETUP.md for setup issues
- docs/API.md for API questions
- Service logs for runtime issues
Status: Phase 1 Implementation in Progress
Last Updated: March 2026