Erlyc
Erlyc
Toggle sidebar
Log in
Log in
Report this showcase item

Tell us what is wrong — spam, offensive content, stolen work…

Shared artifacts

Secure legal operations platform

NG

Nolan George

published 2 weeks ago · 36 views

5.0 (1)

Secure legal operations and corporate governance platform for multinational organizations, that gives legal teams, company secretaries, executives, board members, finance teams, compliance officers and external counsel one central workspace to manage legal entities, board and committee activities, contracts, legal matters, documents and legal spending

Secure legal operations platform — Screen map
Project anatomy

Built with deepseek/deepseek-v4-flash-0731

32
Entities
37
DB tables
48
Screens
8
Modules
32
Models
49
Relations
1
Roles
9
Requirements
5
Journeys
0 comments
Log in to like, rate, or join the conversation. Log in
Original prompt

A simpler alternative to a large-scale, secure legal operations and corporate governance platform for multinational organizations, that gives legal teams, company secretaries, executives, board members, finance teams, compliance officers and external counsel one central workspace to manage legal entities, board and committee activities, contracts, legal matters, documents and legal spending. Users should be able to maintain complete records for subsidiaries and branches across multiple countries, visualize ownership structures and organizational charts, track directors, officers, shareholders, mandates, capital changes, registrations, beneficial owners and statutory obligations, and receive alerts for filing deadlines, mandate expirations and missing information. Include a board portal where authorized users can schedule meetings, prepare agendas, collect agenda requests, assemble and securely distribute board packs, annotate documents, hold discussions, record attendance, manage conflicts of interest, conduct votes, approve written resolutions, assign follow-up actions, generate minutes and collect electronic signatures. Provide contract lifecycle management covering request intake, template selection, collaborative drafting, clause libraries, negotiation, internal approval, signature, renewal, termination and obligation tracking, with version comparison, related-party records, configurable approval thresholds, risk flags and automated reminders. Add legal matter management for litigation, claims, investigations, regulatory requests and advisory work, with intake forms, owners, stakeholders, timelines, tasks, deadlines, budgets, external counsel, invoices, evidence, correspondence, outcomes and links to related contracts or entities. Include a secure document library with folders, metadata, permissions, version history, retention rules, document previews, full-text search, OCR and controlled external sharing. Provide AI assistance that can summarize documents and meetings, extract contract terms and obligations, identify unusual or missing clauses, translate legal content, answer questions using authorized documents, suggest tags and generate first drafts while clearly showing source references and requiring human review. Create role-based home pages and dashboards showing upcoming meetings, expiring contracts, overdue actions, entity compliance status, open matters, legal spend, workload, risks and recent activity, with drill-down charts, saved views, advanced search, filters and configurable reports. Support granular permissions by legal entity, country, department, matter, contract, committee, document sensitivity and user role, including temporary access for external advisers, segregation of duties, confidential matters, delegated approvals and a complete immutable audit history. Add configurable workflows, notifications, escalations, comments, mentions, task assignments, approval queues and email or in-app reminders, as well as administration settings for legal entities, jurisdictions, currencies, languages, document templates, numbering rules, approval matrices, retention periods and notification preferences. Allow bulk imports from spreadsheets, exports to Excel and PDF, scheduled reports, API-based integrations with identity providers, electronic signature services, email, calendars, finance and ERP systems, and provide responsive mobile access with secure board-pack reading, offline access, annotations, voting, approvals and biometric login.

Specification

A simpler alternative to a large-scale, secure legal operati — Specification

Product overview

A centralized workspace for legal teams, company secretaries, executives, board members, finance teams, compliance officers, and external counsel to manage legal entities, board activities, contracts, legal matters, documents, and legal spending. It includes a board portal, contract lifecycle management, legal matter management, secure document library, AI assistance, role-based dashboards, granular permissions, configurable workflows, and integrations.

Problem statement

Large-scale legal operations and corporate governance platforms are often complex, expensive, and difficult to adopt. This project aims to provide a simpler, more intuitive alternative that still covers the essential capabilities for multinational organizations, including entity management, board portal, contract lifecycle, legal matters, document library, AI assistance, and granular permissions.

Target users & roles

  • Legal Ops — Legal operations professionals, company secretaries, executives, board members, finance teams, compliance officers, and external counsel who need a unified platform for corporate governance and legal management.

User journeys

Contract Approval Journey

  1. Legal Ops user creates a new contract using a template.
  2. The contract is sent for collaborative drafting to the counterparty.
  3. After negotiation, the contract is submitted for approval.
  4. The approval request is routed to the manager's queue.
  5. The manager approves the contract, and it moves to 'Active' status.
  6. The system sends a notification to the contract owner.

Functional requirements

FR-1: Legal Entity Management

The system must allow users to maintain complete records for legal entities, including subsidiaries and branches across multiple countries, and track ownership structures, directors, officers, shareholders, mandates, capital changes, registrations, beneficial owners, and statutory obligations. The system must also provide visualization of ownership structures and organizational charts. This is essential for multinational organizations to have a single source of truth for corporate governance.

Acceptance criteria:

  • Given a legal entity with a filing deadline, when the current date is within 30 days of the deadline, then the system sends a notification to the responsible owner and the company secretary.

FR-2: Board Portal

The system must provide a board portal where authorized users can schedule meetings, prepare agendas, collect agenda requests, assemble and securely distribute board packs, annotate documents, hold discussions, record attendance, manage conflicts of interest, conduct votes, approve written resolutions, assign follow-up actions, generate minutes, and collect electronic signatures. This centralizes board activities and ensures secure collaboration.

