Turn executed contracts into reviewed, owned actions.
Aakd is an open-source, self-hostable contract lifecycle management platform for reviewed, source-linked contract operations. It helps a team move from an executed PDF or DOCX to cited contract facts, assigned obligations, deadlines, approvals, and completion evidence.
Website · Documentation · Roadmap · Issues · Discussions · Releases · Security · Discord community
Aakd is an early open-source release. Customer validation is in progress. It is not a hosted service, legal-advice product, compliance certification, or autonomous legal agent.
If Aakd is useful to your team, star the repository to help other self-hosting and contract-operations teams find it.
executed agreement
↓
source-linked facts and obligations
↓
human review and correction
↓
owners, deadlines, approvals, and reminders
↓
completion evidence
The first useful path is deliberately narrow:
- Upload an executed PDF or DOCX.
- Review extracted fields, obligations, and exact source citations.
- Correct anything that is wrong or missing.
- Assign owners and due dates.
- Track follow-up work, renewals, approvals, and evidence of completion.
AI is optional. When enabled, it assists with extraction, questions, risk signals, and obligation suggestions. AI output remains reviewable and is never the canonical source of contract truth.
This is a real browser recording of the Phase 0 workflow using a disposable account and a synthetic contract. It shows account setup, contract upload, human review, and contract creation.
The recording contains no real contract data. The workflow continues after creation into cited extraction review, obligations, approvals, and reminders.
- Contract repository with PDF/DOCX uploads, OCR, folders, tags, search, and version history.
- Source-linked metadata and obligation review with page-level evidence.
- Obligation and renewal views with owners, deadlines, reminders, and audit history.
- Organization-scoped approvals, comments, notifications, and activity logs.
- Optional DocuSeal signing integration.
- Optional AI through a provider key or local Ollama deployment.
- REST API and a scoped MCP endpoint for agent-assisted, human-controlled workflows.
- English, French, German, Spanish, and Arabic RTL interfaces.
Authoring, template management, autonomous agents, billing, hosted Cloud, and enterprise identity features are later phases. The code for some of these surfaces remains in the repository, but they are not part of the Phase 0 promise.
See PRODUCT.md for the product constitution and docs/
for deployment and API documentation.
- Docker and Docker Compose
- Git
- OpenSSL, for generating local secrets
git clone https://github.com/aaked-app/aakd.git
cd aakd
cp .env.example .env
# Generate values and put them in .env
openssl rand -base64 32 # BETTER_AUTH_SECRET
openssl rand -hex 32 # ENCRYPTION_KEY
openssl rand -hex 32 # NOTIFICATION_ENCRYPTION_KEY
openssl rand -hex 64 # DOCUSEAL_SECRET_KEY_BASE
docker compose upOpen http://localhost:3000. The first signup creates an account and organization. Repository, uploads, manual metadata, approvals, obligations, and signing can be tried without an AI provider. Add an AI key in Settings only if you want AI-assisted features.
The local stack also includes PostgreSQL, Redis, MinIO, Mailpit, DocuSeal, and
the background worker. Their local endpoints and credentials are documented in
docs/self-hosting.md.
For a single Ubuntu VM, the production installer configures the web app, worker, PostgreSQL, Redis, S3-compatible storage, DocuSeal, Caddy, and backups:
git clone https://github.com/aaked-app/aakd.git ~/aakd
cd ~/aakd
chmod +x scripts/*.sh
AAKD_REF=<reviewed-40-character-commit-sha> bash scripts/deploy.shPoint DNS to the server and allow ports 80 and 443 before running the installer. Email and AI providers are optional. Do not expose the development Compose stack or its default MinIO/Mailpit credentials to the internet.
AAKD_REF=<reviewed-40-character-commit-sha> bash scripts/update.sh # update an installation
bash scripts/doctor.sh # diagnose an installation
bash scripts/backup.sh # create a database backup
bash scripts/restore.sh backups/file.sql.gz --yes-really-restoreRead the complete self-hosting guide and the Oracle Cloud walkthrough before using Aakd with real contracts.
Self-hosting keeps application data on infrastructure you control. AI is opt-in: use Ollama locally or bring your own provider key. Aakd stores the source text and citation for AI-derived fields so a reviewer can inspect and correct them.
Do not treat an AI result as legal advice or as an automatic approval. Review contract facts and obligations before relying on them.
- Web: Next.js 16 App Router, React 19, TypeScript, Tailwind CSS
- Data: PostgreSQL 16, Prisma, pgvector
- Auth: Better Auth with organization-scoped access
- Jobs: BullMQ and Redis, with a separate worker process
- Files: S3-compatible storage, MinIO in the local stack
- AI: Anthropic, OpenAI, or Ollama through the existing provider layer
- Signing: DocuSeal integration
The main application lives in apps/web. The worker is
apps/web/worker.ts. Start with CLAUDE.md and
AGENTS.md when contributing.
Run the Phase 0 verification script before publishing a release:
bash scripts/verify-phase-0.shThis checks Compose configuration, type safety, lint, tests, tenant-isolation tests, and the production build. It does not claim customer adoption, enterprise compliance, or production security certification.
Start with an issue or discussion describing the user problem, the affected workflow, and how it can be verified. Keep changes focused and preserve the source-linked, human-reviewable contract model. See the repository's issue and pull-request templates for project-specific guidance.
- Document the synthetic demo-verification workflow.
- Write the operator guide to audit history and activity records.
- Help shape the amendment-impact review workflow.
For setup questions, implementation discussions, and contributor coordination, join the Aakd Discord community. Please avoid sharing real contract data or other confidential information in public channels.
To share evaluation feedback without including confidential contract data, open a workflow-feedback issue.
For security vulnerabilities, use the private reporting process in
SECURITY.md rather than publishing exploit details in an issue.
- Product constitution and roadmap
- Self-hosting guide
- API reference
- Analytics and privacy information
- Community launch checklist
Aakd is licensed under AGPL-3.0. Paid hosting, deployment, and consulting services are permitted under the AGPL. If you modify Aakd and make it available to users over a network, the AGPL requires offering those users the corresponding source for that modified version. Alternative proprietary license terms are not generally offered at this time.


