SamadhanX is an easy-to-use online platform that helps colleges manage student complaints more smoothly. It lets students file complaints in the right category, automatically sends them to the right person, and keeps everyone updated with real-time notifications to ensure quick and transparent resolution.
- User (Student, Faculty, or Admin) accesses the portal and signs in.
- On success: Dashboard is loaded based on role.
- On failure: Error message shown with a retry option.
- User submits a complaint via the frontend.
- Backend actions:
- Assigns it to an issue in-charge based on location.
- Stores it in the
complaintandcomplaintOutboxtables. - Publishes a
creationevent to PUB/SUB broker.
- WebSocket server:
- Subscribed to
creation, receives complaint ID. - Sends a trigger to the
complaintFeedpage in frontend.
- Subscribed to
- Frontend:
- All users see a “New complaints” button.
- Clicking shows the new complaints.
Complaint Status: Assigned to incharge
Failure (e.g. DB issue): Error with retry option
- Processor:
- Fetches all
PENDINGorASSIGNEDcomplaints fromcomplaintOutbox. - Pushes them into a messaging queue.
- Fetches all
- Worker:
- Pulls complaints and escalates to higher authority.
- Updates the
complaintAssignmenttable. - Publishes an
escalationevent.
- WebSocket server:
- Subscribed to
escalation, sends trigger toissueInchargepage. - Complaint disappears from the old incharge’s dashboard and appears in the higher-ranked incharge’s dashboard.
- Subscribed to
Resolve by Self:
- Marks complaint as resolved.
- Status:
Resolved - Notification sent to user for feedback.
Delegate to Resolver:
- Assigns complaint to a resolver.
- Status:
Delegated - Resolver gets notified.
Escalate Complaint:
- Moves complaint to higher level incharge.
- Status:
Assignedat higher level.
- Resolver receives WhatsApp/SMS with complaint details.
- Works on complaint and submits resolution:
- If resolver replies "yes" → Complaint status:
Resolved - Notification sent to user for feedback.
- If resolver replies "yes" → Complaint status:
- If not resolvable:
- Escalated back to incharge.
- Complaint reassessed.
- Complaint marked
Resolved, user gets confirmation option.- If satisfied: Status:
Closed - If not resolved: Complaint is recreated or escalated.
- If satisfied: Status:
- Allowed while status is
PENDINGorASSIGNED. - Backend:
- Updates
complainttable. - Publishes an
updationevent.
- Updates
- WebSocket:
- Subscribed to
updation, triggers update on incharge’s page.
- Subscribed to
- Incharge can see the updated complaint.
Editable Fields:
- Title
- Description
- Access
- PostAsAnonymous
- Tags
- Attachments
Note: Location cannot be updated.
- Clone the repository
https://github.com/CodeAnk2829/SamadhanX.git
- Run
rediscontainer using docker
docker run -p 6379:6379 -d redis
Follow the official link to download and install Docker on your machine: https://docs.docker.com/get-started/get-docker/
- Go to
./packages/dbfolder and run migration command
npx prisma migrate reset
NOTE: Put your Postgres DATABASE_URL inside the
.envfile before you run migration.
In case you want to run your database on your local machine, you can run it by using docker - StartDocker desktopin case of Windows or Mac. You can use docker natively on Linux via your terminal - Run the following command:docker run -p 5432:5432 -e POSTGRES_PASSWORD=<your_password> -d postgresand you are good to go.
- Install
pnpmon your machine
npm install -g pnpm
- Inside the root directory i.e.
/SamadhanXrun the following commands
pnpm install
pnpm run build
NOTE: if any error occurs at
buildthen try running build command inside the following folders:./apps/api,./apps/processor,./apps/workerand./apps/websocket
- After
buildrun the servers
pnpm run dev
Website is live at http://localhost:5173/signup
