Justice Powered by Intelligence
A sophisticated AI-powered legal case management platform featuring multi-agent orchestration, intelligent document processing, and seamless client communication.
- Overview
- Key Features
- Tech Stack
- Quick Start
- Environment Setup
- Development
- Testing
- Deployment
- Contributing
- License
PowerLegal Pro is a cutting edge legal case management system that combines the power of artificial intelligence with proven legal workflows. Built with Next.js and powered by OpenAI's advanced language models, this platform streamlines every aspect of legal practice management—from client communication to legal research, document processing to task automation.
- Law Firms seeking to automate routine tasks
- Solo Practitioners needing intelligent assistance
- Legal Departments requiring scalable case management
- Personal Injury Attorneys managing complex documentation
- 🤖 Multi-Agent AI System - Four specialized AI agents (Records Wrangler, Communication Guru, Legal Researcher, Scheduler) working in concert to automate legal workflows
- 📧 Intelligent Email Management - Gmail integration with automatic scanning, smart drafting, and case matching
- 📁 Document Intelligence - AI-powered document processing, PDF generation, and audio transcription
- 📊 Smart Case Management - Visual task boards, case timelines, and automated task detection
💡 See MULTI_AGENT_SYSTEM.md for detailed information about the AI agent architecture
Frontend: Next.js 16 • React 19 • TypeScript • Tailwind CSS • shadcn/ui
Backend: Supabase (PostgreSQL) • Next.js API Routes • OpenAI API • Google APIs
AI: GPT-4 Language Models • Custom Multi-Agent Orchestration • Whisper Transcription
- Node.js 18.17 or later
- npm or yarn or pnpm
- Supabase account
- OpenAI API key
- Google Cloud project (for Gmail integration)
- Clone the repository
git clone https://github.com/Kavipatel0/KnightHacks.git
cd KnigtHacks/my-app- Install dependencies
npm install
# or
yarn install
# or
pnpm install- Set up environment variables
Create a .env.local file in the my-app directory (see Environment Setup below)
- Run the development server
npm run dev
# or
yarn dev
# or
pnpm dev- Open your browser
Navigate to http://localhost:3000
Create a .env file in the my-app directory with the following variables:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=http://localhost:3000/api/auth/callback
GOOGLE_REFRESH_TOKEN=
NEXT_PUBLIC_OPENAI_API_KEY=
OPENAI_API_KEY=
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=- Sign up at OpenAI Platform
- Navigate to API Keys section
- Click Create new secret key
- Copy and paste into your
.env.local
- Create a project at Supabase
- Go to Project Settings → API
- Copy the Project URL and anon/public key
- Paste into
.env.local
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Gmail API and Google+ API
- Go to Credentials → Create Credentials → OAuth Client ID
- Set application type to Web application
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback - Copy Client ID and Client Secret
- The refresh token is generated automatically after the first OAuth flow
- Leave this blank initially; it will be populated after first authentication
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start# Test email sending
node test-email-sending.js
# Test communication agent
node test-communication-guru.js
# Test legal researcher
node test-legal-researcher.js
# Test multi-agent system
node test-multi-agent.js- Push your code to GitHub
- Import project in Vercel
- Add environment variables in Vercel dashboard
- Deploy!
Remember to update these in production:
NEXT_PUBLIC_BASE_URL- Your production domainGOOGLE_REDIRECT_URI- Production OAuth callback URL
This project is licensed under the MIT License - see the LICENSE file for details.
- MULTI_AGENT_SYSTEM.md - Detailed multi-agent architecture and workflows
- SETUP_GUIDE.md - Complete setup instructions with troubleshooting
- SHOWCASE_GUIDE.md - Feature demonstrations and examples
Making justice accessible through technology ⚖️