Acceptance criteria:

  • Given a board meeting with a scheduled start time, when the meeting start time is within 24 hours, then the system locks the board pack and prevents further edits to the agenda and documents.

FR-3: Contract Lifecycle Management

The system must provide contract lifecycle management covering request intake, template selection, collaborative drafting, clause libraries, negotiation, internal approval, signature, renewal, termination, and obligation tracking, with version comparison, related-party records, configurable approval thresholds, risk flags, and automated reminders. This reduces contract cycle time and improves compliance.

Acceptance criteria:

  • Given a contract with status='Draft' and an approval threshold of $10,000, when a user submits the contract for approval, then the system creates an approval request and routes it to the approver queue of the user's manager.

FR-4: Legal Matter Management

The system must support legal matter management for litigation, claims, investigations, regulatory requests, and advisory work, with intake forms, owners, stakeholders, timelines, tasks, deadlines, budgets, external counsel, invoices, evidence, correspondence, outcomes, and links to related contracts or entities. This provides a complete view of legal work and spend.

Acceptance criteria:

  • Given a legal matter with type='Litigation' and status='Open', when a user adds an invoice to the matter, then the system updates the actual spend and displays it on the matter dashboard.

FR-5: Secure Document Library

The system must include a secure document library with folders, metadata, permissions, version history, retention rules, document previews, full-text search, OCR, and controlled external sharing. This ensures that legal documents are stored securely and are easily retrievable.

Acceptance criteria:

  • Given a document with a retention period of 7 years, when the retention period expires, then the system marks the document as 'Retention Expired' and prevents further edits, but retains it for audit purposes.

FR-6: AI Assistance

The system must provide AI assistance that can summarize documents and meetings, extract contract terms and obligations, identify unusual or missing clauses, translate legal content, answer questions using authorized documents, suggest tags, and generate first drafts while clearly showing source references and requiring human review. This enhances productivity while maintaining accountability.

Acceptance criteria:

  • Given a document uploaded to the library, when the user requests an AI summary, then the system generates a summary with source references and displays a disclaimer that human review is required.

FR-7: Granular Permissions, Workflows, and Administration

The system must support granular permissions by legal entity, country, department, matter, contract, committee, document sensitivity, and user role, including temporary access for external advisers, segregation of duties, confidential matters, delegated approvals, and a complete immutable audit history. The system must also provide configurable workflows, notifications, escalations, comments, mentions, task assignments, approval queues, and email or in-app reminders, as well as administration settings for legal entities, jurisdictions, currencies, languages, document templates, numbering rules, approval matrices, retention periods, and notification preferences. This ensures data security and compliance.

Acceptance criteria:

  • Given a user with role 'External Counsel' and temporary access to a matter, when the temporary access expires, then the system revokes all permissions for that user on the matter and logs the revocation in the audit trail.
  • Given a user with role 'System Admin', when the user configures a new workflow for contract approval, then the system applies the workflow to all new contract submissions.

FR-8: Role-Based Dashboards

The system must provide role-based home pages and dashboards showing upcoming meetings, expiring contracts, overdue actions, entity compliance status, open matters, legal spend, workload, risks, and recent activity, with drill-down charts, saved views, advanced search, filters, and configurable reports. This gives users a personalized overview of their responsibilities.

Acceptance criteria:

  • Given a user with role 'Legal Ops', when the user views their dashboard, then the system displays widgets for upcoming meetings, expiring contracts, overdue actions, entity compliance status, open matters, legal spend, workload, risks, and recent activity, with drill-down charts and saved views.

FR-9: Import/Export, Integrations, and Mobile Access

The system must allow bulk imports from spreadsheets, exports to Excel and PDF, scheduled reports, API-based integrations with identity providers, electronic signature services, email, calendars, finance and ERP systems, and provide responsive mobile access with secure board-pack reading, offline access, annotations, voting, approvals, and biometric login. This ensures interoperability and accessibility.

Acceptance criteria:

  • Given a user with role 'Legal Ops', when the user imports a spreadsheet of legal entities, then the system validates the data and creates the entities, and reports any errors. When the user exports a report to Excel or PDF, then the system generates the file. When the user schedules a report, then the system sends it at the scheduled time. When the user accesses the system via mobile, then the system provides secure board-pack reading, offline access, annotations, voting, approvals, and biometric login.

Screen / page inventory

  • Entity Management Dashboard — Provides a comprehensive view of all legal entities, their ownership structures, and compliance status.
    • Elements: Entity list table, Entity detail panel, Ownership chart, Statutory obligations list
  • Board Portal — Allows authorized users to manage board meetings, distribute materials, and conduct votes.
    • Elements: Meeting list, Agenda editor, Board pack viewer, Voting panel, Attendance list
  • Contract Management — Provides a centralized view of all contracts, their status, and approval processes.
    • Elements: Contract list, Contract detail view, Approval workflow panel, Renewal reminders
  • Legal Matter Management — Enables tracking of legal matters, budgets, and tasks.
    • Elements: Matter list, Matter detail view, Task list, Budget tracker, Invoice list
  • Document Library — Provides secure storage and retrieval of legal documents.
    • Elements: Document tree, Document preview, Search bar, Version history
  • Role-Based Home Dashboard — Gives users a personalized overview of their responsibilities and alerts.
    • Elements: Dashboard widgets, Upcoming meetings list, Expiring contracts list, Overdue tasks list, Legal spend chart

Data model

User

Field Type Notes
id uuid Primary key, UUID
email string Unique, indexed, max length 255
full_name string Max length 255
role enum(...) Enum: System Admin, Legal Ops, Company Secretary, Executive, Board Member, Finance, Compliance, External Counsel
timezone string IANA timezone string, default UTC
locale string Language code, default en
is_active boolean Boolean, default true
created_at datetime Timestamp, default now
updated_at datetime Timestamp, auto-updated

