A privacy-first case management and decision-support platform for legal-aid NGOs and case workers.
- Frontend: Next.js (App Router), React, TypeScript, Tailwind CSS, shadcn/ui
- Backend: Node.js, Express, TypeScript, Mongoose
- Database: MongoDB
- DevOps: Docker, Docker Compose
- Case Management: Create, view, and manage domestic violence cases.
- Intake & Statements: Structured intake forms and free-text statement logging.
- Mock ML Analysis: Generates Severity, Escalation Score, Patterns, and Triggers.
- Lawyer Briefs: Auto-generates structured briefs that are editable and printable.
- Safe Action Navigator: Rule-based recommendations, evidence checklists, and referrals.
- Admin Panel: Role-based access control and system audit logs.
- Docker and Docker Compose installed on your machine.
- Navigate to the root directory.
- Run the following command:
docker-compose up --build
- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- MongoDB:
localhost:27017
- Environment Variables:
- Copy
backend/.env.exampletobackend/.env. - Copy
frontend/.env.exampletofrontend/.env.local.
- Copy
- MongoDB: Ensure a local MongoDB instance is running at
mongodb://localhost:27017/caseguard. - Backend:
cd backend npm install npm run dev - Frontend:
cd frontend npm install npm run dev
You can seed your database with sample users and a dummy case by running the seed script from the backend directory:
cd backend
npx ts-node src/scripts/seed.tsThis will create:
- Admin user:
admin@caseguard.com/password123 - Case Worker:
worker@caseguard.com/password123
The backend is configured with Jest and Supertest. To run tests:
cd backend
npm run testTo test the system fully, log in using the seeded users or register a new user on the frontend.
- By default, new users are assigned the
case_workerrole. - To test the Admin panel, log in with the admin credentials provided by the seed script. Once an admin, you can change other users' roles from the UI.