Samanta Portal
A platform for reporting gender-based violence with separate dashboards for victims, police, and lawyers.
Overview
Samanta Portal was built because survivors of gender-based violence in Nepal often struggle to access safe reporting mechanisms. Filing a complaint can be intimidating, confusing, and time-consuming. This application removes those barriers.
The core idea is straightforward: let survivors choose whether to report to police or a lawyer. The system generates a unique case ID for tracking. Police and lawyers each get their own dashboard. Admins see everything.
We also included an AI assistant for legal questions and dedicated resources for LGBTQIA+ individuals.
Features
User Interface
- undefinedDual Report Channel: File complaints to either police or lawyer from one form
- undefinedToggle-Based Switching: Switch report types with a single click; form updates automatically
- undefinedGlass Morphism Design: Modern, clean interface with backdrop blur effects
- undefinedDark/Light Mode: Theme support across all interfaces
- undefinedBilingual Support: English and Nepali interface
Complaint & Case Management
- undefinedCase ID Generation: Automatic unique IDs (#SC for police, #SL for lawyer)
- undefinedAdvanced Search: Multi-field search by case ID, complainant name, type, location
- undefinedStatus Tracking: Pending → In Progress → Resolved workflow
- undefinedPDF Export: Download individual complaints as formatted documents
- undefinedCSV Export: Bulk export for records and analysis
- undefinedForm Validation: Input checking with user-friendly error messages
Role-Based Access
- undefinedVictim Interface: Report incidents, access rights information, monitor case status
- undefinedPolice Dashboard: View assigned complaints, update status, export records
- undefinedLawyer Dashboard: View legal requests, manage cases, export client data
- undefinedAdmin Panel: Unified control center for users, reports, and system oversight
- undefinedAuthentication: Login system with role-based access control
Support & Resources
- undefinedAI Legal Assistant: Chatbot for answering rights and legal procedure questions
- undefinedLGBTQIA+ Resources: Dedicated section with information and support resources
- undefinedEducational Materials: Downloadable guides and information about rights
Data Management
- undefinedMulti-Table Database: Separate storage for users, police reports, lawyer requests
- undefinedReal-Time Updates: Forms refresh immediately after submission
- undefinedData Validation: Server-side and client-side input validation
- undefinedSearch Filtering: Filter by status, type, location, and keywords
- undefinedStatistics Dashboard: Overview cards showing counts by status
Table of Contents
Application Components
1. Main Portal (index.html + script.js)
The entry point for all users. Handles:
- Complaint form with dual-channel toggle (Police/Lawyer)
- Form submission and case ID generation
- AI chatbot integration for legal questions
- Rights information display
- Navigation to other sections
undefinedKey Functions:undefined
generateCaseId(prefix) - Creates unique case IDs with timestamp
setReportTarget(target) - Switches form between police and lawyer modes
showAnswer() - AI assistant response handling
downloadPDF() - Generates and downloads complaint PDFs
2. Admin Dashboard (admin.html)
Unified control center for administrators. Includes:
- Home tab with system overview (total users, reports, stats)
- Users tab for user account management
- Reports tab to view all complaints
- Police tab to monitor police cases
- Lawyer tab to monitor lawyer cases
- Global search across all data
- Add, edit, delete functionality for all records
undefinedAdmin Capabilities:undefined
- Add new users
- Edit user information and permissions
- Delete user accounts
- Add lost/found reports directly
- Manage case statuses
- View comprehensive statistics
- Export data
3. Police Dashboard (police.html + policedasboard.html)
Separate interface for police officers. Features:
- Dashboard with stats cards (Total, Pending, In Progress, Resolved)
- Table view of assigned police complaints (#SC prefix)
- Search and filter by ID, name, type, status
- View full complaint details in modal
- Edit case status
- Download complaint PDFs
- Export all reports as CSV
undefinedPolice Workflow:undefined
- See all assigned cases at a glance
- Search for specific complaints
- Click to view full details
- Update status as investigation progresses
- Generate official documents
4. Lawyer Dashboard (lawyer.html + lawyerdashboard.html)
Separate interface for lawyers. Similar to police dashboard but for legal cases:
- Dashboard with stats cards
- Table view of assigned cases (#SL prefix)
- Search and filter functionality
- View complete case details
- Update case progress
- Download case PDFs
- Export client records as CSV
undefinedLawyer Workflow:undefined
- Monitor assigned legal cases
- Quick search for specific clients
- Review case details
- Track legal action progress
- Maintain client records
Educational resource section featuring:
- LGBTQIA+ rights information
- Support organizations and resources
- Contact information for help services
- Responsive card-based layout
- Theme-aware styling
6. Database Layer (backend/)
Backend infrastructure:
server.js - Express.js server handling requests
auth/google.js - Google OAuth integration
data/email.json - User data storage
- Connection management and error handling
User Workflows
Survivor Workflow
- Visit main portal
- Read information or access chatbot
- Click “Report to Police” or “Report to Lawyer”
- Fill complaint form with incident details
- Submit (generates unique case ID)
- Option to download PDF
- Monitor case progress via email or dashboard
Police Officer Workflow
- Log into police dashboard
- View statistics and assigned complaints
- Search for specific case
- Click “View” to read full details
- Click “Edit” to update status
- Download individual PDFs or bulk CSV
- Maintain records of cases handled
Lawyer Workflow
- Access lawyer dashboard
- Check assigned cases and statistics
- Search for client case by ID or name
- Review case details
- Update case status as legal work progresses
- Export records for billing or filing
- Maintain client documentation
Admin Workflow
- Log into admin panel
- View system overview on Home tab
- Switch to Users/Reports/Police/Lawyer tabs as needed
- Add new records or edit existing ones
- Monitor trends and statistics
- Export data for reports
Tech Stack
undefinedFrontend:undefined
- HTML5 (semantic markup)
- CSS3 (Grid, Flexbox, Glass Morphism)
- Vanilla JavaScript (no frameworks)
- Font Awesome 6.4.0 (icons)
- jsPDF 2.5.1 (PDF generation)
- Google Fonts (Inter, Poppins)
undefinedBackend:undefined
- Node.js 14+
- Express.js (server)
- Google OAuth (authentication)
- JSON (data storage, file-based)
undefinedDesign System:undefined
- Primary: #0056b3 (Royal Blue)
- Secondary: #1e74d8 (Medium Blue)
- Accent: #10b981 (Emerald)
- Neutral: #f4f7fb (Light Gray-Blue)
- Border Radius: 12-24px
Installation
Prerequisites
- Node.js 14 or higher
- npm or yarn
- A modern web browser (Chrome, Firefox, Safari, Edge)
Setup Steps
-
Clone the repository:
git clone https://github.com/AayuAmor/Samanta_Portal.git
cd Samanta_Portal
-
Install dependencies:
npm install
-
Configure Google OAuth:
- Create a Google Cloud project
- Enable OAuth 2.0
- Update
backend/auth/google.js with credentials
-
Start the server:
npm start
-
Open in browser:
- Main portal:
http://localhost:3000/Frontend/index.html
- Admin panel:
http://localhost:3000/Frontend/admin.html
- Police dashboard:
http://localhost:3000/Frontend/police.html
- Lawyer dashboard:
http://localhost:3000/Frontend/lawyer.html
Usage
For Survivors
- Go to main portal
- Fill out complaint form
- Choose reporting channel (Police or Lawyer)
- Submit
- Receive case ID (#SC or #SL)
- Optionally download PDF
Or:
- Visit LGBTQIA+ section for rights information
- Chat with AI assistant for legal questions
For Police Officers
- Log into police dashboard
- See assigned complaints with status breakdown
- Search or scroll through cases
- Click “View” to read details
- Click “Edit” to update status
- Download individual PDFs or CSV export
For Lawyers
- Access lawyer dashboard
- View assigned legal cases
- Search by case ID or client name
- Review case details
- Update case status
- Export client records
For Admins
- Log into admin panel
- View system overview
- Switch between tabs (Users, Reports, Police, Lawyer)
- Search across all data
- Add, edit, or delete records
- Monitor statistics and trends
Database Structure
Users Table
username | password | full_name | email | phone | user_type
Police Reports Table (#SC prefix)
report_id | user_id | complaint_type | description | location | status | created_date
Lawyer Requests Table (#SL prefix)
report_id | user_id | complaint_type | description | status | created_date
| Type |
Prefix |
Example |
| Police Complaint |
#SC |
#SC20251208-0001 |
| Lawyer Request |
#SL |
#SL20251208-0001 |
Format: #[PREFIX][YYYYMMDD]-[XXXX]
Screenshots
[Placeholder: Add screenshots]
Main complaint form with toggle
Police dashboard with stats
Lawyer dashboard with search
Admin control panel
LGBTQIA+ resources page
Known Issues
- Data stored in JSON files (not suitable for production)
- No email notifications yet
- Search is case-sensitive in some areas
- PDF exports have basic formatting
- Google OAuth not fully integrated everywhere
- No real-time updates (requires page refresh in some places)
- Limited data validation on forms
Future Improvements
- Switch to PostgreSQL or MongoDB
- Add email/SMS notifications for case updates
- Implement two-factor authentication
- Case reassignment functionality
- Video/audio file uploads for evidence
- Mobile app version
- Real-time case tracking
- Advanced analytics dashboard
- Automated response templates
- More language support (Hindi, Maithili)
- Print-friendly complaint forms
- Digital signature support
Contributing
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature
- Make changes and test locally
- Commit:
git commit -m "Add your feature"
- Push:
git push origin feature/your-feature
- Open a pull request
Keep changes focused. If fixing a bug, reference the issue number.
undefinedBuilt for the 2025 Hackathonundefined
undefinedDeveloped by TEAM KALIundefined
© 2025 All rights reserved