A modern, AI-powered contract analysis platform. Upload PDF contracts and automatically extract key information with confidence scoring.
- 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
- 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
- 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
- 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
- FastAPI with Python
- MongoDB for data storage
- Pydantic for data validation
- Uvicorn for ASGI server
- Docker for containerization
- Docker Compose for orchestration
- Nginx for reverse proxy
- MongoDB for database
-
Clone the repository
git clone <repository-url> cd contracts-intel
-
Start the application
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
-
Start development environment
docker-compose -f docker-compose.dev.yml up -d
-
Access development environment
- Frontend: http://localhost:3000 (with hot reloading)
- Backend API: http://localhost:8000 (with auto-reload)
# 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# 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# Start only frontend
docker-compose up frontend
# Start only backend
docker-compose up backend
# Start only database
docker-compose up mongodbPOST /api/contracts/upload- Upload a contractGET /api/contracts/- List all contractsGET /api/contracts/{contract_id}- Get contract detailsGET /api/contracts/{contract_id}/data- Get extracted dataDELETE /api/contracts/{contract_id}- Delete contractGET /api/contracts/{contract_id}/download- Download original file
GET /api/statistics/- Get processing statistics
REACT_APP_API_URL- Backend API URL (default: http://localhost:8000)NODE_ENV- Environment (development/production)
MONGODB_URL- MongoDB connection stringUPLOAD_DIR- Upload directory pathMAX_FILE_SIZE- Maximum file size in bytes
MONGO_INITDB_ROOT_USERNAME- MongoDB root usernameMONGO_INITDB_ROOT_PASSWORD- MongoDB root password
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
The frontend uses modern React patterns with:
- Functional Components with hooks
- TypeScript for type safety
- Tailwind CSS for styling
- Custom hooks for reusable logic
The backend uses FastAPI with:
- Async/await patterns
- Pydantic models for validation
- MongoDB with motor for async operations
- Structured logging and error handling
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
For support and questions, please open an issue in the repository.