- Configure a shared PostgreSQL connection pool with connection and idle timeouts
- Add repository functions to create documents and store embedded chunks
- Persist chunks and mark documents as completed within a transaction
- Roll back failed chunk storage operations while preserving the original error
- Load environment variables from .env in development and production commands
- Implement chunkText with configurable chunk size and overlap defaults
- Normalize input text and return no chunks for empty or whitespace-only content
- Assign sequential indices to chunks while preserving configured overlap
- Validate chunk size and overlap constraints
- Add tests for empty input, chunk boundaries, overlap, indexing, and invalid sizes
- Create documents and document_chunks tables with status tracking, cascading deletes, and chunk uniqueness constraints
- Enable pgvector and store 768-dimensional document embeddings
- Add an initial source metadata migration placeholder
- Add node-pg-migrate for database migration management
- Implement Ollama embedding generation using nomic-embed-text with timeout and response validation
- Add Docker Compose configuration for PostgreSQL 17 with pgvector
- Configure database credentials through a required POSTGRES_PASSWORD environment variable
- Bind the database port to localhost and persist data in a named volume
- Add a database health check using pg_isready
- Add the pg client and TypeScript definitions
- Add an Ollama client for Qwen3 8B generation with request timeouts and HTTP error handling
- Implement POST /generate with request validation and sanitized failure responses
- Update GET /ready to report Ollama availability and return HTTP 503 when unavailable
- Add unit and integration tests for generation, dependency health, and failure handling
- Document implemented API endpoints, setup instructions, scripts, and remaining planned capabilities in README
- Configure the Node.js test runner with tsx
- Add endpoint tests for health, readiness, and echo request validation
- Cover input length boundaries, invalid message types, unknown routes, and unexpected errors
- Extract the Fastify app factory to support isolated testing without starting the server
- Add centralized error handling and consistent 404 responses
- Guard server startup to prevent listeners from opening when the module is imported