OpenCLM Documentation

Complete guide to deploying, configuring, and using OpenCLM for contract lifecycle management.

Version: 1.0.0 | Last Updated: January 2025 | View on GitHub

Installation

OpenCLM can be deployed in multiple ways depending on your infrastructure:

Quick Install with Docker

docker pull openclm/openclm:latest
docker run -p 3000:3000 -v openclm-data:/data openclm/openclm

Install from Source

# Clone the repository
git clone https://github.com/nxglabs/openclm.git
cd openclm

# Install dependencies
npm install

# Configure environment
cp .env.example .env
nano .env

# Build and start
npm run build
npm start

System Requirements

  • Node.js: v18.0.0 or higher
  • RAM: Minimum 2GB, recommended 4GB+
  • Storage: 10GB+ for application and data
  • Database: PostgreSQL 13+ or MongoDB 5+

Quick Start Guide

1

Access the Application

Navigate to http://localhost:3000 in your browser

2

Configure Authentication

Set up Keycloak or another OIDC provider for user authentication

KEYCLOAK_URL=https://your-keycloak.com
KEYCLOAK_REALM=openclm
KEYCLOAK_CLIENT_ID=openclm-client
3

Create Your First Contract

Navigate to the Contracts tab and click "Create Contract" to get started

Configuration

OpenCLM uses environment variables for configuration:

Environment Variables

Variable Description Default
PORT Application port 3000
DATABASE_URL Database connection string -
KEYCLOAK_URL Keycloak server URL -
KEYCLOAK_REALM Keycloak realm name -
STORAGE_PATH Document storage location ./data

Contract Management

OpenCLM provides comprehensive contract management capabilities:

Creating Contracts

  1. Navigate to the Contracts section
  2. Click "Create Contract"
  3. Choose a template or start with a blank document
  4. Use the rich text editor to compose your contract
  5. Add metadata (parties, dates, values)
  6. Save as draft or submit for approval

Contract Templates

Templates speed up contract creation with pre-defined structures and clauses:

  • Service agreements
  • Non-disclosure agreements (NDAs)
  • Employment contracts
  • Vendor agreements
  • Custom templates

Version Control

Every change to a contract is tracked with full version history, allowing you to:

  • View all previous versions
  • Compare versions side-by-side
  • Restore previous versions
  • Track who made changes and when

Approval Workflows

Configure multi-stage approval processes for different contract types:

Creating a Workflow

# Example workflow configuration
{
  "name": "Standard Contract Approval",
  "stages": [
    {
      "name": "Legal Review",
      "approvers": ["legal-team"],
      "required": true
    },
    {
      "name": "Finance Approval",
      "approvers": ["finance-director"],
      "required": true,
      "conditions": { "value": { "gt": 10000 } }
    },
    {
      "name": "Executive Sign-off",
      "approvers": ["ceo", "cfo"],
      "required": 1
    }
  ]
}

Workflow Features

  • Sequential and parallel approval stages
  • Conditional routing based on contract attributes
  • Automated notifications and reminders
  • SLA tracking and escalations
  • Complete audit trail

Electronic Signatures

Built-in e-signature capabilities for contract execution:

Sending for Signature

  1. Complete contract approval workflow
  2. Navigate to Signatures section
  3. Create new signature request
  4. Add signers and signing order
  5. Configure authentication options
  6. Send signature request

Authentication Options

  • Email Verification: Signers receive secure link via email
  • SMS Verification: Additional security with SMS OTP
  • Knowledge-Based: Identity verification questions

Legal Compliance

OpenCLM e-signatures include:

  • Tamper-evident seals
  • Timestamping with trusted authorities
  • IP address logging
  • Full audit trail for legal defensibility
  • Certificate of completion

Analytics & Reporting

Comprehensive insights into your contract portfolio:

Available Metrics

  • Contract volume and value trends
  • Approval cycle times
  • Workflow bottleneck analysis
  • Compliance scores
  • Deadline tracking
  • User performance metrics

Custom Reports

Create custom reports with flexible filters and date ranges. Export reports in multiple formats:

  • PDF for distribution
  • Excel for further analysis
  • CSV for data integration

API Reference

OpenCLM provides a RESTful API for integration with other systems:

Authentication

POST /api/auth/token
Content-Type: application/json

{
  "client_id": "your-client-id",
  "client_secret": "your-client-secret"
}

Contract Endpoints

Method Endpoint Description
GET /api/contracts List all contracts
POST /api/contracts Create new contract
GET /api/contracts/:id Get contract details
PUT /api/contracts/:id Update contract
DELETE /api/contracts/:id Delete contract

Workflow Endpoints

# Initiate workflow
POST /api/workflows
{
  "contractId": "contract-123",
  "templateId": "template-456"
}

# Approve/reject stage
POST /api/workflows/:id/actions
{
  "action": "approve",
  "comments": "Approved with minor revisions",
  "stage": 1
}

Architecture

OpenCLM follows a modern, scalable architecture:

Technology Stack

  • Frontend: React 19, TypeScript, Tailwind CSS
  • State Management: React Hooks, Context API
  • UI Components: shadcn/ui, Radix UI
  • Authentication: Keycloak OIDC
  • Storage: Browser localStorage (demo), PostgreSQL (production)
  • Build Tool: Vite

Key Design Patterns

  • Component-based architecture
  • Separation of concerns
  • API-first design
  • Progressive enhancement
  • Responsive design patterns

Contributing

OpenCLM is an open source project and we welcome contributions!

How to Contribute

  1. Fork the repository on GitHub
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Setup

# Install dependencies
npm install

# Start development server
npm run dev

# Run tests
npm test

# Build for production
npm run build

Code Standards

  • Follow TypeScript best practices
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Follow the existing code style