LegalEntity

Field Type Notes
id uuid Primary key, UUID
name string Max length 255, indexed
jurisdiction string Country code, ISO 3166-1 alpha-2
registration_number string Max length 100, unique per jurisdiction
parent_entity_id foreign_key->LegalEntity Foreign key to LegalEntity, nullable for top-level
status enum(...) Enum: Active, Inactive, Pending, Dissolved
filing_deadlines json JSON array of {obligation, deadline, responsible_party}
capital_changes json JSON array of {date, type, amount, currency}
registrations json JSON array of {authority, registration_number, expiry_date}
statutory_obligations json JSON array of {obligation, frequency, next_due_date}
created_at datetime Timestamp, default now
updated_at datetime Timestamp, auto-updated

Contract

Field Type Notes
id uuid Primary key, UUID
title string Max length 255
status enum(...) Enum: Draft, InNegotiation, PendingApproval, Active, Expired, Terminated
owner_id foreign_key->User Foreign key to User
counterparty_id foreign_key->LegalEntity Foreign key to LegalEntity
start_date date Date
end_date date Date, nullable
renewal_date date Date, nullable
estimated_cost decimal Decimal(15,2), nullable
actual_cost decimal Decimal(15,2), nullable
currency string ISO 4217 code, default USD
risk_flag boolean Boolean, default false
approval_threshold decimal Decimal(15,2), default 10000, configurable per entity and role
version integer Integer, default 1, used for optimistic concurrency
clause_library_id foreign_key->ClauseLibrary Foreign key to ClauseLibrary, nullable
related_party_ids json JSON array of UUIDs referencing LegalEntity or Person
automated_reminders json JSON array of {event, days_before, channel}
created_at datetime Timestamp, default now
updated_at datetime Timestamp, auto-updated

LegalMatter

Field Type Notes
id uuid Primary key, UUID
title string Max length 255
type enum(...) Enum: Litigation, Claim, Investigation, RegulatoryRequest, Advisory
status enum(...) Enum: Open, InProgress, OnHold, Closed
owner_id foreign_key->User Foreign key to User
entity_id foreign_key->LegalEntity Foreign key to LegalEntity, nullable
contract_id foreign_key->Contract Foreign key to Contract, nullable
budget decimal Decimal(15,2), nullable
actual_spend decimal Decimal(15,2), nullable
currency string ISO 4217 code, default USD
start_date date Date
end_date date Date, nullable
intake_form json JSON object containing intake form data
evidence json JSON array of {document_id, description}
correspondence json JSON array of {date, sender, recipient, subject, body}
outcome text Text, nullable
created_at datetime Timestamp, default now
updated_at datetime Timestamp, auto-updated

BoardMeeting

Field Type Notes
id uuid Primary key, UUID
title string Max length 255
scheduled_start datetime Datetime
scheduled_end datetime Datetime
status enum(...) Enum: Scheduled, InProgress, Completed, Cancelled
agenda text Text, agenda items
minutes text Text, generated minutes
agenda_requests json JSON array of {requester_id, item, status}
conflicts_of_interest json JSON array of {user_id, declaration, status}
electronic_signatures json JSON array of {user_id, document_id, signature_data, timestamp}
created_by_id foreign_key->User Foreign key to User
created_at datetime Timestamp, default now
updated_at datetime Timestamp, auto-updated

Document

Field Type Notes
id uuid Primary key, UUID
title string Max length 255
folder_id foreign_key->Folder Foreign key to Folder, nullable
uploader_id foreign_key->User Foreign key to User
content_type string MIME type
size_bytes integer Integer
version integer Integer, default 1
retention_period_days integer Integer, default 2555 (7 years)
status enum(...) Enum: Active, Archived, RetentionExpired
ocr_text text Text, extracted text from OCR
external_sharing json JSON object {enabled, expiry, access_token}
ai_source_references json JSON array of {document_id, page, snippet}
human_review_required boolean Boolean, default true
created_at datetime Timestamp, default now
updated_at datetime Timestamp, auto-updated

Folder

Field Type Notes
id uuid Primary key, UUID
name string Max length 255
parent_folder_id foreign_key->Folder Foreign key to Folder, nullable
created_at datetime Timestamp, default now

ClauseLibrary

Field Type Notes
id uuid Primary key, UUID
name string Max length 255
clauses json JSON array of {title, content, tags}
created_at datetime Timestamp, default now

Stakeholder

Field Type Notes
id uuid Primary key, UUID
matter_id foreign_key->LegalMatter Foreign key to LegalMatter
user_id foreign_key->User Foreign key to User
role string String, e.g., 'Counsel', 'Client'

Attendee

Field Type Notes
id uuid Primary key, UUID
meeting_id foreign_key->BoardMeeting Foreign key to BoardMeeting
user_id foreign_key->User Foreign key to User
attendance_status enum(...) Enum: Invited, Accepted, Declined, Attended

