DraftResolve is a powerful tool for comparing, merging, and resolving conflicts in document drafts and versions. Whether you're a writer managing multiple revisions, a developer handling documentation, or a team collaborating on shared documents, DraftResolve simplifies the process of maintaining document consistency.
- Smart Conflict Detection: Automatically identify conflicts and differences between document versions
- Inconsistency Resolution: Detect and fix style, terminology, and formatting inconsistencies within documents
- Multiple Format Support: Works with Markdown, HTML, plaintext, and Word documents
- Version Merging: Intelligently merge changes from multiple document versions
- Command-line Interface: Easy to use in scripts and automation workflows
- Python API: Integrate with your existing Python applications
- Web Interface: Browser-based UI for visual comparison and conflict resolution
DraftResolve consists of three main components:
The frontend provides a user-friendly web interface for:
- Uploading and comparing documents
- Visualizing differences between versions
- Interactive conflict resolution
- Document history management
- User authentication and project management
Technologies: React, TypeScript, Tailwind CSS
The backend powers the core functionality:
- Document parsing and standardization
- Intelligent diff algorithms
- Content analysis and inconsistency detection
- Resolution strategies
- Document storage and retrieval
Technologies: Python, FastAPI, SQLAlchemy
The REST API enables integration with other tools and services:
- Document upload and retrieval
- Comparison operations
- Conflict resolution
- Batch processing
- Authentication and access control
pip install draftresolve# Clone the repository
git clone https://github.com/yourusername/draftresolve.git
cd draftresolve
# Install dependencies
pip install -e ".[dev]"# Compare two versions of a document
draftresolve compare old.md new.md
# Check a document for internal inconsistencies
draftresolve check document.md
# Resolve conflicts and output a merged document
draftresolve resolve version1.md version2.md --output merged.mdfrom draftresolve import Resolver
# Initialize resolver
resolver = Resolver()
# Compare documents
conflicts = resolver.compare("old_version.md", "new_version.md")
# Print conflicts
for conflict in conflicts:
print(f"Conflict at line {conflict.line_number}: {conflict.description}")
print(f"Version 1: {conflict.version1_text}")
print(f"Version 2: {conflict.version2_text}")
print(f"Suggested resolution: {conflict.suggested_resolution}")# Start the web server
draftresolve server --port 8000Then navigate to http://localhost:8000 in your browser.
The REST API provides the following main endpoints:
POST /api/documents- Upload a documentGET /api/documents/{doc_id}- Retrieve a documentPOST /api/comparison- Compare two documentsGET /api/comparison/{comparison_id}- Get comparison resultsPOST /api/resolve- Resolve conflicts between documentsGET /api/projects- List projects (authenticated)POST /api/projects- Create a new project (authenticated)
For full API documentation, start the server and navigate to http://localhost:8000/docs.
DraftResolve can be configured via:
- Command-line arguments
- Environment variables
- Configuration file
Example configuration file (draftresolve.yaml):
storage:
type: local
path: ./documents
server:
host: 0.0.0.0
port: 8000
workers: 4
auth:
enabled: true
jwt_secret: your-secret-key
token_expiry: 86400 # 24 hours
resolution:
default_strategy: smart
conflict_threshold: 0.7Contributions are welcome! Please check out our Contributing Guide for details on how to get started.
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest