v3.2.13 β Powerful NREGA Automation for Windows, macOS & Linux
β¬οΈ Download Now Β Β·Β π How to Use Β Β·Β π Report Bug Β Β·Β π‘ Request Feature
- π― Overview
- β¨ Why NREGA Bot?
- π Key Features
- πΈ Screenshots
- π Getting Started
- βοΈ How It Works
- β FAQ
- π Changelog
- π License & Pricing
- π¬ Support & Community
β οΈ Disclaimer- π§π» Developer Guide
NREGA Bot is a powerful desktop application that eliminates the manual, repetitive work of the NREGA/MGNREGA portal. It securely drives a browser on your computer to automate data entry, processing and verification tasks β so you can focus on what matters.
π§ Built for Gram Rozgar Sevaks, Panchayat Secretaries, BDO offices and block-level operators who work with the VB-G-RAM-G / MGNREGA portal every day.
| Benefit | |
|---|---|
| β±οΈ Huge Time Savings | What takes hours of manual entry finishes in minutes β automate 40+ repetitive tasks |
| π― Zero Typing Errors | The bot reads and fills the portal precisely β no more fat-finger mistakes in job cards, MRs or wagelists |
| π₯οΈ True Background Mode | Automations keep running while you work in other tabs β the browser stays minimized |
| π Retry Failed in 1 Click | Re-process only the failed entries instantly, no need to restart everything |
| β‘ Smart Instant Updates | SHA-256 verified KB-size core updates β fixes ship in seconds, no re-install |
| βοΈ Cloud Sync & Backup | Your data & settings follow you β switch PCs or restore after a factory reset |
| π Office-Ready Reports | Professional, print-ready Excel/PDF reports β A4 landscape, serial numbers, page numbers |
| π¬ WhatsApp Reports | Results & summary reports delivered straight to your WhatsApp |
| Feature | Description |
|---|---|
| π Demand Automation | Demand laborers from CSV with GP logins & auto 100-day limit adjustment |
| ποΈ Delete Demand | Remove incorrect demands for single/multiple villages β auto-recovers from portal bugs |
| β¨ Work Allocation | Allocate work & remove allocations across multiple dates |
| π Muster Roll Generator | Auto-generate & download MR PDFs with a handy Merge PDFs button |
| π₯ Mate/Mistri MR | Generate skilled/semi-skilled muster rolls for Mate & Mistri workers |
| β¨ MR Fill | Auto-fill muster rolls with smart holiday handling |
| βοΈ MSR (MR Payment) | Process & save muster rolls from the MSR Payment page |
| π€ FTO Generation | FTO verification with Check Pending ABPS Labour workflow |
| π Generate / Send Wagelist | Generate new wagelists & send them for e-FMS payment |
| π¨οΈ Duplicate MR Print | Find, save & print all muster rolls + Merge PDFs button |
| π§± Material Entry | Dynamic material rows (up to 15), saved material profiles, live GST totals |
| π Scheme Closing | Close schemes for completed works automatically |
| β Physical Complete | Mark physical completion & auto-forward to Scheme Closing |
| Feature | Description |
|---|---|
| βοΈ eMB Entry | Auto-fill MB entry pages β professional Excel/PDF export & retry logic |
| π eMB Verify | Bulk-verify Measurement Book entries in seconds |
| Feature | Description |
|---|---|
| ποΈ Workcode Generator | Create work codes in bulk by loading categories & reading CSV |
| π§ IF Editor | Multi-page IF editing with a flexible UI & simple CSV inputs |
| πͺ Add Activity | Automate adding activities to work codes |
| β¨ Update Estimated Outcome | Update 'Estimated Outcome' for a list of work codes |
| Feature | Description |
|---|---|
| βΊ Sarkar Aapke Dwar | Bulk camp entry β applicant/scheme remarks automation |
| π SAD Update Status | Update Sarkar Aapke Dwar application statuses |
| β¨ Zero MR | Submit Zero MR β integrated directly with MR Tracking data |
| β Jobcard Verification | Verify job cards for a village & auto-upload the correct family photo |
| π³ Verify ABPS | Check worker Aadhaar numbers with NPCI |
| β¨ Resend Rejected Wagelist | Reprocess wagelist payments rejected by the bank |
| ποΈ Delete Applicant | Bulk-delete jobcard applicants via eKYC Report Excel or CSV |
| βοΈ Workcode Extractor | Parse & extract clean lists of work codes |
| π PDF Merger | Standalone utility to merge multiple PDFs |
| π Block Data Download | Load your block's Panchayat & Villages from the server (Location Pool) β works even without PO/GP portal login |
| Feature | Description |
|---|---|
| πΈ Pending Bills | Scrape unpaid MRs & Bills into a color-coded professional Excel |
| π NMMS Daily Attendance | Scrape attendance, group photos & worker details into professional Excel |
| β¨ MR Tracking | Real-time MR status (headless) β Pendency Report T0βT8 & Zero MR forwarding |
| β¨ Dashboard Report | Dashboard reports with full export capabilities |
| β¨ Issued MR Details | All e-muster issued works + ABPS Pending Demand block scan |
| π MIS Reports | CAPTCHA solving + multi-sheet MIS Excel downloads |
| π Social Audit Reports | Fetch Social Audit issue details automatically |
| π eKYC Report | Professional eKYC pending reports |
| Feature | Description |
|---|---|
| π Macro Manager | The automation hub β queue multiple tasks to run sequentially, Bulk Demand via CSV |
| β¨ Login Automation | One-click auto-login to the NREGA portal |
| π¬ WhatsApp Chat | Send files & messages β plus automatic completion notifications |
| π File Manager | Cloud file manager with shareable folder links |
| π¨ Dynamic UI | Modern interface β Dark/Light theme, skeleton loading & sound effects |
| βοΈ Cloud Sync & Backup | Backup/restore data & settings, or move to a new PC in one click |
| β‘ Smart Updates | SHA-256 verified core updates β small fixes ship instantly (KB size) |
| π Retry Failed Button | Re-process only failed entries in any automation with one click |