Business rules

  • Given a contract with status='Draft' and an approval threshold of $10,000, when a user submits the contract for approval, then the system creates an approval request and routes it to the approver queue of the user's manager.
  • Given a document with a retention period of 7 years, when the retention period expires, then the system marks the document as 'Retention Expired' and prevents further edits, but retains it for audit purposes.
  • Given a board meeting with a scheduled start time, when the meeting start time is within 24 hours (based on the meeting's timezone), then the system locks the board pack and prevents further edits to the agenda and documents.
  • Given a user with role 'External Counsel' and temporary access to a matter, when the temporary access expires, then the system revokes all permissions for that user on the matter and logs the revocation in the audit trail.
  • Given a legal entity with a filing deadline, when the current date is within 30 days of the deadline (based on the entity's local timezone), then the system sends a notification to the responsible owner and the company secretary.
  • Given a contract with a renewal date, when the renewal date is within 60 days, then the system sends a reminder to the contract owner and the finance team.
  • Given a vote on a board resolution, when the voting deadline passes, then the system automatically closes the vote and records the outcome as 'Passed' if more than 50% of eligible votes are in favor, otherwise 'Failed'.

Permissions

Role Capabilities
System Admin create; read; update; delete; import; export; approve; annotate; vote
Legal Ops create; read; update; delete; import; export; approve; annotate
Company Secretary create; read; update; import; export; approve; annotate
Executive read; update; approve; annotate; vote
Board Member read; annotate; vote
Finance read; update; export
Compliance read; update; export
External Counsel read; annotate; update

Integrations

  • Identity Provider (e.g., SAML/OIDC)
  • Electronic Signature Service (e.g., DocuSign)
  • Email Service (SMTP)
  • Calendar Service (e.g., Google Calendar)
  • Finance/ERP System (e.g., SAP, Oracle)

Non-functional requirements

  • Performance: The system must support up to 10,000 concurrent users with a response time of under 2 seconds for typical page loads and under 5 seconds for complex reports.
  • Security: All data must be encrypted at rest and in transit using AES-256 and TLS 1.2 or higher. The system must support multi-factor authentication and biometric login for mobile.
  • Scalability: The system must be horizontally scalable to accommodate growth in data volume and user count, with a target of 99.9% uptime.

Edge cases

  • When a user attempts to delete a legal entity that has associated contracts, matters, or board meetings, the system blocks the deletion and returns an error message listing the related records.
  • When a board meeting is scheduled and the board pack contains documents that are not yet approved, the system allows the meeting to proceed but flags the documents as 'Pending Approval' in the agenda.
  • When a contract's renewal date is set to a date before its end date, the system rejects the update and prompts the user to correct the dates.
  • When a user with temporary access to a matter attempts to access it after the access expires, the system denies access and logs the attempt in the audit trail.
  • When a document is uploaded with a file size exceeding the maximum allowed (100 MB), the system rejects the upload and notifies the user.

Out of scope

  • Advanced AI features beyond summarization, extraction, and drafting, such as predictive analytics or autonomous decision-making.
  • Full-featured eDiscovery or litigation hold management beyond basic evidence storage.
  • Integration with specialized legal research databases (e.g., Westlaw, LexisNexis).
  • Native mobile apps; the system will be responsive web-based with offline support via PWA.
  • Blockchain-based document notarization or smart contracts.

Assumptions & open items

Assumed:

  • The platform uses a role-based access control model with the following default roles: System Admin, Legal Ops, Company Secretary, Executive, Board Member, Finance, Compliance, External Counsel. These roles are used in permission definitions and user journeys.
  • The system supports soft-delete for all user-generated content (entities, contracts, matters, documents, etc.) to allow recovery and auditability.
  • The system maintains a complete immutable audit log for all create, update, delete, view, export, and permission-change actions.
  • The system uses a default retention period of 7 years for documents and contracts, configurable per document type.
  • The system uses a default notification preference of email and in-app, with the ability to configure per user.
  • The system uses a default currency of USD for monetary fields, with support for multi-currency via an exchange rate entity.
  • The system uses a default timezone of UTC for all datetime fields, with user-level timezone display.
  • The system supports bulk import from CSV/XLSX files with a maximum of 10,000 rows per import.
  • The system supports export to Excel and PDF with a maximum of 10,000 rows per export.
  • The system uses a default approval threshold of $10,000 for contract approvals, configurable per entity and role.
  • The system uses a default alert threshold of 30 days before a filing deadline or mandate expiration.
  • The system uses a default pagination size of 50 records per page in list views.

Coverage notes

  • Functional requirements: 9 (with acceptance criteria: 9)
  • Open assumptions: 12 (unresolved/conflicted: 0)
  • Entities in data model: 10
  • Screens: 6, Roles: 1, Journeys: 1
Screen map
Sandbox
Entities diagram
Sandbox
DB schema
Sandbox
Data models
Sandbox
Entities & DB (text)

Entity-relationship model for a centralized legal operations and corporate governance platform. It covers legal entity management, board portal activities, contract lifecycle management, legal matter management, a secure document library, AI assistance, granular permissions, configurable workflows, and role-based dashboards. The schema includes base User and UserProfile entities, core domain entities (LegalEntity, Contract, LegalMatter, BoardMeeting, Document, Folder, ClauseLibrary), supporting entities for stakeholders, attendees, approvals, tasks, invoices, notifications, audit logging, and administrative configuration, plus junction entities for many-to-many relationships.

Entities (32)
User

Represents a user account in the system, including authentication identity and base profile information. Users can have various roles such as System Admin, Legal Ops, Company Secretary, Executive, Board Member, Finance, Compliance, or External Counsel.

  • email string
    unique

    Unique email address used for authentication and communication.

  • full_name string

    The full name of the user.

  • role string

    The role assigned to the user, determining their permissions and access level.

  • timezone string

    IANA timezone string for the user, defaulting to UTC.

  • locale string

    Language code for the user's preferred locale, defaulting to 'en'.

  • is_active boolean

    Indicates whether the user account is active.

UserProfile

Stores additional profile information for a user, such as their first name, last name, avatar, bio, and timezone. Maintains a one-to-one relationship with User.

  • first_name string

    The user's first name.

  • last_name string

    The user's last name.

  • avatar_url string
    nullable

    URL to the user's avatar image.

  • bio text
    nullable

    A short biography or description of the user.

  • timezone string

    IANA timezone string for the user, defaulting to UTC.

Role

Defines a role in the system, such as System Admin, Legal Ops, Company Secretary, Executive, Board Member, Finance, Compliance, or External Counsel. Roles are used to assign permissions to users.

  • name string
    unique

    The name of the role, e.g., 'System Admin', 'Legal Ops'.

  • description text
    nullable

    A description of the role and its responsibilities.

Permission

Represents a specific permission or capability that can be granted to a role, such as create, read, update, delete, approve, annotate, vote, import, or export.

  • name string
    unique

    The name of the permission, e.g., 'create', 'read', 'approve'.

  • description text
    nullable

    A description of what the permission allows.

LegalEntity

Represents a legal entity such as a company, subsidiary, or branch. Tracks ownership structures, directors, officers, shareholders, mandates, capital changes, registrations, beneficial owners, and statutory obligations.

  • name string

    The name of the legal entity.

  • jurisdiction string

    Country code (ISO 3166-1 alpha-2) where the entity is registered.

  • registration_number string
    unique

    The registration number of the entity, unique per jurisdiction.

  • status string

    The status of the entity: Active, Inactive, Pending, or Dissolved.

  • filing_deadlines json
    nullable

    JSON array of filing deadlines, each containing obligation, deadline, and responsible party.

  • capital_changes json
    nullable

    JSON array of capital changes, each containing date, type, amount, and currency.

  • registrations json
    nullable

    JSON array of registrations, each containing authority, registration number, and expiry date.

  • statutory_obligations json
    nullable

    JSON array of statutory obligations, each containing obligation, frequency, and next due date.

Contract

Represents a contract in the system, tracking its lifecycle from draft through negotiation, approval, active, expired, or terminated. Includes financial details, risk flags, approval thresholds, and related-party information.

  • title string

    The title of the contract.

  • status string

    The status of the contract: Draft, InNegotiation, PendingApproval, Active, Expired, or Terminated.

  • start_date date

    The start date of the contract.

  • end_date date
    nullable

    The end date of the contract, if applicable.

  • renewal_date date
    nullable

    The renewal date of the contract, if applicable.

  • estimated_cost decimal
    nullable

    The estimated cost of the contract.

  • actual_cost decimal
    nullable

    The actual cost incurred for the contract.

  • currency string

    ISO 4217 currency code for the contract, defaulting to USD.

  • risk_flag boolean

    Indicates whether the contract has a risk flag.

  • approval_threshold decimal

    The approval threshold for the contract, configurable per entity and role.

  • version integer

    The version number of the contract, used for optimistic concurrency.

  • related_party_ids json
    nullable

    JSON array of UUIDs referencing related LegalEntity or Person records.

  • automated_reminders json
    nullable

    JSON array of automated reminder configurations, each containing event, days_before, and channel.

LegalMatter

Represents a legal matter such as litigation, claim, investigation, regulatory request, or advisory work. Tracks budgets, actual spend, stakeholders, tasks, deadlines, invoices, evidence, correspondence, and outcomes.

  • title string

    The title of the legal matter.

  • type string

    The type of legal matter: Litigation, Claim, Investigation, RegulatoryRequest, or Advisory.

  • status string

    The status of the legal matter: Open, InProgress, OnHold, or Closed.

  • budget decimal
    nullable

    The budget allocated for the legal matter.

  • actual_spend decimal
    nullable

    The actual spend incurred for the legal matter.

  • currency string

    ISO 4217 currency code for the legal matter, defaulting to USD.

  • start_date date

    The start date of the legal matter.

  • end_date date
    nullable

    The end date of the legal matter, if applicable.

  • intake_form json
    nullable

    JSON object containing the intake form data for the legal matter.

  • evidence json
    nullable

    JSON array of evidence items, each containing document_id and description.

  • correspondence json
    nullable

    JSON array of correspondence entries, each containing date, sender, recipient, subject, and body.

  • outcome text
    nullable

    The outcome of the legal matter, if closed.

BoardMeeting

Represents a board meeting, including scheduling, agenda, minutes, agenda requests, conflicts of interest, electronic signatures, and voting. Tracks the meeting status and associated documents.

  • title string

    The title of the board meeting.

  • scheduled_start datetime

    The scheduled start time of the meeting.

  • scheduled_end datetime

    The scheduled end time of the meeting.

  • status string

    The status of the meeting: Scheduled, InProgress, Completed, or Cancelled.

  • agenda text
    nullable

    The agenda items for the meeting.

  • minutes text
    nullable

    The generated minutes of the meeting.

  • agenda_requests json
    nullable

    JSON array of agenda requests, each containing requester_id, item, and status.

  • conflicts_of_interest json
    nullable

    JSON array of conflict of interest declarations, each containing user_id, declaration, and status.

  • electronic_signatures json
    nullable

    JSON array of electronic signatures, each containing user_id, document_id, signature_data, and timestamp.

Document

Represents a document in the secure document library. Tracks metadata, versioning, retention periods, OCR text, external sharing, and AI source references.

  • title string

    The title of the document.

  • content_type string

    The MIME type of the document.

  • size_bytes integer

    The size of the document in bytes.

  • version integer

    The version number of the document, defaulting to 1.

  • retention_period_days integer

    The retention period in days, defaulting to 2555 (7 years).

  • status string

    The status of the document: Active, Archived, or RetentionExpired.

  • ocr_text text
    nullable

    The extracted text from OCR for full-text search.

  • external_sharing json
    nullable

    JSON object containing external sharing settings, including enabled, expiry, and access_token.

  • ai_source_references json
    nullable

    JSON array of AI source references, each containing document_id, page, and snippet.

  • human_review_required boolean

    Indicates whether human review is required for AI-generated content.

Folder

Represents a folder in the document library for organizing documents. Supports hierarchical folder structures.

  • name string

    The name of the folder.

ClauseLibrary

Represents a library of contract clauses that can be reused in contract drafting. Contains a collection of clauses with titles, content, and tags.

  • name string

    The name of the clause library.

  • clauses json
    nullable

    JSON array of clauses, each containing title, content, and tags.

Stakeholder

Represents a stakeholder associated with a legal matter, such as counsel or client. Links a user to a legal matter with a specific role.

  • role string

    The role of the stakeholder in the matter, e.g., 'Counsel', 'Client'.

Attendee

Represents an attendee of a board meeting, tracking their attendance status (Invited, Accepted, Declined, Attended).

  • attendance_status string

    The attendance status of the attendee: Invited, Accepted, Declined, or Attended.

ApprovalRequest

Represents an approval request for a contract or other entity, routed to an approver's queue. Tracks the status and history of the approval.

  • status string

    The status of the approval request: Pending, Approved, Rejected, or Cancelled.

  • submitted_at datetime

    The timestamp when the approval request was submitted.

  • decided_at datetime
    nullable

    The timestamp when the approval request was decided.

  • comments text
    nullable

    Comments or notes from the approver.

Task

Represents a task associated with a legal matter or board meeting, tracking its due date, status, and assignee.

  • title string

    The title of the task.

  • description text
    nullable

    A description of the task.

  • due_date date

    The due date of the task.

  • status string

    The status of the task: Open, InProgress, Completed, or Overdue.

Invoice

Represents an invoice associated with a legal matter, tracking the amount, currency, status, and payment details.

  • invoice_number string
    unique

    The invoice number.

  • amount decimal

    The amount of the invoice.

  • currency string

    ISO 4217 currency code for the invoice.

  • status string

    The status of the invoice: Pending, Paid, Overdue, or Cancelled.

  • issued_date date

    The date the invoice was issued.

  • due_date date

    The due date of the invoice.

Notification

Represents a notification sent to a user, such as reminders, approvals, or alerts. Tracks read status and delivery channels.

  • type string

    The type of notification, e.g., 'reminder', 'approval', 'alert'.

  • message text

    The message content of the notification.

  • is_read boolean

    Indicates whether the notification has been read by the user.

  • channel string

    The channel through which the notification was sent, e.g., 'email', 'in_app'.

  • sent_at datetime

    The timestamp when the notification was sent.

AuditLog

Represents an immutable audit log entry recording user actions, such as create, update, delete, view, export, and permission changes.

  • action string

    The action performed, e.g., 'create', 'update', 'delete', 'view', 'export'.

  • entity_type string

    The type of entity the action was performed on.

  • entity_id string

    The ID of the entity the action was performed on.

  • changes json
    nullable

    JSON object containing the changes made to the entity.

  • ip_address string
    nullable

    The IP address from which the action was performed.

  • user_agent string
    nullable

    The user agent of the client that performed the action.

  • performed_at datetime

    The timestamp when the action was performed.

Comment

Represents a comment on a record, such as a contract, matter, entity, board meeting, or document. Supports collaborative discussions and mentions.

  • body text

    The body of the comment.

  • created_at datetime

    The timestamp when the comment was created.

  • updated_at datetime

    The timestamp when the comment was last updated.

Workflow

Represents a configurable workflow for approvals, notifications, and task assignments. Can be applied to new contract submissions or other processes.

  • name string
    unique

    The name of the workflow.

  • description text
    nullable

    A description of the workflow.

  • steps json
    nullable

    JSON array of workflow steps, each containing step type, approver role, and conditions.

  • is_active boolean

    Indicates whether the workflow is active.

Organization

Represents an organization or workspace in the system, used for multi-tenancy and administrative settings.

  • name string
    unique

    The name of the organization.

  • settings json
    nullable

    JSON object containing organization settings, such as jurisdictions, currencies, languages, and numbering rules.

Membership

Represents a user's membership in an organization, including their role within that organization.

  • role string

    The role of the user within the organization.

Tag

Represents a tag that can be applied to documents, contracts, matters, or other entities for categorization and filtering.

  • name string
    unique

    The name of the tag.

ContractTemplate

Represents a template for creating contracts, containing predefined clauses and structure.

  • name string
    unique

    The name of the contract template.

  • content text

    The content of the contract template.

  • version integer

    The version number of the template.

DocumentVersion

Represents a version of a document in the library, tracking changes and history.

  • version_number integer

    The version number of the document.

  • file_path string

    The file path of the document version.

  • size_bytes integer

    The size of the document version in bytes.

  • created_at datetime

    The timestamp when the version was created.

Vote

Represents a vote on a board resolution, tracking the voter, their choice, and the timestamp.

  • choice string

    The choice made by the voter, e.g., 'For', 'Against', 'Abstain'.

  • voted_at datetime

    The timestamp when the vote was cast.

Resolution

Represents a board resolution that can be voted on, tracking its status and outcome.

  • title string

    The title of the resolution.

  • description text
    nullable

    A description of the resolution.

  • status string

    The status of the resolution: Draft, Open, Closed, Passed, or Failed.

  • voting_deadline datetime

    The deadline for voting on the resolution.

  • outcome string
    nullable

    The outcome of the resolution: Passed or Failed.

ExternalSharing

Represents a controlled external sharing link for a document, with an expiry date and access token.

  • access_token string
    unique

    The access token for the external sharing link.

  • expiry_date datetime

    The expiry date of the external sharing link.

  • is_active boolean

    Indicates whether the external sharing link is active.

AIAssistance

Represents an AI assistance request or output, such as summarization, extraction, or drafting, with source references and human review status.

  • type string

    The type of AI assistance: summary, extraction, draft, translation, or question.

  • input text

    The input provided to the AI.

  • output text
    nullable

    The output generated by the AI.

  • source_references json
    nullable

    JSON array of source references, each containing document_id, page, and snippet.

  • human_review_required boolean

    Indicates whether human review is required for the AI output.

  • status string

    The status of the AI assistance request: Pending, Completed, or Failed.

Currency

Represents a currency used in the system, with exchange rates for multi-currency support.

  • code string
    unique

    ISO 4217 currency code.

  • name string

    The name of the currency.

  • exchange_rate decimal

    The exchange rate relative to the base currency.

Country

Represents a country, used for jurisdiction and address information.

  • code string
    unique

    ISO 3166-1 alpha-2 country code.

  • name string

    The name of the country.

Address

Represents an address associated with a legal entity, user, or other entity.

  • street string

    The street address.

  • city string

    The city.

  • state string
    nullable

    The state or province.

  • postal_code string
    nullable

    The postal code.

  • country_code string

    ISO 3166-1 alpha-2 country code.

Relationships (49)
From Type To Description
1
one-to-one
2 A user has one profile containing additional personal information.
1
many-to-many
3 A user can have multiple roles, and a role can be assigned to multiple users.
3
many-to-many
4 A role can have multiple permissions, and a permission can be assigned to multiple roles.
5
one-to-many
5 A legal entity can have a parent entity, representing a hierarchical ownership structure.
1
one-to-many
6 A user can own multiple contracts.
5
one-to-many
6 A legal entity can be the counterparty to multiple contracts.
11
one-to-many
6 A clause library can be referenced by multiple contracts.
1
one-to-many
7 A user can own multiple legal matters.
5
one-to-many
7 A legal entity can be associated with multiple legal matters.
6
one-to-many
7 A contract can be associated with multiple legal matters.
1
one-to-many
8 A user can create multiple board meetings.
10
one-to-many
9 A folder can contain multiple documents.
1
one-to-many
9 A user can upload multiple documents.
10
one-to-many
10 A folder can have a parent folder, creating a hierarchical folder structure.
7
one-to-many
12 A legal matter can have multiple stakeholders.
1
one-to-many
12 A user can be a stakeholder in multiple legal matters.
8
one-to-many
13 A board meeting can have multiple attendees.
1
one-to-many
13 A user can attend multiple board meetings.
6
one-to-many
14 A contract can have multiple approval requests.
1
one-to-many
14 A user can submit multiple approval requests.
1
one-to-many
14 A user can be the approver for multiple approval requests.
7
one-to-many
15 A legal matter can have multiple tasks.
8
one-to-many
15 A board meeting can have multiple tasks.
1
one-to-many
15 A user can be assigned multiple tasks.
7
one-to-many
16 A legal matter can have multiple invoices.
1
one-to-many
17 A user can receive multiple notifications.
1
one-to-many
18 A user can have multiple audit log entries.
1
one-to-many
19 A user can create multiple comments.
21
one-to-many
1 An organization can have multiple members.
21
one-to-many
22 An organization can have multiple memberships.
1
one-to-many
22 A user can have multiple memberships in different organizations.
9
many-to-many
23 A document can have multiple tags, and a tag can be applied to multiple documents.
6
many-to-many
23 A contract can have multiple tags, and a tag can be applied to multiple contracts.
7
many-to-many
23 A legal matter can have multiple tags, and a tag can be applied to multiple legal matters.
24
one-to-many
6 A contract template can be used to create multiple contracts.
9
one-to-many
25 A document can have multiple versions.
1
one-to-many
25 A user can upload multiple document versions.
8
one-to-many
27 A board meeting can have multiple resolutions.
27
one-to-many
26 A resolution can have multiple votes.
1
one-to-many
26 A user can cast multiple votes.
9
one-to-many
28 A document can have multiple external sharing links.
1
one-to-many
29 A user can request multiple AI assistance outputs.
9
one-to-many
29 A document can be the source for multiple AI assistance outputs.
30
one-to-many
6 A currency can be used in multiple contracts.
30
one-to-many
7 A currency can be used in multiple legal matters.
31
one-to-many
5 A country can be the jurisdiction for multiple legal entities.
31
one-to-many
32 A country can have multiple addresses.
5
one-to-many
32 A legal entity can have multiple addresses.
1
one-to-many
32 A user can have multiple addresses.
Database tables (37)
users
  • id bigInteger
    unique
  • email string
    unique
  • full_name string
  • role string
  • timezone string
  • locale string
  • is_active boolean
  • organization_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
user_profiles
  • id bigInteger
    unique
  • first_name string
  • last_name string
  • avatar_url string
    nullable
  • bio text
    nullable
  • timezone string
  • profile_id bigInteger
    unique
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
roles
  • id bigInteger
    unique
  • name string
    unique
  • description text
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
permissions
  • id bigInteger
    unique
  • name string
    unique
  • description text
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
legal_entities
  • id bigInteger
    unique
  • name string
  • jurisdiction string
  • registration_number string
    unique
  • status string
  • filing_deadlines json
    nullable
  • capital_changes json
    nullable
  • registrations json
    nullable
  • statutory_obligations json
    nullable
  • parent_entity_id bigInteger
    nullable
  • country_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
contracts
  • id bigInteger
    unique
  • title string
  • status string
  • start_date date
  • end_date date
    nullable
  • renewal_date date
    nullable
  • estimated_cost decimal
    nullable
  • actual_cost decimal
    nullable
  • currency string
  • risk_flag boolean
  • approval_threshold decimal
  • version integer
  • related_party_ids json
    nullable
  • automated_reminders json
    nullable
  • owner_id bigInteger
    nullable
  • counterparty_id bigInteger
    nullable
  • clause_library_id bigInteger
    nullable
  • contract_template_id bigInteger
    nullable
  • currency_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
legal_matters
  • id bigInteger
    unique
  • title string
  • type string
  • status string
  • budget decimal
    nullable
  • actual_spend decimal
    nullable
  • currency string
  • start_date date
  • end_date date
    nullable
  • intake_form json
    nullable
  • evidence json
    nullable
  • correspondence json
    nullable
  • outcome text
    nullable
  • owner_id bigInteger
    nullable
  • entity_id bigInteger
    nullable
  • contract_id bigInteger
    nullable
  • currency_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
board_meetings
  • id bigInteger
    unique
  • title string
  • scheduled_start datetime
  • scheduled_end datetime
  • status string
  • agenda text
    nullable
  • minutes text
    nullable
  • agenda_requests json
    nullable
  • conflicts_of_interest json
    nullable
  • electronic_signatures json
    nullable
  • created_by_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
documents
  • id bigInteger
    unique
  • title string
  • content_type string
  • size_bytes integer
  • version integer
  • retention_period_days integer
  • status string
  • ocr_text text
    nullable
  • external_sharing json
    nullable
  • ai_source_references json
    nullable
  • human_review_required boolean
  • folder_id bigInteger
    nullable
  • uploader_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
folders
  • id bigInteger
    unique
  • name string
  • parent_folder_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
clause_libraries
  • id bigInteger
    unique
  • name string
  • clauses json
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
stakeholders
  • id bigInteger
    unique
  • role string
  • matter_id bigInteger
    nullable
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
attendees
  • id bigInteger
    unique
  • attendance_status string
  • meeting_id bigInteger
    nullable
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
approval_requests
  • id bigInteger
    unique
  • status string
  • submitted_at datetime
  • decided_at datetime
    nullable
  • comments text
    nullable
  • contract_id bigInteger
    nullable
  • submitted_by_id bigInteger
    nullable
  • approver_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
tasks
  • id bigInteger
    unique
  • title string
  • description text
    nullable
  • due_date date
  • status string
  • legal_matter_id bigInteger
    nullable
  • board_meeting_id bigInteger
    nullable
  • assignee_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
invoices
  • id bigInteger
    unique
  • invoice_number string
    unique
  • amount decimal
  • currency string
  • status string
  • issued_date date
  • due_date date
  • legal_matter_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
notifications
  • id bigInteger
    unique
  • type string
  • message text
  • is_read boolean
  • channel string
  • sent_at datetime
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
audit_logs
  • id bigInteger
    unique
  • action string
  • entity_type string
  • entity_id string
  • changes json
    nullable
  • ip_address string
    nullable
  • user_agent string
    nullable
  • performed_at datetime
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
comments
  • id bigInteger
    unique
  • body text
  • created_at datetime
  • updated_at datetime
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
workflows
  • id bigInteger
    unique
  • name string
    unique
  • description text
    nullable
  • steps json
    nullable
  • is_active boolean
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
organizations
  • id bigInteger
    unique
  • name string
    unique
  • settings json
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
memberships
  • id bigInteger
    unique
  • role string
  • organization_id bigInteger
    nullable
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
tags
  • id bigInteger
    unique
  • name string
    unique
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
contract_templates
  • id bigInteger
    unique
  • name string
    unique
  • content text
  • version integer
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
document_versions
  • id bigInteger
    unique
  • version_number integer
  • file_path string
  • size_bytes integer
  • created_at datetime
  • document_id bigInteger
    nullable
  • uploaded_by_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
votes
  • id bigInteger
    unique
  • choice string
  • voted_at datetime
  • resolution_id bigInteger
    nullable
  • voter_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
resolutions
  • id bigInteger
    unique
  • title string
  • description text
    nullable
  • status string
  • voting_deadline datetime
  • outcome string
    nullable
  • board_meeting_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
external_sharings
  • id bigInteger
    unique
  • access_token string
    unique
  • expiry_date datetime
  • is_active boolean
  • document_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
ai_assistances
  • id bigInteger
    unique
  • type string
  • input text
  • output text
    nullable
  • source_references json
    nullable
  • human_review_required boolean
  • status string
  • user_id bigInteger
    nullable
  • document_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
currencies
  • id bigInteger
    unique
  • code string
    unique
  • name string
  • exchange_rate decimal
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
countries
  • id bigInteger
    unique
  • code string
    unique
  • name string
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
addresses
  • id bigInteger
    unique
  • street string
  • city string
  • state string
    nullable
  • postal_code string
    nullable
  • country_code string
  • country_id bigInteger
    nullable
  • legal_entity_id bigInteger
    nullable
  • user_id bigInteger
    nullable
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
role_user
  • id bigInteger
    unique
  • user_id bigInteger
  • role_id bigInteger
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
permission_role
  • id bigInteger
    unique
  • role_id bigInteger
  • permission_id bigInteger
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
document_tag
  • id bigInteger
    unique
  • document_id bigInteger
  • tag_id bigInteger
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
contract_tag
  • id bigInteger
    unique
  • contract_id bigInteger
  • tag_id bigInteger
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable
legal_matter_tag
  • id bigInteger
    unique
  • legal_matter_id bigInteger
  • tag_id bigInteger
  • created_at timestamp
    nullable
  • updated_at timestamp
    nullable