An AI-powered legal case management system designed for modern law firms to streamline case management, enhance productivity, and provide AI-assisted legal insights.
Our application combines AI-powered legal research with efficient scheduling and document management, making legal tasks more accessible and efficient.
- Firm Management: Admin case allocation, transfers, and statistical dashboards
- Schedule Management: Automated hearing scheduling with integrated management features
- Comprehensive Case Information: Court details, dates, legal sections, parties
- Document Management: Chronological document uploads with timestamps
- History & Notes: Complete historical hearing records and note-making
- Legal Research: Relevant legal articles and case law suggestions
- Document Generation: Create standard legal drafts (adjournments, petitions)
- 24/7 Availability: Instant access to legal information and assistance
- User Management: Create, update, and remove lawyer accounts
- Case Management: Track unallocated cases, view case distribution statistics
- Bulk Operations: Transfer multiple cases between advocates
- Case Overview: View, edit, reassign and manage all cases
- Case Dashboard: View assigned cases with hearing dates, client details
- Progress Tracking: Update case progress, add notes, reschedule hearings
- Document Library: Upload and access case-related documents
- AI Assistant: Access AI-driven retrieval for similar cases and legal articles
| Frontend | Backend | Database | Auth & Security | Testing |
|---|---|---|---|---|
| Next.js 15 | Node.js | PostgreSQL | NextAuth.js | Pytest |
| React | Next.js API Routes | Prisma ORM | CSRF Protection | Playwright |
| TypeScript | Server Actions | JSON | JWT | Requests |
| Tailwind CSS | Bcrypt |
- Node.js v18+
- PostgreSQL database
- Python 3.8+ (for testing)
- npm or pnpm
- Clone the repository
git clone https://github.com/your-username/advocate-diary-app.git
cd advocate-diary-app- Install dependencies
npm install
# or
pnpm install- Configure environment variables
cp .env.example .env
# Edit .env file with your database and authentication settings- Set up the database
npx prisma migrate dev
npx prisma db seed
# (quick and handy way to reset)
npx prisma migrate reset- Start the development server
npm run dev
# or
pnpm dev-
Access the application
The app will be available at http://localhost:3000
Create a Python virtual environment for testing:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install pytest requests playwright pytest-playwright
playwright install chromium # Setup playwright for e2e testingThe application includes several test suites:
# Test user operations (create/delete users)
python -m pytest tests/test_user_operations.py
# Test case operations (create/delete cases)
python -m pytest tests/test_case_operations.py
# Test authentication API
python -m pytest tests/test_api_login.py# Auth unit tests
python -m pytest tests/test_auth_unit.py
# Form validation tests
python -m pytest tests/test_form_validation.py# Run end-to-end login tests
python -m pytest tests/test_login_e2e.pypython -m pytestRunning pytest automates testing process and generates report.html
View the latest automated test report: https://kshg9.github.io/advocate-diary-app/report.html
The application provides RESTful API endpoints for cases and users:
GET /api/cases: Get all cases (filtered by user role)POST /api/cases: Create a new caseGET /api/cases/:id: Get a specific casePUT /api/cases/:id: Update a caseDELETE /api/cases/:id: Delete a case
GET /api/admin/users: Get all users (admin only)POST /api/admin/users: Create a new user (admin only)GET /api/admin/users/:id: Get a specific user (admin only)DELETE /api/admin/users/:id: Delete a user (admin only)
This project is currently Unlicenced - will be changed later.
Visit our project website for more information and documentation: https://kshg9.github.io/advocate-diary-app/






