Main flow
- Context and attachments
- Additional information
- Abstract review and approval
- Proposal generation, review and approval
Frontend — stages and assisted editing
Next.js, React and TypeScript organize context input, files, missing information and review. Shared state tracks stages and task identifiers; the interface reads the processing status stream. Mantine and the BlockNote editor support document review. Administrative surfaces cover proposals, templates, files and users, alongside export of an approved proposal.
Backend — domain and document processing
FastAPI coordinates chats, proposals, templates and review and approval transitions, using Supabase identity and data. Celery with RabbitMQ processes documents and attachments; the backend exposes task status through Server-Sent Events. Approving the abstract triggers template resolution and multiagent generation. The API awaits generation; workers handle document and attachment processing.
AI — hybrid retrieval and agents
Weaviate combines text and vector search across the institutional corpus and temporary chat attachment collections. Context uses the template, project data and user answers; attachments receive priority and conflicting knowledge-base excerpts are handled. Voyage AI embeddings support indexing. CrewAI organizes generation, editing and review tasks. Excerpt, file and page provenance is persisted for traceability and auditing.
Data — relational state, files and vector index
PostgreSQL/Supabase stores chats, proposals, templates, stages and evidence; Supabase Storage holds files. A separate ingestion service receives institutional documents, queues extraction and cleaning, chunks text, and writes Weaviate vectors and Storage Markdown. SHA-256 hashes and artifact checks deduplicate complete ingestion and repair partial results. Chat attachments follow another processing path with Docling/OCR and temporary collections, separate from the institutional corpus.