Back
Writing AIssistant
A creative Markdown writing environment supercharged by AI: a RAG assistant that understands an entire manuscript and suggests edits that are always validated by the author (human-in-the-loop).
Tech stack
AngularFastAPILangChainPostgreSQLChromaDBDocker
View projectContext & goal
Writing AIssistant is a writing companion for authors that pairs the comfort of Markdown with the power of generative AI. Unlike a classic chatbot that forgets the start of the book as writing progresses, the app semantically indexes every paragraph so it can reason over the whole story. The project's core conviction: AI must be powerful but never autonomous over the author's text — every suggestion goes through human validation.
Features
- Professional Markdown editor powered by Monaco (the engine behind VS Code), with preview, 11 self-hosted serif fonts and a live word count
- Tool-equipped AI assistant: it searches the manuscript, reads chapters and consults the world "bible" to answer questions about plot, characters or narrative consistency
- Human-in-the-loop: every AI-suggested edit goes through an approval interface before touching the text (strict or copilot mode, configurable per book)
- RAG-native: every paragraph is semantically indexed and the index refreshes automatically after writing
- World bible (characters, places, aliases) available to the AI and wired into spell/grammar checking (LanguageTool)
- Bring Your Own Model: choose your provider (OpenAI, Mistral, Anthropic, Google, Hugging Face…), with API keys encrypted using a key unique to each browser
- Snapshots, SSE streaming of the agent's steps, dark/light theme and a bilingual EN/FR interface
Technical choices
- FastAPI — fully asynchronous Python API, Pydantic schemas, RAG chains and agent tools via LangChain, Alembic migrations
- Angular 21 — latest-generation client, 100% standalone components and Signals, SSR to pre-render public pages for SEO (EN/FR)
- Hybrid storage — PostgreSQL (async SQLAlchemy) for the text, ChromaDB as a local vector database, one isolated collection per book and per embedding model
- Structured manuscript — a tree of nodes (parts, chapters, scenes) with stable anchors; on save, only modified nodes are sent to the API (minimal client-side diff)
- OpenID Connect SSO — Authorization Code + PKCE flow, generic implementation (Zitadel in production, Keycloak locally); API keys never stored in clear text
- Docker — full containerized ecosystem (Postgres, ChromaDB, API) for simplified development and deployment