A complete web-based ERP/CRM for managing the end-to-end lifecycle of candidates in a manpower recruitment agency.
mlams/
├── backend/
│ └── server.py # Python backend — JWT auth, SQLite DB, all APIs
├── frontend/
│ ├── index.html # Main single-page app
│ ├── css/style.css # Full design system (dark industrial theme)
│ └── js/
│ ├── core.js # API client, auth, routing, utilities
│ ├── pages.js # Dashboard, Leads, Lead Detail
│ └── pages2.js # Counseling, Accounts, Cheques, Users, Reports
├── start.sh # Start the backend server
├── stop.sh # Stop the backend server
└── README.md
- Python 3.8+ (with
jwtandflaskavailable — uses stdlib only otherwise) - A modern web browser
chmod +x start.sh stop.sh
bash start.shOpen frontend/index.html directly in your browser:
file:///path/to/mlams/frontend/index.html
Or if on macOS:
open frontend/index.htmlOn first run, an initial Admin account is created from your .env file (ADMIN_EMAIL / ADMIN_PASSWORD).
If you did not provide a .env file, the default login is:
- Email:
admin@localhost.com - Password:
admin123
(Note: Other roles like Tele-Caller, Counselor, and Accountant can be created by the Admin from the UI)
- Admin logs in and creates a new lead (
+ New Lead) - Admin assigns lead to a Tele-Caller
- Tele-Caller sees only their assigned leads
- Caller updates status:
Busy,Call Back,Interested,Not Interested - When marked Interested → lead automatically moves to Counseling queue
- Counselor sees all leads in the Counseling Queue
- Logs sitting sessions:
Sitting 1 Completed,Documents Pending, etc. - When satisfied → clicks Complete Counseling
- Lead automatically moves to Accounts stage
- Accountant sees the Accounts queue
- Records payment: amount, mode (Cash/Cheque/UPI etc.), date
- On payment → candidate marked Completed
- Accountant records cheque details (number, bank, amount)
- Updates cheque status:
Pending → Issued → ClearedorBounced - Full cheque register available in Cheque Management page
| Feature | Admin | Tele-Caller | Counselor | Accountant |
|---|---|---|---|---|
| Create Leads | ✓ | |||
| View All Leads | ✓ | |||
| View Assigned Leads | ✓ | ✓ | ||
| Update Call Status | ✓ | ✓ | ||
| View Counseling Queue | ✓ | ✓ | ||
| Log Counseling Sessions | ✓ | ✓ | ||
| Complete Counseling | ✓ | ✓ | ||
| View Accounts Queue | ✓ | ✓ | ||
| Record Payments | ✓ | ✓ | ||
| Manage Cheques | ✓ | ✓ | ||
| User Management | ✓ | |||
| Reports & Analytics | ✓ |
The SQLite database (backend/mlams.db) contains:
- users — System users with role-based access
- leads — Candidate leads with stage/status tracking
- status_logs — Full audit trail of every status change (who, when, what)
- counseling_sessions — Session-by-session counseling records
- payments — Payment transactions linked to candidates
- cheques — Cheque records with lifecycle status
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login | Login, returns JWT token |
| GET | /api/auth/me | Get current user |
| GET | /api/leads | List leads (role-filtered) |
| POST | /api/leads | Create lead (Admin only) |
| GET | /api/leads/:id | Get lead details |
| PUT | /api/leads/:id/status | Update lead status |
| PUT | /api/leads/:id/assign | Reassign lead (Admin) |
| GET | /api/leads/:id/sessions | Get counseling sessions |
| POST | /api/leads/:id/sessions | Add counseling session |
| PUT | /api/leads/:id/complete-counseling | Move to accounts |
| GET | /api/leads/:id/payments | Get payments |
| POST | /api/leads/:id/payments | Record payment |
| GET | /api/leads/:id/cheques | Get cheques |
| POST | /api/leads/:id/cheques | Add cheque |
| PUT | /api/cheques/:id | Update cheque status |
| GET | /api/leads/:id/logs | Get audit log |
| GET | /api/dashboard | Role-specific dashboard stats |
| GET | /api/users | List users (Admin/Counselor) |
| POST | /api/users | Create user (Admin only) |
Copy .env.example to .env before running the system to configure:
PORT(default: 5050)HOST(default: 0.0.0.0)JWT_SECRET(auto-generated if not set)ADMIN_EMAILADMIN_PASSWORDADMIN_NAME
- JWT tokens expire after 24 hours
- Passwords are securely hashed with a random salt using Python's built-in
pbkdf2_hmac - Every API endpoint enforces role-based access
- All status transitions are logged with user ID + timestamp
- Email/SMS notifications on stage transitions
- Document upload (passport, visa docs) per candidate
- Multi-branch support
- Export to PDF/Excel
- Mobile responsive improvements
- Real-time updates via WebSocket