Build a personal citation-aware drafting tool: upload your own PDFs, index them locally, and draft prose with an LLM that cites specific passages. Stack: Next.js, SQLite with FTS5 for local full-text search over uploaded sources, Anthropic and OpenAI APIs for drafting. Core loop: the user uploads PDF or text sources they already have and the tool extracts and chunks the text, indexing it with SQLite FTS5 for keyword search. Writing happens section by section: the user describes what a paragraph should cover, the retrieval step searches the local index for the most relevant chunks, and the LLM drafts the paragraph using only those retrieved passages, inserting an inline citation marker after each claim that links back to the specific source chunk it came from. Any sentence the model generates that retrieval couldn't ground in a specific passage is visibly flagged rather than silently left uncited. A revision history keeps every draft version alongside its source citations. Requires an Anthropic or OpenAI API key for drafting — without one, uploading and indexing sources still works, and the tool functions as a searchable source library, just without generated prose. Retrieval quality depends entirely on the local keyword search, so results are only as good as the sources you've actually uploaded. Do not build: a broader academic search index beyond the user's own uploaded files (that needs a licensed dataset well beyond personal scope), submission-ready formatting for specific journals or citation styles, or multi-user collaboration — this is a personal drafting tool grounded in files you already have, not a research-discovery engine.