A comprehensive web application for registering and supporting migrant workers in Tamil Nadu, India. Built with Flask, SQLite, and modern web technologies.
- โ Easy Registration - Simple form with all required details
- โ Unique Worker ID - Auto-generated format: TN-MIG-YYYY-XXXXXX
- โ Professional ID Card - Downloadable PDF with QR code
- โ Personal Dashboard - View profile, applications, and grievances
- โ Job Search - Browse and apply for verified job openings
- โ Grievance System - Submit and track workplace issues
- โ Multilingual - English, Tamil (เฎคเฎฎเฎฟเฎดเฏ), Hindi (เคนเคฟเคเคฆเฅ)
- โ Mobile Friendly - Responsive design for all devices
- โ Job Listings - Browse active job opportunities
- โ Detailed Job Info - Company, location, salary, requirements
- โ Easy Application - Apply with optional cover letter
- โ Status Tracking - Pending, Shortlisted, Selected, Rejected
- โ Application History - View all past applications
- โ Multiple Categories - Workplace, Payment, Health, Legal, etc.
- โ Status Updates - Pending, In Progress, Resolved
- โ Resolution Notes - Admin feedback on grievances
- โ Timeline Tracking - Created and updated timestamps
- โ Comprehensive Dashboard - Real-time statistics
- โ Worker Management - Search, view, and manage workers
- โ Grievance Management - Update status and add notes
- โ Job Management - Create, edit, and manage job postings
- โ Application Review - View and update application status
- โ CSV Reports - Download workers and grievances data
- โ User Management - Add admin and staff users
- โ Role-Based Access - Admin vs Staff permissions
- โ Modern Design - Clean, professional interface
- โ Orange & White Theme - Consistent branding
- โ Responsive Layout - Works on all screen sizes
- โ Intuitive Navigation - Easy to use for all literacy levels
- โ Professional Landing Page - Hero section, features, benefits
- โ Custom Components - Cards, tables, forms, modals
- Python 3.8 or higher
- pip (Python package manager)
- Clone or download the project
cd migrant-worker-system- Install dependencies
pip install -r requirements.txt- Initialize database
python setup.py- Populate sample data (optional)
python populate_sample_data.py- Run the application
python app.py- Access the application
- Open browser: http://localhost:5000
- Admin login: http://localhost:5000/admin/login
- Worker login: http://localhost:5000/worker/login
- Username:
admin - Password:
admin123
- Mobile: 9876543210 to 9876543300
- Password: Same as mobile number
๐ See SAMPLE_CREDENTIALS.md for complete list
migrant-worker-system/
โโโ app.py # Main Flask application
โโโ setup.py # Database setup script
โโโ populate_sample_data.py # Sample data generator
โโโ init_db.py # Database initialization
โโโ requirements.txt # Python dependencies
โโโ translations.json # Multilingual translations
โโโ migrant_workers.db # SQLite database (auto-created)
โ
โโโ static/
โ โโโ style.css # Main stylesheet
โ โโโ landing.css # Landing page styles
โ โโโ script.js # JavaScript functionality
โ
โโโ templates/
โ โโโ base.html # Base template
โ โโโ landing.html # Landing page
โ โโโ register.html # Worker registration
โ โโโ worker_login.html # Worker login
โ โโโ worker_dashboard.html # Worker dashboard
โ โโโ worker_profile.html # Worker profile
โ โโโ grievance_form.html # Grievance submission
โ โโโ job_list.html # Job listings
โ โโโ job_detail.html # Job details
โ โโโ admin_login.html # Admin login
โ โโโ admin_dashboard.html # Admin dashboard
โ โโโ admin_workers.html # Worker management
โ โโโ admin_grievances.html # Grievance management
โ โโโ admin_jobs.html # Job management
โ โโโ admin_job_create.html # Create job
โ โโโ admin_job_applications.html # View applications
โ โโโ admin_reports.html # Download reports
โ โโโ admin_add_user.html # Add admin user
โ โโโ 404.html # Error page
โ โโโ 500.html # Error page
โ
โโโ docs/
โโโ README.md # This file
โโโ SAMPLE_CREDENTIALS.md # Login credentials
โโโ FEATURES_UPDATE.md # Feature documentation
โโโ QUICK_START.md # Quick start guide
- Unique worker ID, personal details
- Contact information
- Employment details
- Skills and qualifications
- Password hash for login
- Optional Aadhaar number
- Worker reference
- Issue type and description
- Status tracking
- Resolution notes
- Timestamps
- Job details and requirements
- Company information
- Salary range
- Vacancies count
- Application deadline
- Status (Active/Closed)
- Worker and job references
- Application date
- Cover letter
- Status tracking
- Admin notes
- Username and password hash
- Role (Admin/Staff)
All tables have proper indexes for optimal performance
- Backend: Flask (Python)
- Database: SQLite with optimized indexes
- PDF Generation: ReportLab
- QR Codes: Python qrcode library
- Authentication: Flask-Login
- Security: Werkzeug password hashing
- Frontend: Custom CSS (no Bootstrap)
- Icons: Bootstrap Icons
- Responsive: Mobile-first design
The system supports three languages:
- English - Default language
- Tamil (เฎคเฎฎเฎฟเฎดเฏ) - Primary regional language
- Hindi (เคนเคฟเคเคฆเฅ) - National language
Language preference is saved in cookies and persists across sessions.
- Comprehensive form with validation
- Required fields: Name, Age, Gender, Mobile, Origin State, Address, Employer, Skills, Emergency Contact, Password
- Optional: Aadhaar number
- Auto-generates unique worker ID
- Creates secure password hash
- Prevents duplicate mobile numbers
- Government branding with emblem
- Worker photo placeholder with initial
- All worker details in organized format
- QR code for profile verification
- Security features and watermark
- Registration date and issuing authority
- Professional layout with color coding
- Downloadable as PDF
- Browse active job openings
- Filter by location, type, company
- View detailed job descriptions
- Submit applications with cover letter
- Track application status
- Receive admin feedback
- View application history
- Six issue categories:
- Workplace Issues
- Payment Disputes
- Health Issues
- Missing/Stolen Documents
- Abuse/Harassment
- Legal Aid Requests
- Status tracking (Pending โ In Progress โ Resolved)
- Admin can add resolution notes
- Timeline tracking with timestamps
- Real-time statistics:
- Total workers
- Total grievances
- Pending grievances
- Today's registrations
- Total jobs
- Active jobs
- Total applications
- Pending applications
- Recent activities feed
- Quick action buttons
- Responsive charts and cards
- โ Password hashing (Werkzeug)
- โ Session-based authentication
- โ Role-based access control
- โ SQL injection prevention (parameterized queries)
- โ CSRF protection
- โ Secure cookie handling
- โ Input validation
- โ XSS prevention
- Optimized for all screen sizes
- Touch-friendly buttons and forms
- Readable text on small screens
- Collapsible navigation
- Responsive tables
- Mobile-first design approach
- Worker Registration - Migrant workers register and get official ID
- Job Matching - Workers find suitable employment opportunities
- Issue Resolution - Workers report and track workplace problems
- Government Tracking - Officials monitor migrant worker welfare
- Employer Verification - Verify worker credentials via QR code
- Data Analytics - Generate reports for policy decisions
# Backup database
copy migrant_workers.db migrant_workers_backup.db# Delete and reinitialize
del migrant_workers.db
python setup.py
python populate_sample_data.pypython check_workers.pypython add_indexes.py- Database indexes on all frequently queried columns
- Composite indexes for complex queries
- Efficient JOIN operations
- Minimal database calls per page
- Optimized PDF generation
- Cached translations
- Lightweight CSS (no Bootstrap)
Database Errors:
del migrant_workers.db
python setup.pyPort Already in Use:
Edit app.py and change port:
app.run(debug=True, host='0.0.0.0', port=5001)Missing Dependencies:
pip install --upgrade -r requirements.txtTranslation Not Working:
- Clear browser cookies
- Check translations.json file
- Verify language selector in navbar
For production use:
- โ
Change
SECRET_KEYinapp.py - โ
Set
debug=False - โ Use production WSGI server (Gunicorn/uWSGI)
- โ Set up HTTPS with SSL certificate
- โ Use PostgreSQL/MySQL instead of SQLite
- โ Enable proper logging
- โ Set up regular database backups
- โ Configure firewall rules
- โ Use environment variables for secrets
- โ Set up monitoring and alerts
- Government Department: Tamil Nadu Labour Department
- Location: Chennai, Tamil Nadu
- Purpose: Migrant Worker Welfare
This project is developed for the Tamil Nadu Government's migrant worker support initiative.
- Tamil Nadu Government
- Labour Department
- All migrant workers
- Development team
- โ Initial release
- โ Worker registration and login
- โ Professional ID card generation
- โ Job management system
- โ Grievance tracking
- โ Admin dashboard
- โ Multilingual support
- โ Mobile responsive design
- โ Database optimization
- โ Sample data population
Made with โค๏ธ for Tamil Nadu Migrant Workers
Version: 1.0.0
Last Updated: January 15, 2025
Status: Production Ready โ