A full-stack MERN web platform for connecting clients with lawyers, featuring real-time chat, video meetings, case management, and an admin dashboard.
| Layer | Technology |
|---|---|
| Frontend | React 18 + TypeScript + Vite |
| Backend | Node.js + Express + TypeScript |
| Database | MongoDB Atlas (Mongoose) |
| Real-time | Socket.io |
| Auth | JWT |
| Styling | Vanilla CSS (custom design system) |
- Authentication — Register/Login for Users, Lawyers, and Admins
- Lawyer Listings — Browse, filter, and view lawyer profiles by specialization
- Real-Time Chat — Socket.io based chat between clients and lawyers, persisted in MongoDB
- Video Meetings — Schedule and join video consultations
- Case Management — Lawyers can add, track, and publish cases
- Contact System — Clients can send contact form messages to lawyers
- Admin Dashboard — Manage users, lawyers, meetings, and platform activity
- Legal News Feed — Aggregated legal news (requires NewsAPI key)
- AI Chatbot — Rule-based legal assistant widget
lawFirmWebsite/
├── backend/ # Express + TypeScript API
│ ├── src/
│ │ ├── controllers/
│ │ ├── models/
│ │ ├── routes/
│ │ ├── middleware/
│ │ └── index.ts # Server + Socket.io entry
│ └── .env.example
└── frontend/ # React + Vite app
└── src/
├── pages/
├── components/
├── context/
└── services/
- Node.js 18+
- MongoDB Atlas account
git clone https://github.com/ShubhamKumar6299/lexFirma-aCompleteLawerWebsite.git
cd lexFirma-aCompleteLawerWebsitecd backend
npm install
cp .env.example .env
# Fill in your .env values (see below)
npm run devcd frontend
npm install
# Create frontend/.env
echo "VITE_API_URL=http://localhost:5001/api" > .env
npm run devMONGO_URI=mongodb+srv://<user>:<password>@cluster0.mongodb.net/lawfirm
JWT_SECRET=your_jwt_secret
PORT=5001
CLIENT_URL=http://localhost:5173
NEWS_API_KEY=your_newsapi_key # optional
EMAIL_USER=your_email@gmail.com # optional, for email features
EMAIL_PASS=your_app_password # optionalVITE_API_URL=http://localhost:5001/apiTo populate the database with test users, lawyers, and cases:
cd backend
npx ts-node src/seed.tsTest Credentials:
| Role | Password | |
|---|---|---|
| Admin | dsashubham321@gmail.com |
Admin@123 |
| Lawyer | satyaanandsharma9534@gmail.com |
Lawyer@123 |
| Client | ashutosh887789@gmail.com |
User@123 |
| Prefix | Description |
|---|---|
/api/auth |
Register, Login |
/api/lawyers |
Lawyer profiles and listings |
/api/cases |
Case management |
/api/chat |
Chat history and room management |
/api/meetings |
Schedule and manage meetings |
/api/messages |
Contact form inbox |
/api/admin |
Admin-only operations |
| Event | Direction | Description |
|---|---|---|
join_room |
Client → Server | Join a chat room |
send_message |
Client → Server | Send a message (saved to DB) |
receive_message |
Server → Client | Broadcast message to room |
Built by Shubham Kumar
MIT