Docs / Raw

Development Log

Sourced from docs/archive/DEVELOPMENT_LOG.md

Edit on GitHub

Development Log

Phase 0: Project Initialization & Architecture Setup

Started: 2025-11-20 Completed: 2025-11-20 Duration: ~1 hour

What Was Built

  • Comprehensive microservices directory structure
  • Docker Desktop installation verification (version 28.5.1)
  • Base docker-compose.yml with networks and volumes
  • Local domain resolution (/etc/hosts)
  • Git repository initialization
  • Environment configuration (.env.example, .env)
  • Initial documentation (README, CURRENT_PHASE, DEVELOPMENT_LOG)

Docker Configuration

  • Docker Desktop version: 28.5.1
  • Docker Compose version: 2.40.3-desktop.1
  • Resources: Available (Docker already installed and configured)

Local Domains Configured

  • voiceassist.local
  • nextcloud.local
  • keycloak.local
  • api.voiceassist.local
  • voice.voiceassist.local
  • medical-kb.voiceassist.local
  • admin.voiceassist.local
  • docs.voiceassist.local
  • prometheus.voiceassist.local
  • grafana.voiceassist.local

Key Decisions

  • Using Docker Compose for Phases 0-10
  • Deferring Kubernetes to Phases 11-14
  • Local domains via /etc/hosts (not DNS)
  • Microservices architecture from day one
  • Removed obsolete version: field from docker-compose.yml

Generated Secrets

  • Postgres password: Generated (32 chars hex)
  • Redis password: Generated (32 chars hex)
  • SECRET_KEY: Generated (64 chars hex)
  • JWT_SECRET: Generated (64 chars hex)

Issues Encountered

  • Docker Desktop was installed but not running - resolved by launching it with open -a Docker
  • Docker Compose warned about obsolete version attribute - removed it
  • tree command not available - used find as alternative

Phase 1: Core Infrastructure & Database Setup

Started: 2025-11-20 Completed: 2025-11-20 Duration: ~2 hours

What Was Built

  • PostgreSQL 16 with pgvector extension
  • Redis 7 with persistence and password authentication
  • Qdrant v1.7.4 for vector storage
  • FastAPI server with comprehensive structure
  • Health check endpoints (/health, /ready, /metrics)
  • Alembic database migration system
  • Core database tables (users, sessions, messages)

Services Configuration

  • PostgreSQL: Port 5432, pgvector v0.8.1, UUID support
  • Redis: Port 6379, AOF persistence enabled
  • Qdrant: Port 6333 (HTTP), 6334 (gRPC)
  • FastAPI Server: Port 8000, Python 3.11

Database Schema

users table:

  • id (UUID), email, full_name, hashed_password
  • is_active, is_admin, nextcloud_user_id
  • created_at, updated_at, last_login

sessions table:

  • id (UUID), user_id (FK), title, context (JSONB)
  • message_count, created_at, updated_at, ended_at

messages table:

  • id (UUID), session_id (FK), role, content
  • tool_calls (JSONB), tool_results (JSONB)
  • tokens, model, metadata (JSONB), contains_phi
  • created_at

Key Decisions

  • Used pgvector/pgvector:pg16 for built-in vector support
  • Implemented comprehensive health checks with start_period
  • Fixed Qdrant health check to use bash TCP connection test
  • Structured FastAPI app with core, api, models separation
  • Alembic for database migrations

Issues Encountered & Resolved

  • Qdrant health check initially failed - fixed by using TCP connection test instead of curl/wget
  • Alembic files not in Docker container - updated Dockerfile to copy them
  • Redis health check needed proper auth - added password to command

Testing Results

  • All services start and become healthy
  • Health endpoint returns status and version
  • Ready endpoint confirms all DB connections
  • Database migrations run successfully
  • All tables created with proper indexes

Next Phase

Phase 2: Security Foundation & Nextcloud Integration

  • Install Nextcloud
  • Set up Keycloak for SSO
  • Implement JWT authentication
  • Configure HTTPS
  • Add MFA support
Beginning of guide
End of guide