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.
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
This is a microservices-based monorepo built with Domain-Driven Design (DDD) principles.
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
- document-service: Document upload, parsing, AI analysis
- clause-service: Clause library, dependency resolution, recommendations
- compliance-service: Rules engine, validation, audit trails
- collaboration-service: Comments, reviews, workflows
- export-service: Word document generation
- web: Next.js frontend application
Each service is independently deployable with its own domain logic, database schema, and API.
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
- Python 3.13+
- Node.js 20+
- Docker & Docker Compose
- UV (Python package manager)
- Git
- Clone the repository
git clone <repository-url>
cd ASDEFCON- Start infrastructure services
make docker-up- Install dependencies
# Install all Python services
make install-python
# Install frontend
make install-frontend- 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- Run database migrations
make migrate- 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- Access the application
- Frontend: http://localhost:3000
- Document Service: http://localhost:8001
- Clause Service: http://localhost:8002
- Compliance Service: http://localhost:8003
- Collaboration Service: http://localhost:8004
- Export Service: http://localhost:8005
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)
# 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 cleanEach 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.
# 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-e2eEach 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 upSee docs/deployment/railway-setup.md for detailed deployment instructions.
- Architecture Documentation
- Development Guide
- API Documentation
- Deployment Guide
- Contributing Guidelines
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 Type] - See LICENSE file for details
- Documentation:
docs/ - Issues: GitHub Issues
- Contact: [contact information]
Built for Australian Defence with a focus on compliance, security, and professional excellence.