LawBotics v2 is an AI-powered legal contract analysis platform that combines machine learning with modern web technologies to automate legal document review and clause extraction.
See the codeA sophisticated AI-powered legal contract analysis platform built with Next.js and advanced machine learning models. This platform leverages the Contract Understanding Atticus Dataset (CUAD) to provide intelligent contract review and clause extraction capabilities.
LawBotics v2 is an advanced legal technology platform that combines artificial intelligence with legal expertise to streamline contract review processes. The platform utilizes fine-tuned language models trained on the CUAD dataset to identify and extract key contract clauses, helping legal professionals save time and reduce errors in contract analysis.
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Web Frontend โ โ AI Processing โ โ Data Storage โ
โ (Next.js 15) โโโโโบโ (Python/ML) โโโโโบโ (Convex DB) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Authentication โ โ Model Training โ โ Contract Storageโ
โ (Clerk) โ โ (Jupyter) โ โ (Files) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Clone the repository
git clone https://github.com/hasnaintypes/lawbotics-v2.git
cd lawbotics-v2
Install dependencies
# Install web UI dependencies
cd apps/web-ui
npm install
# Return to root
cd ../..
Set up environment variables
# Copy environment template
cp apps/web-ui/.env.example apps/web-ui/.env.local
Configure environment variables
Edit apps/web-ui/.env.local with your keys:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Convex Database
NEXT_PUBLIC_CONVEX_URL=your_convex_url
# Google AI
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_key
# Other services
SVIX_SECRET=your_svix_secret
Start the development server
cd apps/web-ui
npm run dev
Access the application Open http://localhost:3000 in your browser
The project includes comprehensive AI model training capabilities using the CUAD dataset.
Navigate to AI model directory
cd ai-model
Open Jupyter Notebook
jupyter notebook Fine_tuning_code.ipynb
Follow the training steps:
lawbotics-v2/
โโโ ๐ ai-model/ # AI/ML model training and data
โ โโโ ๐ Fine_tuning_code.ipynb # Jupyter notebook for model training
โ โโโ ๐ data-set/ # CUAD dataset and training data
โ โโโ ๐ CUAD_v1.json # Main dataset file
โ โโโ ๐ master_clauses.csv # Clause categorization data
โ โโโ ๐ full_contract_pdf/ # Original contract PDFs
โ โโโ ๐ full_contract_txt/ # Text versions of contracts
โ โโโ ๐ label_group_xlsx/ # Excel files with labeled data
โโโ ๐ apps/ # Application modules
โ โโโ ๐ dashboard/ # Admin dashboard (planned)
โ โโโ ๐ web-ui/ # Main web application
โ โโโ ๐ package.json # Dependencies and scripts
โ โโโ ๐ next.config.ts # Next.js configuration
โ โโโ ๐ tailwind.config.js # Tailwind CSS configuration
โ โโโ ๐ middleware.ts # Authentication middleware
โ โโโ ๐ src/ # Source code
โ โ โโโ ๐ app/ # Next.js app router pages
โ โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ๐ lib/ # Utility functions and configs
โ โ โโโ ๐ hooks/ # Custom React hooks
โ โ โโโ ๐ services/ # API and external service integrations
โ โ โโโ ๐ store/ # State management (Zustand)
โ โ โโโ ๐ convex/ # Convex database functions
โ โโโ ๐ public/ # Static assets
โโโ ๐ docs/ # Documentation (planned)
# Development server
npm run dev
# Production build
npm run build
# Start production server
npm run start
# Lint code
npm run lint
POST /api/auth/signin - User sign inPOST /api/auth/signup - User registrationPOST /api/auth/signout - User sign outPOST /api/contracts/upload - Upload contract for analysisGET /api/contracts/:id - Retrieve contract analysisPOST /api/contracts/analyze - Perform AI analysisGET /api/contracts/history - User's contract historyPOST /api/ai/extract-clauses - Extract clauses from contractPOST /api/ai/classify - Classify contract clausesGET /api/ai/models - Available AI modelsWe welcome contributions to LawBotics v2! Please follow these guidelines:
git checkout -b feature/your-feature-namegit commit -m 'Add some feature'git push origin feature/your-feature-namePlease use the GitHub issue tracker to report bugs or request features. Include:
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
Built with โค๏ธ by the LawBotics Team
Empowering legal professionals with AI-driven contract analysis
LawBotics v2 is an AI-powered legal contract analysis platform that combines machine learning with modern web technologies to automate legal document review and clause extraction.
See the codeA sophisticated AI-powered legal contract analysis platform built with Next.js and advanced machine learning models. This platform leverages the Contract Understanding Atticus Dataset (CUAD) to provide intelligent contract review and clause extraction capabilities.
LawBotics v2 is an advanced legal technology platform that combines artificial intelligence with legal expertise to streamline contract review processes. The platform utilizes fine-tuned language models trained on the CUAD dataset to identify and extract key contract clauses, helping legal professionals save time and reduce errors in contract analysis.
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Web Frontend โ โ AI Processing โ โ Data Storage โ
โ (Next.js 15) โโโโโบโ (Python/ML) โโโโโบโ (Convex DB) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Authentication โ โ Model Training โ โ Contract Storageโ
โ (Clerk) โ โ (Jupyter) โ โ (Files) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Clone the repository
git clone https://github.com/hasnaintypes/lawbotics-v2.git
cd lawbotics-v2
Install dependencies
# Install web UI dependencies
cd apps/web-ui
npm install
# Return to root
cd ../..
Set up environment variables
# Copy environment template
cp apps/web-ui/.env.example apps/web-ui/.env.local
Configure environment variables
Edit apps/web-ui/.env.local with your keys:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Convex Database
NEXT_PUBLIC_CONVEX_URL=your_convex_url
# Google AI
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_key
# Other services
SVIX_SECRET=your_svix_secret
Start the development server
cd apps/web-ui
npm run dev
Access the application Open http://localhost:3000 in your browser
The project includes comprehensive AI model training capabilities using the CUAD dataset.
Navigate to AI model directory
cd ai-model
Open Jupyter Notebook
jupyter notebook Fine_tuning_code.ipynb
Follow the training steps:
lawbotics-v2/
โโโ ๐ ai-model/ # AI/ML model training and data
โ โโโ ๐ Fine_tuning_code.ipynb # Jupyter notebook for model training
โ โโโ ๐ data-set/ # CUAD dataset and training data
โ โโโ ๐ CUAD_v1.json # Main dataset file
โ โโโ ๐ master_clauses.csv # Clause categorization data
โ โโโ ๐ full_contract_pdf/ # Original contract PDFs
โ โโโ ๐ full_contract_txt/ # Text versions of contracts
โ โโโ ๐ label_group_xlsx/ # Excel files with labeled data
โโโ ๐ apps/ # Application modules
โ โโโ ๐ dashboard/ # Admin dashboard (planned)
โ โโโ ๐ web-ui/ # Main web application
โ โโโ ๐ package.json # Dependencies and scripts
โ โโโ ๐ next.config.ts # Next.js configuration
โ โโโ ๐ tailwind.config.js # Tailwind CSS configuration
โ โโโ ๐ middleware.ts # Authentication middleware
โ โโโ ๐ src/ # Source code
โ โ โโโ ๐ app/ # Next.js app router pages
โ โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ๐ lib/ # Utility functions and configs
โ โ โโโ ๐ hooks/ # Custom React hooks
โ โ โโโ ๐ services/ # API and external service integrations
โ โ โโโ ๐ store/ # State management (Zustand)
โ โ โโโ ๐ convex/ # Convex database functions
โ โโโ ๐ public/ # Static assets
โโโ ๐ docs/ # Documentation (planned)
# Development server
npm run dev
# Production build
npm run build
# Start production server
npm run start
# Lint code
npm run lint
POST /api/auth/signin - User sign inPOST /api/auth/signup - User registrationPOST /api/auth/signout - User sign outPOST /api/contracts/upload - Upload contract for analysisGET /api/contracts/:id - Retrieve contract analysisPOST /api/contracts/analyze - Perform AI analysisGET /api/contracts/history - User's contract historyPOST /api/ai/extract-clauses - Extract clauses from contractPOST /api/ai/classify - Classify contract clausesGET /api/ai/models - Available AI modelsWe welcome contributions to LawBotics v2! Please follow these guidelines:
git checkout -b feature/your-feature-namegit commit -m 'Add some feature'git push origin feature/your-feature-namePlease use the GitHub issue tracker to report bugs or request features. Include:
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
Built with โค๏ธ by the LawBotics Team
Empowering legal professionals with AI-driven contract analysis