A LinkedIn for Lawyers meets AI-Powered Legal Assistant
Demo β’ Features β’ Installation β’ Screenshots β’ Contributing
LexConnect is a comprehensive legal services platform built on the PERN stack (PostgreSQL, Express, React, Node.js) with Next.js that bridges the gap between legal professionals and clients while making legal services more accessible and understandable. The platform combines professional networking features similar to LinkedIn with an intelligent AI assistant that simplifies complex legal documents for non-legal professionals.
Whether you're a lawyer looking to offer pro bono services, a legal professional seeking to network with peers, or someone in need of legal assistance, LexConnect provides the tools and community to connect, collaborate, and communicate effectively.
- Upload complex legal documents and receive plain-language explanations
- AI chatbot breaks down legal jargon into understandable terms
- Perfect for clients without legal backgrounds
- LinkedIn-style profiles for lawyers
- Showcase specializations, experience, and credentials
- Build your professional legal network
- Pro Bono Services: Connect with lawyers offering free legal assistance
- Paid Consultations: Browse and book legal services
- Category-based search (Family Law, Criminal Law, Corporate Law, etc.)
- Lawyers can share insights, articles, and legal updates
- Discuss recent judgments and legal developments
- Comment and engage with the legal community
- Filter lawyers by specialization, experience, and rating
- Location-based search
- Availability and pricing filters
- Client reviews and ratings for lawyers
- Build trust through transparent feedback
- Quality assurance for legal services
- Direct communication between lawyers and clients
- Secure and private conversations
- Case discussion and consultation
- Track ongoing cases
- Manage client relationships
- Monitor pro bono commitments
Live Demo Link | Video Walkthrough
- Next.js - React framework with SSR/SSG
- React.js - UI library
- Material-UI (MUI) - Component library
- Redux/Context API - State management
- Axios - HTTP client
- Node.js - Runtime environment
- Express.js - Web framework
- PostgreSQL - Relational database
- Prisma/Sequelize - ORM
- JWT - Authentication
- Socket.io - Real-time messaging
- OpenAI API / Custom NLP Model - Document simplification
- Natural Language Processing - Legal text analysis
- Multer - File upload handling
- Cloudinary - Image storage
- bcrypt - Password hashing
- dotenv - Environment variables
Before you begin, ensure you have the following installed:
- Node.js (v16.0.0 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/yourusername/lexconnect.git cd lexconnect -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install -
Set up PostgreSQL database
# Create a new PostgreSQL database createdb lexconnect # Or using psql psql -U postgres CREATE DATABASE lexconnect; \q
-
Set up environment variables
Create a
.envfile in thebackenddirectory:# Server Configuration PORT=5000 NODE_ENV=development # Database DATABASE_URL=postgresql://username:password@localhost:5432/lexconnect # JWT Secret JWT_SECRET=your_jwt_secret_key_here JWT_EXPIRE=7d # AI API (OpenAI or your custom API) AI_API_KEY=your_openai_api_key AI_API_URL=https://api.openai.com/v1 # Cloudinary (for image uploads) CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret # Email Configuration (optional) EMAIL_SERVICE=gmail EMAIL_USER=[email protected] EMAIL_PASSWORD=your_email_password # Frontend URL CLIENT_URL=http://localhost:3000
Create a
.env.localfile in thefrontenddirectory:NEXT_PUBLIC_API_URL=http://localhost:5000/api NEXT_PUBLIC_SOCKET_URL=http://localhost:5000
-
Run database migrations
cd backend # If using Prisma npx prisma migrate dev npx prisma generate # If using Sequelize npx sequelize-cli db:migrate
-
Run the application
Backend:
cd backend npm run devFrontend (Next.js):
cd frontend npm run dev -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000LOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret
EMAIL_SERVICE=gmail EMAIL_USER=[email protected] EMAIL_PASSWORD=your_email_password
CLIENT_URL=http://localhost:3000
Create a `.env` file in the `frontend` directory: ```env REACT_APP_API_URL=http://localhost:5000/api REACT_APP_SOCKET_URL=http://localhost:5000 -
Start MongoDB
# For macOS/Linux mongod # For Windows # Start MongoDB service from Services or run: "C:\Program Files\MongoDB\Server\{version}\bin\mongod.exe"
-
Run the application
Backend:
cd backend npm run devFrontend:
cd frontend npm start -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
lexconnect/
βββ backend/
β βββ config/
β β βββ db.js
β βββ controllers/
β β βββ authController.js
β β βββ lawyerController.js
β β βββ caseController.js
β β βββ blogController.js
β β βββ aiController.js
β βββ models/
β β βββ User.js
β β βββ Lawyer.js
β β βββ Case.js
β β βββ Blog.js
β β βββ Message.js
β βββ routes/
β β βββ auth.js
β β βββ lawyers.js
β β βββ cases.js
β β βββ blogs.js
β β βββ ai.js
β βββ middleware/
β β βββ auth.js
β β βββ upload.js
β βββ utils/
β β βββ aiService.js
β βββ server.js
β
βββ frontend/
β βββ public/
β βββ src/
β β βββ components/
β β β βββ Auth/
β β β βββ Lawyer/
β β β βββ Blog/
β β β βββ AI/
β β β βββ Common/
β β βββ pages/
β β β βββ Home.jsx
β β β βββ LawyerProfile.jsx
β β β βββ Marketplace.jsx
β β β βββ Blog.jsx
β β β βββ Dashboard.jsx
β β βββ context/
β β βββ services/
β β βββ utils/
β β βββ App.js
β β βββ index.js
β βββ package.json
β
βββ assets/
βββ (screenshots and images)
- Create Profile: Sign up and complete your professional profile
- List Services: Add pro bono or paid service offerings
- Write Blogs: Share your legal expertise with the community
- Connect: Network with other legal professionals
- Manage Cases: Track and manage client cases through the dashboard
- Search Lawyers: Find lawyers by specialization and location
- Use AI Assistant: Upload legal documents for simplified explanations
- Request Services: Connect with lawyers for pro bono or paid assistance
- Read Blogs: Stay informed about legal developments
- Leave Reviews: Rate and review your experience with lawyers
This project was awarded 1st Place at LexHacks 1.0, recognizing its innovation in:
- Making legal services more accessible
- Democratizing legal knowledge through AI
- Building a supportive legal community
- Bridging the gap between legal professionals and those in need
We welcome contributions to LexConnect! Here's how you can help:
- Fork the repository
- Create your feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow the existing code style
- Write clear commit messages
- Update documentation as needed
- Add tests for new features
- Ensure all tests pass before submitting PR
Found a bug? Please open an issue with:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Your environment details
- Mobile application (React Native)
- Video consultation feature
- Multi-language support
- Advanced AI features (case prediction, legal research)
- Integration with legal databases
- Payment gateway integration
- Appointment scheduling system
- Document template library
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @yourusername
- LinkedIn: Your LinkedIn
- Email: [email protected]
- Thanks to LexHacks 1.0 organizers and judges
- OpenAI for AI capabilities
- The open-source community
- All contributors and testers
For support, email [email protected] or join our Slack channel.
Made with β€οΈ and βοΈ by the LexConnect Team
β Star this repo if you find it helpful!




