Skip to content

ARRY7686/Intelligent-Contract-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Contract Intelligence Platform

A modern, AI-powered contract analysis platform. Upload PDF contracts and automatically extract key information with confidence scoring.

Features

🎨 Modern Frontend

  • Responsive Design: Works perfectly on desktop, tablet, and mobile
  • Real-time Updates: Live status updates and progress tracking
  • Interactive Elements: Hover effects, micro-interactions, and visual feedback

πŸ€– AI-Powered Analysis

  • Automatic Extraction: Extract parties, financial details, payment terms
  • Confidence Scoring: AI confidence scores for all extracted data
  • Gap Analysis: Identify missing critical information
  • Smart Recommendations: Actionable insights and improvements

πŸ“Š Dashboard & Analytics

  • Real-time Statistics: Live contract processing metrics
  • Status Tracking: Monitor processing status in real-time
  • Search & Filter: Advanced search and filtering capabilities
  • Bulk Operations: Download, delete, and manage contracts

Tech Stack

Frontend

  • React 18 with TypeScript
  • Framer Motion for animations
  • Tailwind CSS for styling
  • Lucide React for icons
  • React Router for navigation
  • React Dropzone for file uploads

Backend

  • FastAPI with Python
  • MongoDB for data storage
  • Pydantic for data validation
  • Uvicorn for ASGI server

Infrastructure

  • Docker for containerization
  • Docker Compose for orchestration
  • Nginx for reverse proxy
  • MongoDB for database

Quick Start with Docker

Production Setup

  1. Clone the repository

    git clone <repository-url>
    cd contracts-intel
  2. Start the application

    docker-compose up -d
  3. Access the application

Development Setup

  1. Start development environment

    docker-compose -f docker-compose.dev.yml up -d
  2. Access development environment

Docker Commands

Production

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop all services
docker-compose down

# Rebuild and start
docker-compose up -d --build

# Clean up volumes
docker-compose down -v

Development

# Start development environment
docker-compose -f docker-compose.dev.yml up -d

# View logs
docker-compose -f docker-compose.dev.yml logs -f

# Stop development environment
docker-compose -f docker-compose.dev.yml down

# Rebuild development environment
docker-compose -f docker-compose.dev.yml up -d --build

Individual Services

# Start only frontend
docker-compose up frontend

# Start only backend
docker-compose up backend

# Start only database
docker-compose up mongodb

API Endpoints

Contract Management

  • POST /api/contracts/upload - Upload a contract
  • GET /api/contracts/ - List all contracts
  • GET /api/contracts/{contract_id} - Get contract details
  • GET /api/contracts/{contract_id}/data - Get extracted data
  • DELETE /api/contracts/{contract_id} - Delete contract
  • GET /api/contracts/{contract_id}/download - Download original file

Statistics

  • GET /api/statistics/ - Get processing statistics

Environment Variables

Frontend

  • REACT_APP_API_URL - Backend API URL (default: http://localhost:8000)
  • NODE_ENV - Environment (development/production)

Backend

  • MONGODB_URL - MongoDB connection string
  • UPLOAD_DIR - Upload directory path
  • MAX_FILE_SIZE - Maximum file size in bytes

Database

  • MONGO_INITDB_ROOT_USERNAME - MongoDB root username
  • MONGO_INITDB_ROOT_PASSWORD - MongoDB root password

File Structure

contracts-intel/
β”œβ”€β”€ frontend/                 # React frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   β”œβ”€β”€ services/       # API services
β”‚   β”‚   └── types/          # TypeScript type definitions
β”‚   β”œβ”€β”€ Dockerfile          # Production Dockerfile
β”‚   β”œβ”€β”€ Dockerfile.dev      # Development Dockerfile
β”‚   └── nginx.conf          # Nginx configuration
β”œβ”€β”€ backend/                 # FastAPI backend application
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/            # API routes
β”‚   β”‚   β”œβ”€β”€ core/           # Core configuration
β”‚   β”‚   β”œβ”€β”€ models/         # Data models
β”‚   β”‚   └── services/       # Business logic
β”‚   └── Dockerfile          # Backend Dockerfile
β”œβ”€β”€ docker-compose.yml      # Production Docker Compose
β”œβ”€β”€ docker-compose.dev.yml  # Development Docker Compose
└── README.md              # This file

Development

Frontend Development

The frontend uses modern React patterns with:

  • Functional Components with hooks
  • TypeScript for type safety
  • Tailwind CSS for styling
  • Custom hooks for reusable logic

Backend Development

The backend uses FastAPI with:

  • Async/await patterns
  • Pydantic models for validation
  • MongoDB with motor for async operations
  • Structured logging and error handling

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For support and questions, please open an issue in the repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •