I need an end-to-end web application that lets a customer-support team upload internal docs, search the knowledge base, ask questions in natural language, and auto-draft replies—all from a single, polished interface. This is not a demo chatbot; it must feel production-ready and cover the full product surface: • Full-stack architecture with clear separation of frontend, API layer, async workers, and data stores • Document ingestion and chunking, vector indexing, and a retrieval-augmented generation pipeline that feeds the language model • Role-based access control so sensitive articles stay visible only to authorised users • Background jobs for embedding creation, scheduled re-indexing, and long-running tasks • Observability: structured logging, metrics, and alerting wired into dashboards • Modern UX: drag-and-drop uploads, contextual search with highlights, rich-text editor that suggests AI-generated replies a click away • Secure deployment scripts or IaC that can target a cloud of choice Deliverables 1. Source code 2. Seed data plus a brief README that explains setup, key decisions, and how to run tests Acceptance criteria – Any document uploaded appears in search results within minutes – A natural-language query returns context-aware answers citing their sources – AI reply drafts stay under two seconds latency for a 200-word response – Unit and integration tests cover critical paths – No PII leaks in logs or error traces Feel free to select the frameworks, databases, and model provider you’re most productive with; design choices matter as much as the code. I’ll review architecture, clarity, security posture, and overall developer experience.