How codewithrishabh09/ai-contract-risk-compliance-platform works
This is an under-construction AI contract risk and compliance platform. The repository evidence shown is chiefly a SQLAlchemy data model and database configuration, not an implemented user-facing workflow: API, repository, and service packages contain no sampled implementation. The intended workflow is document upload and processing, followed by clause extraction, analysis, and risk/compliance review; those capabilities are documented as planned. The graph separates that product roadmap from the evidenced persistence schema. Relationships between records reflect declared ORM foreign keys; runtime orchestration is not established by the excerpts.
Main entry points: contract_version.py Contract versions · user.py User accounts · services AI insights · contract.py Contracts
Components 20
Planned analysis workflow
- Upload and processing
server/app/services - Text extraction
server/app/services - Clause extraction
server/app/services - AI insights
server/app/services - Compliance review
server/app/services - Risk assessment
server/app/services
Organization and access
- Organizations
server/app/models/organization.py - User accounts
server/app/models/user.py
Contract records
- Contracts
server/app/models/contract.py - Contract versions
server/app/models/contract_version.py - Document metadata
server/app/models/document.py - Text chunks
server/app/models/document_chunk.py
Processing and findings
- Processing jobs
server/app/models/processing_job.py - Extracted clauses
server/app/models/clause.py - Analysis results
server/app/models/analysis_result.py - Risk findings
server/app/models/risk_finding.py
Persistence foundation
- Application settings
server/app/core/config.py - Database session
server/app/db/session.py - PostgreSQL database
Other components
- Platform user
Connections 21
- Platform user → Upload and processing: initiates (planned)
README.md - Upload and processing → Text extraction: processes (planned)
README.md - Text extraction → Clause extraction: extracts (planned)
README.md - Clause extraction → AI insights: informs (planned)
README.md - AI insights → Compliance review: supports (planned)
README.md - AI insights → Risk assessment: supports (planned)
README.md - User accounts → Organizations: belongs to
server/app/models/user.py - Contracts → Organizations: belongs to
server/app/models/contract.py - Contracts → User accounts: created by
server/app/models/contract.py - Contract versions → Contracts: versions
server/app/models/contract_version.py - Contract versions → User accounts: uploaded by
server/app/models/contract_version.py - Document metadata → Contract versions: associated with
server/app/models/document.py - Text chunks → Contract versions: derived from
server/app/models/document_chunk.py - Processing jobs → Contract versions: tracks processing for
server/app/models/processing_job.py - Processing jobs → User accounts: requested by
server/app/models/processing_job.py - Extracted clauses → Contract versions: extracted from
server/app/models/clause.py - Analysis results → Contract versions: analyzes
server/app/models/analysis_result.py - Risk findings → Analysis results: belongs to
server/app/models/risk_finding.py - Risk findings → Extracted clauses: may reference
server/app/models/risk_finding.py - Database session → Application settings: reads settings
server/app/db/session.py - Database session → PostgreSQL database: creates engine for
server/app/db/session.py