Muster Roll Generator β modern, intuitive dashboard

Duplicate MR Print β find, print & merge muster rolls
![]()
MR Tracking β pendency T0βT8 reports & Zero MR forwarding

Dashboard Report β comprehensive views with full export

Demand Automation β bulk labour demand from CSV
Only a supported web browser is needed:
- π Google Chrome (recommended)
- π΅ Microsoft Edge
- π¦ Mozilla Firefox
- Download the installer for your platform:
- Windows:
NREGABot-v3.2.2-Setup.exe - macOS:
NREGABot-v3.2.2-macOS.dmg - Lite (low-end PCs):
NREGABot-Lite-v3.2.2-Setup.exeor portable ZIP
- Windows:
- Run the installer and launch NREGA Bot.
- Register on nregabot.com/trial to get your 30-day free trial key.
- Launch the app and activate it with your registered email or the trial key.
- From the dashboard, click Chrome / Edge / Firefox β a special controlled browser window opens.
- Log in to the VB-G-RAM-G / MGNREGA portal in that window, just as you normally would.
- Open the tab for your task, fill in the details (panchayat, work codes, etc.) and hit βΆ Start Automation.
- Watch progress in the Logs & Status area β and get results in the Results tab when done, with one-click Export (Excel/PDF/CSV/WhatsApp).
NREGA Bot is a Python desktop application that securely controls a browser on your machine β it reads the portal's pages, fills forms exactly like a human would, and scrapes results into clean, print-ready reports.
| Layer | Technology |
|---|---|
| π₯οΈ Desktop GUI | Python Β· CustomTkinter (modern, themeable UI) |
| π Browser Automation | Selenium β Chrome / Edge / Firefox |
| π Reports | OpenPyXL (Excel) Β· FPDF (PDF) Β· Pillow (PNG images) |
| π¬ WhatsApp | Evolution API β automatic report delivery |
| βοΈ Cloud | License server, cloud sync & auto-update infrastructure |
| π Smart Updates | Loader + core-zip architecture β SHA-256 verified, KB-size fixes |
π§ For developers: the full architecture guide, entry points and build scripts live in the π§π» Developer Guide section at the bottom. AI agents:
AGENTS.mdis the compact operating manual to read first.
π³ Is there a free trial?
Yes! Register at nregabot.com/trial and you get a 30-day fully-functional free trial. Activate the app with your registered email or the trial key.
π Which browsers are supported?
Google Chrome (recommended), Microsoft Edge and Mozilla Firefox. Pick your browser from the app's dashboard.
π Can I use my PC while an automation runs?
Absolutely. NREGA Bot runs in true background mode β the browser is minimized and the automation continues running while you work in other apps or tabs.
π How do updates work?
Updates use a loader + core-zip architecture. Small fixes ship as KB-size packages that are SHA-256 verified before applying β no re-install needed. The About tab even shows a Download & Install button with the changelog.
π± Do I get WhatsApp reports?
Yes! When enabled in Settings, each completed automation sends a summary + results Excel to your WhatsApp β plus the web portal can send date-wise combine reports.
π» I have a low-end PC β will it work?
Yes β a special Lite build is available for low-end PCs with a reduced feature set and no animations/sounds.
- β‘ eMB Entry Much Faster β a ~25 second stall after every panchayat selection is gone. The postback wait was watching an element fetched after the page had already reloaded, so it could never fire and always burned its full timeout. Most noticeable on Block/PO/JE logins.
- π eMB Entry β Multi-Period Crash Fixed β moving to a work's second measurement period threw
stale element referenceand failed the whole work. Period options are now snapshotted as text, so every period is processed. - βοΈ 'No Muster Roll Available' Is No Longer an Error β a period with no muster roll (eMB already booked, or the MR hasn't reached your login yet) is now reported as Skipped, not a red failure. The summary counts them separately: β
entered,
β οΈ skipped, β failed. - π’ eMB Entry β Correct Work Code in Results β the Work Code column showed a fragment like
22-23); it now shows the real workcode's last 6 digits (e.g.209915). - π Footer 'STOP ALL' Button Restored β a long status line (eMB Entry's work code + period) filled the whole footer and pushed the STOP ALL button out of view. Status text is now shortened and the right-hand dock always keeps its space.
What's New in v3.2.8
Maintenance release β its job is to make sure every user actually receives the 3.2.5 and 3.2.7 features. If you are already on 3.2.7 there is no new code for you.
- π Location Data Pool (Block Sharing) β your Block's Panchayat & Villages sync to the server and are shared with same-block users, so anyone in the block can download them directly (Settings β π Block Data Download) even without a PO/GP portal login. Only public panchayat/village names are shared β no personal data.
- ποΈ Fresh Install β No Need to Add Panchayat β on a new install the onboarding "Add Panchayat" step auto-loads your block's data from the server (green tick) if another user in the same block has already contributed it. Just press Next.
- β‘ eMB Entry Faster β panchayat re-selection is skipped when the dropdown already holds the right panchayat, saving ~5-8s of postback per work code. Alert wait cut from 25s to 5s and sleep timers reduced, so long MB entry lists run noticeably quicker.
- π eMB Entry 'No Alert' Crash Fix β when the portal showed no alert after Save the whole run used to crash; that entry is now marked 'Failed: No Alert Received' and the rest keep going.
What's New in v3.2.7
- β‘ MB Entry Faster β panchayat re-selection skipped when already correct (~5-8s saved per work code); alert wait 25s β 5s; sleep timers reduced.
- π MB Entry 'no such alert' Fix β
NoAlertPresentExceptionis caught properly; the entry reports 'Failed: No Alert Received' instead of crashing. - π MR Fill Alert Fix β unexpected portal alerts during Save are handled gracefully instead of ending the run.
- π Footer Hover Glitch Fixed β hovering Stop All while automation was running made the footer "dance"; hover now changes only the button, never the status label.
- π¨ Footer Stop Button Improved β proper pill-button look with border, padding and a light-red β red hover background.
What's New in v3.2.6
- πΈ Jobcard Verification β Photo Upload Fixed β the Upload Family Photo popup now works reliably: the bot waits for the portal's Ajax ModalPopup instead of a JS alert, and closes the popup window without ever closing the main browser window.
- π Jobcard Verification β 'All Villages' in Dropdown β the "process all villages" checkbox is replaced by a proper π All Villages option in the village dropdown, which reloads when the panchayat changes.
- π Location Data Pool (Block Sharing) β your Block's Panchayat & Villages now sync to the server and are shared with same-block users. Anyone in the block can download them directly (Settings β Block Data Download) β even without a PO/GP portal login. Only public panchayat/village names are shared, no personal data.
- ποΈ Add Panchayat β Login Not Required β the onboarding "Add Panchayat" step now auto-loads your block's Panchayat & Villages from the server with a green tick β just press Next, even if you have neither PO nor GP login.
- π Server-Driven State Registry β new states (Bihar, UP, ...) can now be added from the admin panel without an app update; the app auto-fetches the new configuration every ~2 minutes.
- π Feature Usage Stats β every automation's usage now syncs to the server, so admins can see which features are used most (per tab, per state) in the Feature Popularity page.
- π Factory Reset Simplified β factory reset now needs a single confirmation β one click, no confusing steps.
- π Windows Auto-Restart Fixed β the app now restarts reliably on Windows after adding Panchayat/Villages, changing language, or Factory Reset (previously a cmd quoting issue showed 'Windows cannot find').
- π Onboarding Login Check β the Add Panchayat step now checks login status in the background: logged-out users see a clear 'login karo' message, GP/PO logins get smart guidance, and expired sessions are detected automatically.
- ποΈ GP/GB Login Scrape Improved β panchayat + villages scraping is now more robust for panchayat-level users (saves the panchayat even without a village dropdown, more element IDs tried state-wise).
- π Add Activity β Duplicate Fix β if a work code already has the activity, it's now skipped: the bot waits for the activity grid to settle and checks each row's ACT code precisely, so no more double entries.
- π Universal WhatsApp Daily Report β the daily 6 AM report setting is now user-level: toggle it on any device and all your devices sync the same state within ~2 minutes. One device being off no longer cancels your morning report.
- π₯ Multiple Mates per Panchayat (Mate Map) β add several mates for one panchayat in Settings β Mate Map: save them one by one or type comma-separated (both merge, no duplicates), and the list shows all names. eMB Entry now rotates a random mate per measurement, so the same name isn't used everywhere; MR Gen staff mapping gets the same comma + rotation treatment.
- π New Onboarding (Welcome Tour) β first launch now runs an interactive 7-step setup wizard: pick your language, launch & log into the browser, add Panchayat & Villages right there, learn the Emergency Stop button, and how to use the app. Replay anytime from the About tab.
- π New Language β Hinglish β the whole app now works in Roman Hindi (Hinglish), auto-suggested for Hindi-speaking states. 5 languages total: English, ΰ€Ήΰ€Ώΰ€¨ΰ₯ΰ€¦ΰ₯, ΰ²ΰ²¨ΰ³ΰ²¨ΰ²‘, বাΰ¦ΰ¦²ΰ¦Ύ, Hinglish.
- π Smart Auto-Restart β the app now restarts itself after adding Panchayat/Villages, changing language, or Factory Reset β new data shows up in every tab immediately (reliable on Windows & macOS).
- π Factory Reset + Welcome Tour β factory reset now brings the Welcome Tour back for a fresh setup.
- ποΈ Shared Panchayat Scraper β one reliable scraping engine shared by Settings and the onboarding wizard.
What's New in v3.2.1
- π₯ Crash Reporting β crashes now upload full context (app version, tab/function, error, last 30 log lines) to the server; new admin Crashes tab with filters & CSV export.
- π‘ Uptime Monitoring β the server self-checks every 5 min (Database, Redis, WhatsApp, WebDAV) and alerts the admin on WhatsApp the moment anything goes down.
- π DPDP Compliance β Aadhaar & sensitive PII are masked everywhere; no sensitive data is stored.
- π¦ API Rate Limiting β per-key & per-IP rate limits + validation on sync endpoints; live per-key usage stats in the admin panel.
- π Better Error Logs β admin error logs now carry full context (version, tab, function, time) with export.
- βοΈ License & Terms β new in-app License & Terms window (EULA + disclaimer); web privacy/terms/disclaimer pages updated.
- π Bug Fixes β admin error summary 500 fix, local-dev fixes, stability improvements.
Previous versions
- π Panchayat Column in Results β every results table now shows which row belongs to which Panchayat, even in My Saved Panchayats mode.
- π’ Serial Number (Sr. No.) β a local serial number is now the first column of every results table and export (website serial is ignored).
- π Smart File Names β exported reports now include date & time in the filename β no more overwrites or manual renaming.
- ποΈ Saved Panchayats β process your saved panchayats directly (ABPS Verify, Muster Roll, eMB Verify, Wagelist Gen).
- π Multi-Panchayat β enhanced multi-panchayat processing in MR Tracking, MSR and Zero MR.
- π¬ WhatsApp Report Toggle β a dedicated toggle for WhatsApp report notifications.
- π¨οΈ Print-Ready Excel Reports β A4 landscape, fit-to-width, repeating headers & page numbers β print and submit straight to the office.
- π§© Windows Update Fix β core zip version detection now works correctly.
- π Google Login, πͺͺ Passkey (WebAuthn) login, π§ OTP Login on web
- π¦ Cloud storage full/nearly-full alert with one-click upgrade/cleanup
βΆοΈ Running automations shown live in the UI footer- π Web portal security & cloud report sync improvements
- π ABPS Verification crash fix (village-wise) + speed boost
- π¬ WhatsApp throttle protection via global queue (2β6s pacing)
- π Single WhatsApp setting β summary + Excel in one message
- π Cloud File Manager β send cloud PDFs to clients via WhatsApp
- π Smart Update Fix β correct version shown after update
- π Auto-restart after updates on macOS
- π₯οΈ Multi-tab workflow β automations run without grabbing browser focus
- π Auto tab switching β Logs while running, Results when done
- π Sound toggle fix
- π One-click theme switch & complete theme coverage
- π¬ Stacked, colour-coded toast notifications
- π‘ Online heartbeat, β‘ reliable 20s update checks, π SHA-256 verified downloads
- π Fixed 'humanize module missing' crash (About tab & File Manager)
βΆοΈ Running automation indicator in footer
π Full changelog: docs/changelog.json
- Trial: 30-day fully-functional free trial after web registration.
- License: A license key is required after the trial to continue using automation features.
Affordable Monthly, Quarterly, Half-Yearly and Yearly plans are available.
| Plan | Ideal for |
|---|---|
| ποΈ Monthly | Trying it out / short projects |
| ποΈ Quarterly | Regular day-to-day automation |
| ποΈ Half-Yearly | Serious operators β best value |
| ποΈ Yearly | Full-time Gram Rozgar Sevaks & offices |
π Get Your License Key
π Referral Program: Refer a new user with your code (from My Account) and get 15 extra days when they buy their first plan!
- π§ Email: nregabot@gmail.com
- π¬ WhatsApp Community: Join our Group
- π Instructions: How to Use
- π Bug Reports: Contact page
This section is the technical reference for developers who work on the NREGA Bot source. AI agents: har session start pe
AGENTS.mdpadho β wo compact operating manual hai (quick-start, golden rules, taskβfile map). Neeche ka section deep dive ke liye hai.
π Click to expand β full codebase architecture guide
NREGA Bot is a Python desktop automation tool (CustomTkinter GUI) that automates data-entry tasks on the Indian government's VB-G-RAM-G / MGNREGA portal. It drives a Selenium browser (Chrome/Edge/Firefox) to fill forms, scrape reports, and generate Excel/PDF reports for a user's district β block β panchayat.
β οΈ TWO repos: ye desktop app repo hai.nrega-server/ek alag independent repo hai (self-hosted NAS git:ssh://rajat@192.168.29.101:/volume1/docker/nrega-server.git, branchmaster) β submodule nahi, main repo use ignore karta hai (.gitignore). Desktop = GitHub push; Server = NAS push +deploy.sh. Dono alag se ship hote hain.
PyInstaller EXE (loader) ββdownloadsβββΆ core_win_vX.zip (source code) ββextractsβββΆ runs main_app.py
β β
βββ splash screen + update check (loader.py / lite_loader.py) β
βΌ
NregaBotApp (main_app.py)
ββββββββββββββββ¬βββββββββββββββββββ
β Header/footerβ Sidebar nav β
β (UIMixin) β (NavMixin) β
ββββββββββββββββΌβββββββββββββββββββ€
β License β Automation β
β (LicenseMixin)β (AutomationMixin)β
ββββββββββββββββ΄βββββββββββββββββββ
β
~55 lazy-loaded tabs in src/tabs/
Key concept: the "loader + core zip" delivery model
- The PyInstaller build only bundles
loader.py(orlite_loader.py) plus third-party pip packages. The actual application code (main_app.py,src/) ships as a source zip (core_win_vX.zip/core_mac_vX.zip) built byscripts/build_update.py. - On launch, the loader checks
https://nregabot.com/version.json(seeconfig/version.jsonfor the local mirror), downloads the core zip if newer or same-version-but-different-hash (SHA-256 verified), extracts it, and runsmain_app.py/lite_app.pyfrom disk. - Implication for pip deps: any third-party package the app code needs (e.g.
humanize) MUST be declared as--hidden-import=...in the build scripts β otherwise PyInstaller never sees it because the loader itself doesn't import it. (This caused the "humanize module missing" bug β see build scripts section.)
| File | Role |
|---|---|
loader.py |
Main app loader. Splash screen, checks/downloads/extracts core zip, then import main_app; main_app.run_application(). |
lite_loader.py |
Lite app loader. Compact splash, simpler update path (extracts into _internal/), then lite_app.run_lite_application(). |
main_app.py |
Full app. Defines NregaBotApp(ctk.CTk, LicenseMixin, NavMixin, AutomationMixin, UIMixin) and run_application() (single-instance socket on port 60123). |
lite_app.py |
Lite app. NregaBotLiteApp β fewer tabs, no sounds/animations/onboarding, emoji icons. Port 60124. |
_smoke_test_tabs.py |
Headless test: instantiates EVERY tab to catch pack/grid TclErrors. Run: venv/bin/python _smoke_test_tabs.py. |
scripts/check_imports.py |
Compiles + imports every .py file; writes results to docs/import_check_results.txt. |
Centralized typed state: license info, active_automations: Set[str], automation_threads,
stop_events, tab instances, nav buttons, update info, theme mode, etc.
NregaBotApp exposes backward-compatible properties (bottom of main_app.py) that
delegate self.app.xxx β self.app_state.xxx, so the 40+ tab files can keep using
self.app.<attr> unchanged.
| File | Mixin | Responsibility |
|---|---|---|
app_ui.py |
UIMixin |
Header, footer (status + running-automation indicator), sidebar layout, resize smoothing, theme cycling, sound/minimize toggles, set_status()-adjacent widgets. |
app_navigation.py |
NavMixin |
Sidebar buttons, category filter, lazy tab loading via show_frame(), tab caching (_has_automated keeps tabs alive after a run), error UI for failed tab loads, workflow delegation to self.workflows. |
app_automation.py |
AutomationMixin |
start_automation_thread(key, target, args), on_automation_finished(), emergency stop, AUTOMATION_DISPLAY_NAMES map + _update_running_automation_indicator(), WhatsApp notification helpers, browser launch delegation, _quick_login_automation. |
app_license.py |
LicenseMixin |
License validation flow, activation window, expiry handling, feature flags (global_disabled_features, trial_restricted_features). |
| File | Class | Responsibility |
|---|---|---|
services.py |
ServiceManager |
License check/validate (/api/validate), update check & install, machine-id via MAC, prevent-sleep (Windows SetThreadExecutionState / macOS caffeinate). |
browser_manager.py |
BrowserManager |
Launch Chrome (debug port 9222)/Edge/Firefox, manage Selenium driver, per-thread browser choice. |
workflow_manager.py |
WorkflowManager |
Macro queue engine: runs a sequence of tab automations (e.g. MR Tracking β eMB Entry), waits for keys in app.active_automations, hands off scraped workcodes between tabs. |
icon_manager.py |
LazyIconManager |
Lazy icon loading with cache (get("key"), get_sized(), preload_essential()). |
sound_manager.py |
SoundManager |
Plays wav assets from assets/sounds/. |
- ~55 tabs, each a
ctk.CTkFrame. Config lives insrc/tab_config.py(get_tabs_definition()) andsrc/lite_tab_config.py(get_tabs_definition_lite()). - Lazy loading:
_lazy_import(class_name, module_path)intab_config.pyimports the module only on first tab open (importlib) and caches the class. This keeps startup fast (no selenium/pandas at boot). - Base class:
src/tabs/base_tab.pyβBaseAutomationTab(parent, app, automation_key). Provides: log area + status bar, Start/Stop/Retry/Reset buttons,start_automation(),stop_automation(),update_status(),set_common_ui_state(), treeview styling/export (CSV/Excel with openpyxl styling), PNG report generation (generate_report_image),_REPORT_CATEGORY_NAMES(automation_key β report folder name), activity tracking (activity_panchayat/village/details),safe_after()tracked callbacks,_is_alive()guards. - Automation flow: tab's
start_automation()βself.app.start_automation_thread( self.automation_key, self.run_automation_logic, args=...)β runs on a daemon thread βon_automation_finished()cleans up, logs, toasts, WhatsApp notify, removes key fromactive_automations.
Automation keys (automation_key on each tab)
demand, work_allocation, muster, mate_mr, mr_fill, msr, gen, send, fto_gen, duplicate_mr, material_entry, mb_entry, emb_verify, wc_gen, if_edit, update_estimate, physical_complete, scheme_closing, add_activity, jc_verify, abps_verify, del_work_alloc, del_demand, delete_applicant, zero_mr, resend_wg, sad_auto, sad_update_status, mr_tracking, dash_report, mis_reports, issued_mr_report, ekyc_report, social_audit_respond, nmms_attendance, pending_bills, macro, pdf_merger, wc_extractor.
Friendly display names for these live in AUTOMATION_DISPLAY_NAMES in
src/app/app_automation.py (used by the footer "βΆ Running: β¦" indicator).
Built in UIMixin._create_footer() (src/app/app_ui.py) and lite_app.py.
- Left side: Β© copyright, loading spinner, then the
running_automation_labelshowing e.g.βΆ Running: MB Entry, Demand(bold blue). Updated byAutomationMixin._update_running_automation_indicator(). - Right side (
dock_frame):status_label(Status: Ready), then STOP ALL emergency-stop dot+label, icon buttons (history, cloud files, WhatsApp, settings), server status dot. _update_running_automation_indicator()is called on start / finish / emergency stop and is safe before the footer exists (winfo_exists()guard).set_status()(inmain_app.py) colors the status label by message keywords (running β blue + spinner, ready β green + success sound, error β red + error sound).
APP_VERSION(3.2.2),LICENSE_SERVER_URL(env or default),MAIN_WEBSITE_URL,SUPPORT_EMAIL,BETA_BUILD(detected viaconfig/beta.jsonmarker).COLORSβ the central color palette (all UI must useconfig.COLORS["key"], supports(light, dark)tuples).COLORS_CACHEfor fast access.- Per-automation config dicts:
MUSTER_ROLL_CONFIG,MSR_CONFIG,WAGELIST_GEN_CONFIG,MB_ENTRY_CONFIG,IF_EDIT_CONFIG,WC_GEN_CONFIG,FTO_GEN_CONFIG,PENDING_BILLS_CONFIG(per-state seed digests),STATE_DEMAND_CONFIG, etc. β URLs + form defaults per portal page. DEFAULT_LAUNCH_URLSβ sites opened when launching managed browsers.- User config (
config.json) is read/written viasrc/utils.pyget_config()/save_config()in the app data dir (user_data_dir("NREGABot", "PoddarSolutions")).
| Function | Purpose |
|---|---|
resource_path() |
Path for bundled assets (works in PyInstaller _MEIPASS and dev). |
get_data_path() / get_user_downloads_path() / get_nregabot_path() / get_report_path() |
Standard dirs: app data, ~/Downloads, ~/Downloads/NregaBot/, ~/Downloads/NregaBot/Report {FY}/β¦. |
setup_logging() / get_logger() |
Centralized rotating file logger (app data nregabot.log) + stderr warnings. |
get_config() / save_config() / validate_config() |
User config.json helpers (create_default_config_if_not_exists() lives in src/config.py). |
parse_version() |
Semver compare (replaces packaging). |
format_bytes() |
Byte-size formatting β uses humanize if installed, built-in fallback otherwise (so the app never crashes if humanize is missing from the bundle). |
truncate_workcode() |
Last-6-digits privacy truncation of NREGA workcodes. |
_suppress_overscroll() |
macOS trackpad bounce suppression for scroll frames. |
| Script | Purpose |
|---|---|
scripts/build_windows.bat |
Main loader (onedir) + Lite loader (onedir) + portable zip + Inno Setup installers. Has --hidden-import=humanize + --hidden-import=src.app.app_automation. |
scripts/build_macos.sh |
Same for macOS + codesign + DMG. |
scripts/build_beta_portable.bat |
Beta onefile portable build (adds config/beta.json marker β BETA_BUILD=True). |
scripts/build_update.py |
Builds dist/core_{mac,win}_v{version}.zip from a whitelist of top-level entries (never ships .env, server code, secrets) and writes SHA-256 into config/version.json. |
scripts/installer.iss / installer_lite.iss |
Inno Setup scripts. |
On push to main: builds Windows (loader + core win zip + Lite portable), Beta portable,
Linux loader, then publishes a GitHub release. config/version.json is the source of truth
for latest_version, changelog, and core_update hashes (hash_windows/hash_macos).
version.json β core_update:version,url(_windows/_macos),force_full_reinstall,hash_windows,hash_macos, generichash.- Loader (
loader.py) /ServiceManager.check_for_updates_background()compare their own platform's hash only; same-version + changed-hash = hotfix re-download. Corrupt download (hash mismatch) keeps the old version. - After
build_update.py, copy the printed SHA-256 intoconfig/version.jsonbefore release.
| Path | Content |
|---|---|
assets/ |
logo.png, icons (assets/icons/), sounds (assets/sounds/*.wav), fonts (DejaVu + NotoSansDevanagari for Hindi PDFs), demo CSVs, material_profiles.json. |
config/ |
version.json, theme.json, __init__.py (beta marker may be bundled here). |
docs/ |
changelog.json (About β Changelog tab), license.txt, guides. |
| User data dir | config.json, license.dat, nregabot.log, core_version.json, core.zip, app_live/ (extracted code). |
- Never hard-code colors β use
config.COLORS[...]. Supports(light, dark)tuples. - Never call Tk widgets from worker threads β always
self.app.after(0, ...). - Never
driver.quit()in a tab'sdestroy()β the automation thread may be using it; cleanup happens instart_automation_thread()'s wrapperfinally. - Keep tabs alive after automation β
_has_automatedflag stopsshow_frame()from destroying a tab that ran automation (loses logs/results otherwise). - Any new pip package MUST be added as
--hidden-import=in BOTHbuild_windows.batandbuild_macos.sh(and release.yml Linux build), because the loader is the PyInstaller entry and app code ships as source. Forgetting this = "ModuleNotFoundError" in release (see thehumanizeincident). Also add a source-level fallback where feasible. - New tabs: add to
src/tab_config.pywith acreation_funcvia_lazy_import, give the tab a uniqueautomation_key, and add the key toAUTOMATION_DISPLAY_NAMESif you want a friendly footer name. Lite tabs go insrc/lite_tab_config.py. - Lazy loading is core β don't import selenium/pandas/etc. at module top-level in tabs
or the startup time regresses; use function-level imports (selenium already module-level
in
base_tab.pydeliberately). - Report paths go through
get_report_path(category, fin_year)β~/Downloads/NregaBot/Report 2026-2027/<Category>/. - Logging: use
get_logger()(never bareprintfor user-facing logs;printonly for debug). - Testing: run
venv/bin/python _smoke_test_tabs.pyafter tab changes andvenv/bin/python scripts/check_imports.pybefore release.
| Task | File(s) |
|---|---|
| Change footer / status / running indicator | src/app/app_ui.py, src/app/app_automation.py, lite_app.py |
| Add/modify a portal automation tab | src/tabs/<tab>_tab.py + src/tab_config.py (+ src/config.py for URLs) |
| Add a sidebar category or tab | src/app/app_navigation.py (_ICON_KEYS), src/tab_config.py |
| Fix license/activation | src/app/app_license.py, src/managers/services.py |
| Change update flow | loader.py, lite_loader.py, src/managers/services.py, scripts/build_update.py, config/version.json |
| Macro queue / multi-tab workflows | src/managers/workflow_manager.py |
| Colors/theme | src/config.py (COLORS), config/theme.json |
| Release a new version | bump APP_VERSION (config.py) + config/version.json β run build_update.py β copy hash β push (CI builds) |
This tool automates interactions with a live government website. The author is not responsible for any changes to the NREGA portal that may cause the application to malfunction.
This software is provided "AS IS" without warranty of any kind. Always double-check automated data for accuracy.
Β© NREGA Bot Β· Made with β€οΈ for NREGA workers
π¨βπ» Author: Rajat Poddar Β· π nregabot.com
