Aureview AI turns rough requirements, meeting notes, contract facts, or compliance evidence into polished professional documents. A dedicated Writer Agent drafts against a strict standard; a separate Critic Agent returns structured findings and routes incomplete drafts back for automatic refinement before a human makes the final decision.
Built for the Project 2 brief: professional-services document creation, rubric-driven QA, agentic revision routing, and deployable web delivery.
| Experience | Capability |
|---|---|
| Animated landing page | Product narrative, agent workflow visualization, and conversion paths |
| Guest studio | Three daily reviewed generations without registration, live editing, Markdown download |
| Authentication | Secure password hashing and JWT-based private workspaces |
| Dashboard | Document status counts, average agent cycles, and recent activity |
| Document workspace | Formatting toolbar, Markdown edit/preview, saved drafts, Critic re-review and refinement |
| Export center | Download authenticated documents as .docx, .md, .html, or structured .json |
| Agent API | FastAPI REST service with strict schemas and provider-safe error handling |
| Terminal workflow | Generate and review a document directly through the aureview CLI |
| Deployment | Docker Compose production bundle plus standard local developer workflow |
flowchart LR
A["Raw notes / transcript"] --> B["Writer Agent"]
B --> C["Draft Markdown"]
C --> D["Critic Agent"]
D --> E{"Schema-valid review"}
E -->|"approved"| F["Human approval + exports"]
E -->|"missing / high-risk findings"| B
The orchestration is implemented with LangGraph state and conditional edges. Every template carries required headings. The Critic's output is validated as JSON (status, score, findings, missing_sections, strengths) before it can drive routing. Revisions are bounded to protect cost and latency.
- Product Requirements Document: goals, success metrics, stories, requirements, UX flow, technical considerations, risks, rollout, open questions.
- Compliance Review Memo: scope, controls, evidence, findings, risk, remediation, sign-off.
- Contract Review Brief: parties, commercial terms, obligations, risk clauses, negotiation positions, missing information, next steps.
- Consulting Decision Memo: context, challenge, analysis, options, recommendation, roadmap, KPIs and risks.
Generated content is a drafting aid, not legal or compliance advice. Final approval remains explicitly human.
| Layer | Stack |
|---|---|
| Frontend | React 19, TypeScript, Vite, Framer Motion, React Markdown |
| API | Python, FastAPI, Pydantic, SQLAlchemy |
| Agents | LangGraph Writer/Critic graph with structured review state |
| Persistence and auth | SQLite by default, Argon2 password hashing, JWT access tokens |
| AI providers | Built-in demo engine, OpenAI, Anthropic Claude, xAI Grok |
| Hosting | Nginx frontend container and Uvicorn API container |
AIDocWriter/
|-- backend/
| |-- app/
| | |-- routers/ # Auth, public/guest, and owned document endpoints
| | |-- llm.py # Demo/OpenAI/Anthropic/xAI provider adapters
| | |-- workflow.py # LangGraph Writer <-> Critic routing
| | |-- templates.py # Professional document rubrics
| | `-- main.py # FastAPI application
| |-- tests/test_api.py
| `-- Dockerfile
|-- frontend/
| |-- src/components/ # Composer, editor, review, shells, animation
| |-- src/pages/ # Landing, auth, guest studio, dashboard, workspace
| `-- Dockerfile
|-- .env.example
`-- docker-compose.yml
From PowerShell in the project root:
Copy-Item .env.example .envThe application works immediately with DEFAULT_PROVIDER=demo, without a model API key.
cd backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e ".[test]"
python -m uvicorn app.main:app --reload --port 8000FastAPI documentation is available at http://localhost:8000/docs.
In another PowerShell window:
cd frontend
npm install
npm run devOpen http://localhost:5173.
After installing the backend:
aureview generate "Build a customer onboarding portal with document verification, audit logs, accessibility, and a target of completing onboarding in 30 minutes." --template prd --output onboarding-prd.mdProvider examples:
aureview generate "Quarterly access review notes..." --template compliance --provider demo
aureview generate "New analytics SaaS vendor contract..." --template contract --provider xai --model grok-4.3Cloud provider commands require the corresponding server environment key.
Only the backend reads credentials. Do not expose model keys in Vite environment variables or frontend code.
DEFAULT_PROVIDER=demo
DEFAULT_MODEL=studio-demo
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o
ANTHROPIC_API_KEY=
ANTHROPIC_MODEL=claude-3-5-sonnet-latest
XAI_API_KEY=
XAI_MODEL=grok-4.3The xAI API is supported through its OpenAI-compatible API endpoint. It should not be assumed free simply because a key can be created. As verified on May 27, 2026, xAI documents token-based API pricing and lists Grok API models on its pricing page. Availability and account-specific limits may vary.
Use the built-in demo engine for zero-key demonstrations, UI evaluation, and tests. Use a configured cloud model when genuine model-generated prose and analysis are required.
| Method | Route | Purpose |
|---|---|---|
GET |
/api/health |
Runtime health check |
GET |
/api/public/templates |
Template definitions |
GET |
/api/public/providers |
Available/configured providers |
POST |
/api/public/generate |
Rate-limited guest Writer/Critic generation |
POST |
/api/auth/signup |
Create workspace account |
POST |
/api/auth/signin |
Obtain JWT access token |
GET |
/api/documents/dashboard |
Workspace operational summary |
POST |
/api/documents/generate |
Generate and persist reviewed document |
PATCH |
/api/documents/{id} |
Save live editor revisions |
POST |
/api/documents/{id}/review |
Critique and auto-refine edited document |
GET |
/api/documents/{id}/export/{type} |
Export docx, md, html, or json |
- Source material is treated as untrusted document content in prompts, reducing prompt-injection risk from pasted text.
- Required headings are checked locally even when a cloud Critic is used; a missing mandatory section forces revision.
- Critic responses must parse into typed JSON before routing.
- Revision loops have a strict maximum iteration count.
- Guest access is limited daily by a hashed session/IP fingerprint.
- Provider credentials remain server-side; unconfigured providers are visibly disabled in the UI.
- API failures return useful errors instead of silently presenting unreviewed text as approved.
- HTML export is sanitized before download; protected documents are owner-scoped.
- Edits mark a stored document as requiring review until the Critic is rerun.
For production handling of confidential client material, replace SQLite with an operationally managed database, set a strong SECRET_KEY, terminate TLS, define retention policies, log approvals appropriately, and complete your provider/privacy assessment.
API test suite:
cd backend
.\.venv\Scripts\Activate.ps1
pytestFrontend type-check and optimized static build:
cd frontend
npm run buildTests cover the health/configuration contract, signup and authenticated generation, editing and automatic reviewer refinement, DOCX export, the LangGraph revision route, and the guest quota.
Create a production .env first. At minimum, replace SECRET_KEY; add provider credentials only where needed.
docker compose up --build -dOpen http://localhost:8080. The Nginx frontend proxies /api to the FastAPI service, and a named Docker volume preserves the SQLite database. For multi-instance cloud deployment, use PostgreSQL and a managed secret store rather than a local SQLite volume.
- Template administration and organization-specific rubric versions.
- Approval trails, comments, and role-based reviewer permissions.
- Retrieval of approved policy libraries with citation grounding.
- Version comparison and redline exports.
- PostgreSQL, object storage, SSO, audit-event streaming, and observability for enterprise hosting.
Aureview AI: professional drafting accelerated by agents, accountable through human review.