Skip to content

Repository files navigation

ASDEFCON Digital Contract Assembly Platform

A comprehensive intelligent automation system for Australian Defence contracting, designed to assist Defence personnel in assembling compliant contracts through AI-powered analysis, recommendation, and validation.

Overview

The ASDEFCON platform provides:

  • Document Analysis: AI-powered parsing of FPS, OCD, and technical specifications
  • Intelligent Recommendations: Context-aware clause suggestions with dependency checking
  • Compliance Validation: Automated validation against procurement rules and standards
  • Collaborative Workflows: Multi-user review and approval processes
  • Professional Export: Generation of properly formatted ASDEFCON Word documents

Architecture

This is a microservices-based monorepo built with Domain-Driven Design (DDD) principles.

Technology Stack

Backend Services (Python 3.13)

  • Package Manager: UV
  • Web Framework: FastAPI
  • ORM: SQLAlchemy 2.0 with asyncpg
  • Type Checking: MyPy (strict mode)
  • Linting & Formatting: Ruff
  • Testing: Pytest with pytest-asyncio
  • Logging: structlog
  • AI: Anthropic SDK (Claude)

Frontend (TypeScript)

  • Framework: Next.js 15 (App Router)
  • UI: React 18+
  • Flow Diagrams: React Flow
  • State: Zustand
  • Data Fetching: TanStack Query
  • Validation: Zod
  • Styling: Tailwind CSS + shadcn/ui

Infrastructure

  • Databases: PostgreSQL, Redis
  • Object Storage: S3-compatible
  • Vector DB: Pinecone/Weaviate
  • Deployment: Railway
  • Containers: Docker

Services

  1. document-service: Document upload, parsing, AI analysis
  2. clause-service: Clause library, dependency resolution, recommendations
  3. compliance-service: Rules engine, validation, audit trails
  4. collaboration-service: Comments, reviews, workflows
  5. export-service: Word document generation
  6. web: Next.js frontend application

Each service is independently deployable with its own domain logic, database schema, and API.

Project Structure

ASDEFCON/
├── services/           # Backend microservices
│   ├── document-service/
│   ├── clause-service/
│   ├── compliance-service/
│   ├── collaboration-service/
│   └── export-service/
├── apps/
│   └── web/           # Next.js frontend
├── packages/          # Shared code
│   ├── shared/        # TypeScript types & utilities
│   ├── api-contracts/ # OpenAPI specifications
│   └── database/      # Database tooling
├── infrastructure/    # Docker, Railway configs
└── docs/             # Architecture & development docs

Quick Start

Prerequisites

  • Python 3.13+
  • Node.js 20+
  • Docker & Docker Compose
  • UV (Python package manager)
  • Git

Local Development Setup

  1. Clone the repository
git clone <repository-url>
cd ASDEFCON
  1. Start infrastructure services
make docker-up
  1. Install dependencies
# Install all Python services
make install-python

# Install frontend
make install-frontend
  1. Set up environment variables
# Copy example environment files
cp services/document-service/.env.example services/document-service/.env
cp services/clause-service/.env.example services/clause-service/.env
cp services/compliance-service/.env.example services/compliance-service/.env
cp services/collaboration-service/.env.example services/collaboration-service/.env
cp services/export-service/.env.example services/export-service/.env
cp apps/web/.env.example apps/web/.env.local

# Edit each .env file with your configuration
  1. Run database migrations
make migrate
  1. Start development servers
# Start all services
make dev

# Or start individually
make dev-document-service
make dev-clause-service
make dev-compliance-service
make dev-collaboration-service
make dev-export-service
make dev-web
  1. Access the application

Development

Code Quality Standards

All code must pass:

  • Type checking (MyPy for Python, TypeScript strict mode)
  • Linting (Ruff for Python, ESLint for TypeScript)
  • Formatting (Ruff for Python, Prettier for TypeScript)
  • Unit tests (>80% coverage for domain logic)

Common Commands

# Run all checks
make check

# Format code
make format

# Run tests
make test

# Type check
make type-check

# Lint
make lint

# Clean build artifacts
make clean

Working with Services

Each Python service follows Clean Architecture with DDD:

service/
├── src/
│   ├── domain/           # Pure business logic
│   ├── application/      # Use cases, DTOs
│   ├── infrastructure/   # External dependencies
│   ├── presentation/     # FastAPI routes
│   ├── config/          # Settings
│   └── tests/           # Tests

See individual service READMEs for specific details.

Testing

# Run all tests
make test

# Run tests for specific service
cd services/document-service && make test

# Run with coverage
make test-coverage

# Run integration tests
make test-integration

# Run e2e tests
make test-e2e

Deployment

Railway Deployment

Each service has a dedicated Railway configuration:

# Deploy all services
make deploy-all

# Deploy specific service
cd services/document-service && railway up

# Deploy frontend
cd apps/web && railway up

See docs/deployment/railway-setup.md for detailed deployment instructions.

Documentation

Security

This platform handles sensitive Defence contracts with classifications up to SECRET.

  • All services require JWT authentication
  • Multi-tenancy with tenant isolation
  • Row-level security in databases
  • Comprehensive audit logging
  • Security-safe logging (no PII)

Report security issues to: [security contact]

License

[License Type] - See LICENSE file for details

Support

  • Documentation: docs/
  • Issues: GitHub Issues
  • Contact: [contact information]

Built for Australian Defence with a focus on compliance, security, and professional excellence.

About

ASDEFCON contract management tooling

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages