AI-Powered Personal Memory System
Verath is your intelligent companion that records, summarizes, and indexes your conversations, meetings, and thoughts. It automatically extracts key entities, dates, and insights, making your personal knowledge searchable and actionable.
git clone https://github.com/yourusername/Verath.git
cd Verath
cp .env.example .env # Edit MONGO_URI and SECRET_KEY
docker-compose up -d
# Start Frontend (React + Vite)
cd web
npm install
npm run dev
# App will run on http://localhost:5173Verath is an AI-powered personal memory system that transforms raw audio and text into structured, searchable memories that you can query naturallyโlike asking your own brain for information. It combines advanced speech recognition, intelligent NLP extraction, vector embeddings, and retrieval-augmented generation (RAG) to create a comprehensive digital memory assistant.
- Intelligent Memory Extraction with speech correction detection, temporal parsing, and entity extraction
- Hybrid RAG (Retrieval-Augmented Generation) with cross-encoder re-ranking for accurate, grounded responses
- Memory Lifecycle Management with automatic compression, archival, and retrieval optimization
- Multi-Platform Support including mobile (React Native) and web dashboards
- Local-First Privacy with Groq/Gemini running locallyโno data leaves your machine by default
- Reminder System with automatic date extraction and alert scheduling
- Background Processing with async task queue, retry logic, and dead-letter handling
- Speaker Identification with voice profile training and diarization
- Students: Record lectures and ask questions about course material
- Professionals: Track meeting notes, action items, and project discussions
- Researchers: Capture thoughts, find connections, and generate insights
- Writers: Record ideas and retrieve them by theme or context
- Anyone: Never forget important conversations, commitments, or insights
- Architecture
- Tech Stack
- File Structure
- Backend Architecture
- API Endpoints
- Frontend Applications
- Setup Instructions
- Configuration
- Development
- Testing
- Deployment
- Troubleshooting
- Contributing
Verath follows a microservices-inspired architecture with three main components:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Mobile App โ โ Web App โ โ CLI Tools โ
โ (React Native) โ โ (HTML/JS/CSS) โ โ (Python) โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ FastAPI Backend โ
โ (Python 3.11+) โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโผโโโโโ โโโโโโโผโโโโโโ โโโโโโโโผโโโโโโโ
โ MongoDB โ โ ChromaDB โ โ Groq โ
โ (Metadata)โ โ (Vectors) โ โ (LLM+Embed)โ
โโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
- Recording: Audio โ Whisper Transcription โ Text Cleaning
- Extraction: Text โ Memory Extractor โ Intent/Entities/Summary/Correction Detection
- Storage: Memory โ MongoDB (documents) + ChromaDB (vectors with embeddings)
- Query: Question โ Embedding โ Vector Search โ Cross-Encoder Re-ranking โ LLM Answer
Audio Input
โ
Whisper STT (faster-whisper)
โ
Text Cleaning (remove fillers, normalize)
โ
Correction Detection (detect "no wait actually")
โ
Intent Classification (meeting, deadline, task, etc.)
โ
Entity Extraction (dates, people, locations)
โ
Importance Scoring (with intent-based boosting)
โ
Summary Generation (LLM-powered)
โ
Embedding Generation (Gemini text-embedding-004)
โ
Dual Storage (MongoDB + ChromaDB)
User Question
โ
Embedding Generation
โ
Vector Search (ChromaDB, retrieve 20 candidates)
โ
Metadata Filtering (intent, importance, user)
โ
Cross-Encoder Re-ranking (select top 5)
โ
Context Building (format for LLM)
โ
LLM Generation (Groq llama-3.3-70b-versatile)
โ
Answer + Sources + Confidence
- Framework: FastAPI 0.104+ with Uvicorn
- Speech Recognition: faster-whisper (Whisper models: tiny, base, small, medium, large)
- LLM: Groq (llama-3.3-70b), Embeddings: Gemini (text-embedding-004)
- Vector Database: ChromaDB 0.4.22 with HNSW indexing
- Document Database: MongoDB with Motor (async driver)
- Task Queue: AsyncIO queue with MongoDB-backed tracking
- Scheduler: APScheduler for reminder checks (15-min intervals)
- Authentication: JWT with python-jose and passlib[bcrypt]
- Data Validation: Pydantic 2.5+ with custom validators
- Audio Processing: sounddevice
- Speaker Diarization: pyannote.audio (optional)
- Temporal Parsing: dateparser
- Retry Logic: tenacity with exponential backoff
- Framework: React Native with Expo
- Navigation: React Navigation
- Storage: AsyncStorage
- HTTP: Axios
- UI Components: Expo Vector Icons, Linear Gradient
- Authentication: Context API with AsyncStorage
- Frontend: Vanilla HTML5, CSS3, JavaScript (ES6+)
- Icons: Font Awesome 6.4.0
- Styling: Custom CSS with dark theme and glassmorphism
- No Framework: Lightweight, dependency-free
- Containerization: Docker + Docker Compose
- Python Version: 3.11-slim
- Database: MongoDB (Docker or Atlas)
- Reverse Proxy: (Optional) Nginx/Caddy
Verath/
โโโ backend/ # FastAPI Backend (Python)
โ โโโ app/
โ โ โโโ core/ # Core utilities
โ โ โ โโโ exceptions.py # Custom exception system
โ โ โ โโโ logging_config.py # Structured logging with rotation
โ โ โ โโโ validators.py # Input validation functions
โ โ โโโ db/ # Database operations
โ โ โ โโโ memory_lifecycle.py # Memory lifecycle management
โ โ โโโ models/ # Pydantic data models
โ โ โ โโโ memory.py # Enhanced memory schema
โ โ โ โโโ schema.py # API request/response schemas
โ โ โโโ pipeline/ # Processing pipeline
โ โ โ โโโ audio_processor.py # Session-based recording
โ โ โ โโโ extraction_pipeline.py # Hybrid extraction pipeline
โ โ โ โโโ data_validator.py # Validation & filtering
โ โ โโโ workers/ # Background workers
โ โ โ โโโ background_worker.py # Async task processing with retry
โ โ โโโ routes/ # API endpoints
โ โ โ โโโ auth.py # Authentication (signup, login, refresh)
โ โ โ โโโ query.py # Query with RAG
โ โ โ โโโ record.py # Audio recording endpoint
โ โ โ โโโ advanced.py # Summary, timeline, insights, statistics
โ โ โ โโโ speaker.py # Speaker management
โ โ โ โโโ privacy.py # Privacy controls
โ โ โ โโโ pipeline_routes.py # Pipeline operations
โ โ โ โโโ reminders.py # Reminder system endpoints
โ โ โโโ services/ # Business logic
โ โ โ โโโ audio.py # Audio recording
โ โ โ โโโ auth.py # Authentication service
โ โ โ โโโ database.py # Database operations
โ โ โ โโโ gemini_embedding.py # Vector embeddings (Gemini)
โ โ โ โโโ importance.py # Importance scoring
โ โ โ โโโ listener.py # Always-on voice listener
โ โ โ โโโ groq_service.py # Groq integration
โ โ โ โโโ memory_extractor.py # Intelligent extraction with corrections
โ โ โ โโโ memory_graph.py # Memory relationship graph
โ โ โ โโโ memory_store.py # MongoDB + ChromaDB storage
โ โ โ โโโ pipeline.py # Processing pipeline orchestration
โ โ โ โโโ privacy.py # Privacy controls
โ โ โ โโโ query_engine.py # RAG query engine with re-ranking
โ โ โ โโโ reminder_service.py # Reminder detection and alerting
โ โ โ โโโ reranker.py # Cross-encoder re-ranking
โ โ โ โโโ speaker.py # Speaker identification
โ โ โ โโโ speaker_training.py # Voice profile training
โ โ โ โโโ summarizer.py # Daily summary generation
โ โ โ โโโ timeline.py # Timeline generation
โ โ โ โโโ transcription.py # Whisper STT (faster-whisper)
โ โ โโโ utils/ # Helper utilities
โ โ โ โโโ helpers.py # Utility functions
โ โ โโโ config.py # Configuration with Pydantic Settings
โ โ โโโ main.py # FastAPI application with lifespan
โ โโโ logs/ # Application logs with rotation
โ โโโ requirements.txt # Python dependencies
โ โโโ run.py # Development server entry point
โ โโโ run_listener.py # Always-on listener entry point
โ โโโ test_production.py # Production tests
โ โโโ test_system.py # System tests
โโโ mobile/ # React Native Mobile App
โ โโโ screens/
โ โ โโโ AskScreen.js # Main chat interface with voice
โ โ โโโ HomeScreen.js # Dashboard with stats
โ โ โโโ TimelineScreen.js # Timeline view
โ โ โโโ SettingsScreen.js # Settings configuration
โ โ โโโ LoginScreen.js # Authentication
โ โ โโโ RegisterScreen.js # Registration
โ โ โโโ Tabs.js # Tab navigation
โ โโโ components/
โ โ โโโ MicButton.js # Microphone button component
โ โ โโโ MemoryCard.js # Memory display card
โ โโโ services/
โ โ โโโ api.js # API integration layer
โ โ โโโ auth.js # Auth context and service
โ โโโ App.js # Root component with auth flow
โ โโโ app.json # Expo configuration
โ โโโ babel.config.js # Babel configuration
โ โโโ index.js # Entry point
โ โโโ metro.config.js # Metro bundler config
โ โโโ package.json # Dependencies
โโโ web/ # Web Dashboard
โ โโโ index.html # Main dashboard
โ โโโ app.js # Dashboard logic
โ โโโ styles.css # Dashboard styles
โ โโโ auth.html # Authentication page
โ โโโ auth.js # Auth logic
โ โโโ auth.css # Auth styles
โ โโโ package.json # Dependencies
โโโ data/ # Data storage
โ โโโ chroma/ # ChromaDB vector storage
โ โโโ vector_db/ # Additional vector storage
โโโ scripts/ # Utility scripts
โ โโโ record_cli.py # CLI recording tool
โโโ .env.example # Environment template
โโโ .gitignore # Git ignore rules
โโโ Dockerfile # Docker configuration
โโโ docker-compose.yml # Docker Compose setup
โโโ README.md # This file
โโโ SETUP.md # Detailed setup guide
โโโ UPGRADE_GUIDE_v3.md # v3.0 upgrade guide
โโโ PRODUCTION_AUDIT_FIXES.md # Production security fixes
โโโ REFACTORING_SUMMARY.md # v2.0 refactoring summary
Located in backend/app/services/memory_extractor.py, this component performs:
- Correction Detection: Identifies speech corrections like "meet tomorrow... no, day after tomorrow"
- Intent Classification: Categorizes memories into meeting, deadline, task, commitment, reminder
- Entity Extraction: Extracts dates, people, locations, organizations
- Text Cleaning: Removes filler words (um, uh, like) and normalizes
- Summary Generation: Creates concise summaries using LLM
- Importance Boosting: Calculates importance based on intent and entities
Example Flow:
Input: "I need to submit the project by next Friday... actually Monday"
โ
Correction Detected: True
โ
Final Text: "I need to submit the project by Monday"
โ
Intent: deadline
โ
Entities: {dates: ["Monday"]}
โ
Importance Boost: 0.3 (deadline intent)
โ
Summary: "Project submission deadline is Monday"Located in backend/app/services/query_engine.py, implements:
- Broad Retrieval: Fetches 20 candidates from ChromaDB
- Metadata Filtering: Filters by intent, importance, user
- Cross-Encoder Re-ranking: Re-ranks using neural model for better relevance
- Context Building: Formats top results for LLM
- Grounded Generation: LLM answers only from provided context
- Source Attribution: Returns sources with confidence scores
Configuration:
_N_RETRIEVE = 20 # Candidates from vector search
_N_FINAL = 5 # Final results after re-rankingLocated in backend/app/workers/background_worker.py, provides:
- Async Task Queue: Non-blocking task processing
- Retry Logic: Exponential backoff (2s, 4s, 8s)
- Task Tracking: MongoDB-backed status tracking
- Dead Letter Queue: Failed tasks for manual retry
- Status Polling: Check task status via API
Task States: pending โ processing โ completed/failed/dead
Located in backend/app/services/reminder_service.py, features:
- Automatic Detection: Scans for dates in alertable intents
- Alertable Intents: meeting, deadline, reminder, commitment
- Scheduled Checks: Runs every 15 minutes via APScheduler
- Deduplication: Prevents duplicate alerts
- Acknowledgment: Mark reminders as read
- Lookahead Window: Configurable (default 24 hours)
Located in backend/app/services/memory_store.py, handles:
- Dual Storage: MongoDB (documents) + ChromaDB (vectors)
- Per-User Collections: Isolated data by user ID
- Vector Search: Cosine similarity with HNSW indexing
- Lifecycle Management: Update memory stages
- Statistics: Aggregate counts by lifecycle, intent, speaker
POST /signup- Create new userPOST /login- Authenticate and get tokensPOST /refresh- Refresh access token
POST /record- Record and process audioGET /query- Query memories with RAG
GET /summary- Generate daily summaryGET /timeline- Get chronological timelineGET /insights- Extract key insightsGET /statistics- Get memory statistics
POST /pipeline/record/session- Record with session typePOST /pipeline/extract- Extract from textPOST /pipeline/validate- Validate textGET /pipeline/task/{task_id}- Get task statusPOST /pipeline/lifecycle/compress- Trigger compressionGET /pipeline/queue/stats- Queue statisticsGET /pipeline/queue/dead-letter- Failed tasksPOST /pipeline/queue/retry- Retry failed taskPOST /pipeline/queue/cleanup- Cleanup old tasks
GET /reminders/upcoming- Get upcoming remindersPOST /reminders/{alert_id}/acknowledge- Acknowledge reminder
POST /speaker/train- Train voice profileGET /speaker/profiles- List voice profiles
GET /privacy- Get privacy statusPOST /privacy/toggle- Toggle privacy mode
http://localhost:8000
All endpoints (except signup/login) require JWT authentication via the Authorization header.
POST /auth/signup
Content-Type: application/json
{
"username": "your_username",
"password": "your_password"
}Response (201):
{
"message": "User created successfully",
"username": "your_username"
}POST /auth/login
Content-Type: application/json
{
"username": "your_username",
"password": "your_password"
}Response (200):
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer"
}POST /auth/refresh
Content-Type: application/json
{
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Response (200): New token pair (refresh token rotation)
POST /record
Authorization: Bearer <token>
Content-Type: application/json
{
"duration": 10,
"filename": "optional_filename.wav"
}Response (200):
{
"success": true,
"memory": {
"id": "uuid",
"text": "transcribed text",
"intent": "meeting",
"importance": 0.85
},
"message": "Audio processed successfully"
}GET /query?q=what%20did%20I%20do%20today&limit=5&intent_filter=meeting&min_importance=0.5
Authorization: Bearer <token>Query Parameters:
q(required): Your questionlimit(optional, default 5): Number of results (1-20)intent_filter(optional): Filter by intentmin_importance(optional, default 0.0): Minimum importance (0.0-1.0)
Response (200):
{
"answer": "Based on your memories, you had a meeting with John at 3pm...",
"context": [
"meeting with John at 3pm to discuss project",
"discussed timeline and deliverables"
],
"sources": [
{
"speaker": "John",
"intent": "meeting",
"timestamp": "2024-01-15T15:00:00",
"importance": 0.85,
"confidence": 0.92
}
],
"confidence_score": 0.92
}GET /timeline
Authorization: Bearer <token>Response (200):
{
"timeline": [
{
"time": "10:30 AM",
"text": "Meeting with the team about project timeline",
"speaker": "John",
"intent": "meeting"
}
]
}GET /summary
Authorization: Bearer <token>Response (200):
{
"summary": "Today you had 3 meetings, discussed the project timeline, and set a deadline for Friday..."
}GET /insights
Authorization: Bearer <token>Response (200):
{
"insights": [
"You frequently discuss project deadlines on Mondays",
"Most important meetings happen in the morning",
"You have 5 upcoming deadlines this week"
]
}GET /statistics
Authorization: Bearer <token>Response (200):
{
"total": 1248,
"by_intent": {
"meeting": 45,
"deadline": 12,
"task": 89
},
"by_speaker": {
"John": 34,
"Sarah": 28
},
"avg_importance": 0.65,
"recent_count": 5
}POST /pipeline/record/session
Authorization: Bearer <token>
Content-Type: application/json
{
"session_type": "meeting",
"duration": 60,
"filename": "optional.wav"
}Session Types: manual, lecture, meeting, general, short
Response (200):
{
"success": true,
"task_id": "uuid",
"session_type": "meeting",
"message": "Recording queued for processing"
}POST /pipeline/extract
Authorization: Bearer <token>
Content-Type: application/json
{
"text": "meet tomorrow at 3pm with the team about the project deadline"
}Response (200):
{
"cleaned_text": "meet tomorrow at 3pm with team about project deadline",
"intent": "meeting",
"entities": {
"dates": ["tomorrow"],
"people": [],
"locations": [],
"organizations": []
},
"summary": "Meeting scheduled for tomorrow at 3pm with team regarding project deadline",
"has_correction": false,
"importance_boost": 0.35
}POST /pipeline/validate
Authorization: Bearer <token>
Content-Type: application/json
{
"text": "your text here"
}Response (200):
{
"is_valid": true,
"is_duplicate": false,
"noise_level": "low",
"length_check": "passed"
}GET /pipeline/task/{task_id}
Authorization: Bearer <token>Response (200):
{
"task_id": "uuid",
"status": "completed",
"attempts": 1,
"created_at": "2024-01-15T10:00:00",
"updated_at": "2024-01-15T10:01:00",
"error": null
}GET /reminders/upcoming?hours=24&include_acknowledged=false
Authorization: Bearer <token>Query Parameters:
hours(optional, default 24): Lookahead window (1-168)include_acknowledged(optional, default false): Include acknowledged reminders
Response (200):
{
"count": 3,
"reminders": [
{
"id": "uuid",
"memory_id": "uuid",
"user_id": "user123",
"text": "Meeting with team tomorrow",
"intent": "meeting",
"parsed_date": "2024-01-16T15:00:00",
"due_in_minutes": 1440,
"alerted_at": "2024-01-15T10:00:00",
"acknowledged": false
}
]
}POST /reminders/{alert_id}/acknowledge
Authorization: Bearer <token>Response (200):
{
"message": "Reminder acknowledged",
"alert_id": "uuid"
}POST /speaker/train
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "John",
"sample_text": "Sample voice text or name"
}Response (200):
{
"msg": "voice profile saved",
"name": "John"
}GET /speaker/profiles
Authorization: Bearer <token>Response (200):
{
"profiles": ["John", "Sarah", "Mike"]
}GET /privacy
Authorization: Bearer <token>Response (200):
{
"private": false
}POST /privacy/toggle
Authorization: Bearer <token>Response (200):
{
"private": true
}When privacy mode is enabled, all recording and processing is paused.
GET /statusResponse (200):
{
"status": "ok",
"version": "3.0.0",
"scheduler": "running"
}Location: mobile/
Features:
- Home Screen: Dashboard with neural core status, memory stats, and activity stream
- Ask Screen: Chat interface for querying with voice input
- Timeline Screen: Chronological memory view
- Settings Screen: Configuration options
- Authentication: Login/Register with JWT tokens
- Voice Recording: Quick capture with microphone button
- Source Attribution: Shows speaker, timestamp, importance
- Onboarding: 3-step setup flow
Screens:
- LoginScreen: Secure authentication with gradient UI
- RegisterScreen: User registration
- HomeScreen: Main dashboard with stats and status
- AskScreen: Query interface with voice support
- TimelineScreen: Memory timeline
- SettingsScreen: App configuration
Configuration:
Edit mobile/services/api.js:
const BASE_URL = "http://YOUR_COMPUTER_IP:8000"; // Use IP for physical devicesLocation: web/
Features:
- Dashboard: Statistics, timeline, insights, query interface
- Authentication: Secure login/signup
- Neural Theme: Dark theme with glassmorphism
- Real-time Stats: Auto-refresh every 30 seconds
- Query Interface: Natural language search with sources
- Timeline View: Chronological memory display
- Intel Summary: AI-generated daily briefings
- Neural Insights: Pattern analysis
Access:
cd web
npm install
npm run devThe React frontend will be available at http://localhost:5173.
- Python 3.11+ - Backend runtime
- Node.js 18+ - Mobile app development
- MongoDB 6.0+ - Data storage (local or Atlas)
- Groq - Cloud LLM inference
- Gemini - Cloud embeddings inference
- Git - Version control
git clone https://github.com/yourusername/Verath.git
cd Verathcd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt# Copy environment template
cd ..
cp .env.example .env
# Edit .env with your configuration
# Required settings:
# - MONGO_URI: MongoDB connection string
# - SECRET_KEY: Random secret key for JWT (min 32 chars)Example .env file:
# Verath Configuration
# LLM Providers (Groq + Gemini Fallback)
GROQ_API_KEY= # console.groq.com โ free, 30 RPM
GEMINI_API_KEY= # aistudio.google.com โ free, generous limits
# Embeddings
EMBED_PROVIDER=gemini
# Whisper Settings
WHISPER_MODEL=base
# Server Settings
HOST=0.0.0.0
PORT=8000
DEFAULT_RECORD_SECONDS=10
# CORS Settings
ALLOW_CORS=http://localhost:8080,http://localhost:3000,*
# Storage Paths
VECTOR_DB_PATH=data/chroma_db
VOICE_DB_PATH=data/voices.pkl
# MongoDB Configuration
MONGO_URI=mongodb+srv://your-username:your-password@cluster0.d7dlkdt.mongodb.net/
DATABASE_NAME=verath
# Security
SECRET_KEY=generate-a-long-random-secret-key-herettings
# Audio Settings
AUDIO_SAMPLE_RATE=16000
AUDIO_CHANNELS=1
AUDIO_FORMAT=int16
# Processing Settings
MAX_AUDIO_CHUNK_SIZE=30
SILENCE_THRESHOLD=0.01
MIN_TRANSCRIPTION_LENGTH=5
# Memory Settings
MAX_MEMORY_RESULTS=100
MEMORY_IMPORTANCE_THRESHOLD=0.6
# UI Settings
THEME=dark
AUTO_REFRESH_INTERVAL=30
Using Docker:
docker-compose up -d mongodbUsing MongoDB Atlas:
- Create a free cluster at mongodb.com/atlas
- Whitelist your IP address
- Get the connection string
- Set
MONGO_URIin.env
cd backend
python run.pyThe backend will be available at http://localhost:8000
API documentation: http://localhost:8000/docs
cd web
npm install
npm run devThe React frontend will be available at http://localhost:5173.
cd mobile
npm install
# Configure API URL in mobile/services/api.js
# Update BASE_URL to your backend IP (not localhost for mobile testing)
# Start Metro bundler
npm start
# Run on iOS
npx expo run:ios
# Run on Android
npx expo run:android
# Or use Expo Go app
npx expo start| Variable | Description | Default | Required |
|---|---|---|---|
MODEL_NAME |
LLM model name | mistral |
No |
EMBED_MODEL |
Embedding model name | nomic-embed-text |
No |
WHISPER_MODEL |
Whisper model size | base |
No |
HOST |
Server host | 0.0.0.0 |
No |
PORT |
Server port | 8000 |
No |
DEFAULT_RECORD_SECONDS |
Default recording duration | 10 |
No |
ALLOW_CORS |
CORS origins | * |
No |
VECTOR_DB_PATH |
ChromaDB path | data/chroma_db |
No |
VOICE_DB_PATH |
Voice profiles path | data/voices.pkl |
No |
MONGO_URI |
MongoDB connection string | - | Yes |
DATABASE_NAME |
MongoDB database name | Verath |
No |
SECRET_KEY |
JWT secret key (min 32 chars) | - | Yes |
Ensure you have valid API keys for both Groq and Gemini.
### Whisper Model Configuration
Available models (from smallest to largest):
- `tiny` - Fastest, least accurate (~70MB)
- `base` - Good balance (default, ~140MB)
- `small` - More accurate (~460MB)
- `medium` - Even more accurate (~1.5GB)
- `large` - Most accurate, slowest (~3GB)
Change in `.env`:
```env
WHISPER_MODEL=base
Edit backend/app/db/memory_lifecycle.py to customize lifecycle thresholds.
cd backend
python test_system.pyThis tests basic endpoint connectivity and functionality.
cd backend
python test_production.pyThis tests production-specific configurations and security settings.
Example 1: Speech Correction
Input: "let's meet tomorrow... no no day after tomorrow"
Output: Meeting scheduled for day after tomorrow
Features: Correction detection, temporal parsingExample 2: Deadline with Importance
Input: "I need to submit the project by next Friday"
Output: Intent: deadline, Date: next Friday, Importance: 0.8
Features: Intent detection, temporal parsing, importance boostExample 3: Meeting with People
Input: "Meeting with John and Sarah at 3pm to discuss the project"
Output: Intent: meeting, People: [John, Sarah], Time: 3pm
Features: Entity extraction, intent detection# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downThis will start:
- MongoDB (port 27017)
- Backend API (port 8000)
# Build the image
docker build -t Verath:v3.0 .
# Run the container
docker run -p 8000:8000 --env-file .env Verath:v3.0- Set up server (Ubuntu 22.04 recommended)
- Install dependencies:
sudo apt update
sudo apt install python3.11 python3-pip mongodb- Clone repository:
git clone https://github.com/yourusername/Verath.git
cd Verath- Configure environment:
cp .env.example .env
nano .env # Edit with production values- Install Python dependencies:
cd backend
pip3 install -r requirements.txt- Set up systemd service:
# /etc/systemd/system/Verath.service
[Unit]
Description=Verath API
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/Verath/backend
ExecStart=/usr/bin/python3 /path/to/Verath/backend/run.py
Restart=always
[Install]
WantedBy=multi-user.target- Start service:
sudo systemctl enable Verath
sudo systemctl start Verath- Set up reverse proxy (Nginx):
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}Deploy to Vercel, Netlify, or any static host:
cd web
# Deploy to Vercel
vercel deploy
# Or deploy to Netlify
netlify deploy --prodUsing Expo EAS:
cd mobile
eas build --platform ios
eas build --platform android
eas submit --platform ios
eas submit --platform androidProblem: Cannot connect to MongoDB
Solutions:
- Verify MongoDB is running:
sudo systemctl status mongodb - Check connection string format
- For Atlas, whitelist your IP in the dashboard
- Check network connectivity
- Test connection:
mongosh "mongodb+srv://..."
Problem: Slow transcription or model errors
Solutions:
- First transcription downloads the model (be patient)
- Use a smaller model:
WHISPER_MODEL=tinyorbase - Ensure sufficient disk space (models are 70MB-3GB)
- Check audio format (WAV, 16kHz, mono recommended)
Problem: Mobile app cannot connect to backend
Solutions:
- For physical devices, use your computer's IP instead of
localhost - Find your IP:
ipconfig(Windows) orifconfig(Mac/Linux) - Ensure device and computer are on the same network
- Check firewall settings on your computer
- Verify backend is running and accessible
Problem: ChromaDB errors or slow queries
Solutions:
- Check disk space for
data/chroma_db - Verify write permissions
- Clear and rebuild:
rm -rf data/chroma_db - Check for corrupted data
Problem: Poor quality transcriptions or incorrect extraction
Solutions:
- Improve audio quality (reduce background noise)
- Speak clearly and at a moderate pace
- Check Whisper model size (larger = more accurate)
- Review extraction logs for errors
- Adjust importance thresholds in configuration
Problem: Reminders not being created or alerted
Solutions:
- Check scheduler status:
GET /status - Verify memories have dates and appropriate intents
- Check reminder service logs
- Ensure MongoDB alerts collection exists
- Manually trigger: Check
check_and_fire_reminders()function
"Database not connected": Check MongoDB connection string and ensure MongoDB is running
"Authentication failed": Verify SECRET_KEY is set and consistent
"SECRET_KEY must be at least 32 characters": Generate a longer key:
python -c "import secrets; print(secrets.token_hex(32))"Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone your fork
git clone https://github.com/yourusername/Verath.git
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install development dependencies
pip install -r requirements.txt
# Run tests
python test_system.py
python test_production.py- Python: Follow PEP 8
- JavaScript: Use ESLint
- Add docstrings to functions
- Keep functions focused and small
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI Whisper for state-of-the-art speech recognition
- Groq and Gemini for LLM inference and embeddings
- ChromaDB for efficient vector storage
- FastAPI for the modern web framework
- React Native & Expo for cross-platform mobile development
- MongoDB for reliable document storage
- The open-source community for the amazing tools and libraries
For issues, questions, or contributions:
- GitHub Issues: Create an issue
- Discussions: Join the discussion
- Check the troubleshooting section above
- Review additional documentation:
- SETUP.md - Detailed setup guide
- UPGRADE_GUIDE_v3.md - v3.0 upgrade guide
- PRODUCTION_AUDIT_FIXES.md - Security fixes
- Multi-language support for transcription
- Advanced speaker diarization with voice embeddings
- Memory graph visualization
- Export memories (JSON, CSV, PDF)
- Calendar integration
- Voice commands for quick actions
- Collaborative memory sharing
- Advanced analytics dashboard
- Plugin system for custom extractors
- Mobile widgets and notifications
- WebRTC for browser-based recording
- Email integration
- Cross-encoder re-ranking for improved search
- v3.0.0 - Current release with reminders, background processing, pipeline improvements
- v2.0.0 - Added mobile app, web dashboard, advanced extraction
- v1.0.0 - Initial release with core recording and query functionality
- Transcription Speed: ~0.5x real-time with base model
- Query Latency: <2s for typical queries
- Memory Storage: ~100ms per memory
- Embedding Generation: ~200ms per text segment
- Memories per User: 10,000+ tested
- Concurrent Users: 100+ (with proper scaling)
- Query Throughput: 50+ queries/second
- JWT authentication with refresh token rotation
- Password hashing with bcrypt
- CORS configuration
- Input validation with Pydantic
- SQL injection prevention (MongoDB)
- XSS protection in web app
- User data isolation by user ID
- Keep your
SECRET_KEYsecure and random - Use HTTPS in production
- Regularly update dependencies
- Enable firewall rules
- Use environment variables for sensitive data
- Regular database backups
- Restrict CORS origins in production
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- iOS 14+
- Android 8+ (API Level 26+)
- Students: Record lectures and ask questions about course material
- Professionals: Track meeting notes and action items
- Researchers: Capture thoughts and find connections
- Writers: Record ideas and retrieve them by theme
- Meeting Management: Automatic transcription and action item extraction
- Customer Support: Record calls for quality assurance
- Project Management: Track discussions and decisions
- Knowledge Management: Build organizational memory
โForgetfulness is no longer a biological constraint; it's a technical setting.โ ๐