Skip to content

arjunkp1/echallan-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Challan Management System

A free, open-source e-challan tracking and management system for Indian fleet operators — built entirely on Google Sheets + Google Apps Script. No servers, no hosting costs, no subscriptions.


The Problem

Every company running a fleet in India deals with this — e-challans come in silently through the Parivahan portal, nobody tracks them systematically, court cases get missed, drivers don't get held accountable, and the finance team has zero visibility. Fines pile up, some go to court, and at the end of the year nobody knows how much was actually paid.

This system was built to solve exactly that, for a Ready-Mix Concrete company operating three plants and 60+ vehicles in Kerala.


What It Does

  • Web App — a clean, mobile-friendly interface that works on any device and browser
  • Google Sheet as Database — all data lives in your own Google Sheet; you own it completely
  • Dashboard — live KPIs: total fine, balance to pay, pending vs resolved, ageing buckets
  • Add & Edit Challans — add new challans through the app; they write directly to the sheet
  • Search & Filter — filter by vehicle, driver, resolution status
  • Ageing Alerts — automatic monthly email listing challans open 30+ and 90+ days
  • Status Tracking — 7 resolution states: Pending, Court, Paid Online, Deducted – Pending Remittance, Deducted & Remitted, Disposed, Under Review

Screenshots

WhatsApp Image 2026-04-04 at 1 28 30 PM


Tech Stack

Component Technology
Database Google Sheets
Backend Google Apps Script
Frontend HTML + CSS + Vanilla JavaScript
Hosting Google Apps Script Web App (free)
Email Alerts Gmail via Apps Script

No frameworks. No npm. No build step. Just paste and deploy.


Prerequisites

  • A Google account (Gmail / Google Workspace)
  • The E-Challan Master Register Google Sheet (template provided below)
  • Basic comfort with copy-pasting — no coding required

Setup Instructions

Step 1 — Make a copy of the Google Sheet template

  1. Open the template sheet: (https://docs.google.com/spreadsheets/d/10ZuWwrG9CYW4xUvmbKDmqkFAEpB47hNFeduAkCCwWaM/edit?usp=drivesdk)
  2. Click File → Make a copy
  3. Save it to your Google Drive
  4. Note the exact name of the Master Register tab at the bottom — you will need it in Step 3

Step 2 — Open Apps Script

  1. In your Google Sheet, click Extensions in the top menu
  2. Click Apps Script
  3. A code editor opens in a new tab

Step 3 — Add the backend code

  1. You will see a file called Code.gs on the left panel
  2. Click on it, select all the existing code, and delete it
  3. Open the file ChallanWebApp.gs from this repository
  4. Copy the entire contents and paste it into Code.gs
  5. At the top of the file, find the CONFIG section and update:
AUTHORISED_USERS: [
  "yourname@gmail.com",       // ← replace with your actual email
  "colleague@gmail.com",      // ← add more emails as needed
],

SHEET_NAME: "Master Register",  // ← must match your sheet tab name exactly

Step 4 — Add the frontend

  1. On the left panel in Apps Script, click the + icon next to "Files"
  2. Select HTML
  3. Type exactly index as the name (no capital letters, no extension)
  4. A file called index.html appears
  5. Delete any default content inside it
  6. Open index.html from this repository
  7. Copy the entire contents and paste it in

Step 5 — Save both files

Press Ctrl + S (Windows) or Cmd + S (Mac) to save. Make sure both Code.gs and index.html show as saved.


Step 6 — Deploy the web app

  1. Click the blue Deploy button in the top right
  2. Click New deployment
  3. Click the gear icon ⚙️ next to "Type" and select Web app
  4. Fill in the settings:
    • Description: E-Challan v1
    • Execute as: Me
    • Who has access: Anyone with a Google account
  5. Click Deploy
  6. Google will ask you to Authorise access — click through and approve
  7. After deployment, you will see a Web app URL — copy and save this link

Step 7 — Test it

Open the URL in your browser. You should see the dashboard load with your data.

Share the URL with your team. Anyone you have added to AUTHORISED_USERS can access it with their Google account.


Step 8 — Set up monthly email alerts (optional)

  1. In Apps Script, in the function dropdown at the top, select setupMonthlyTrigger
  2. Click Run
  3. Approve any additional permissions
  4. Done — you will receive an email on the 1st of every month listing challans open 30+ and 90+ days

To send a test alert immediately: select testAlertNow and click Run.

To update the alert recipients, find this section in ChallanWebApp.gs:

var RECIPIENTS = [
  "your_email@company.com",
  "colleague@company.com",
];

How To Update After Changes

Whenever you update the code (adding users, fixing bugs), you need to redeploy:

  1. Deploy → Manage deployments
  2. Click the pencil ✏️ edit icon
  3. Change version to New version
  4. Click Deploy

The URL stays the same — your team does not need a new link.


Master Register — Column Guide

The sheet uses these columns in the Master Register tab:

Col Field Notes
A Challan Date Format: DD/MM/YYYY
B Vehicle No No spaces or hyphens (e.g. KL08CA1924)
C Vehicle Type From dropdown
D Plant Plant 1 / Plant 2 / Plant 3
E Challan No Full number from e-challan portal
F Offence Charged Description of offence
G Fine (₹) Amount in rupees
H Driver / Operator Name of driver
I Location Where the challan was issued
J Court Status Court or Online Payable
K Resolution Dropdown — must use exact values
L Remarks Free text notes
M Paid Amount (₹) If paid
N Paid Date DD/MM/YYYY
O HR: Deduction Month Month salary deducted
P HR: Confirmed Yes / No
Q Accts: Paid to Authority Yes / No
R Accts: Payment Date DD/MM/YYYY
S Accts: Reference No Payment reference
T Days Open Auto-calculated formula

Resolution Values (use exactly as written)

Value Meaning
Pending No action taken yet
Court Moved to virtual or physical court
Paid Online Company paid on e-challan portal
Deducted - Pending Remittance Deducted from driver salary, company yet to pay authority
Deducted & Remitted Driver deducted AND company paid authority — fully closed
Disposed Court disposed, no payment needed
Under Review Challan not traceable / being investigated

Adding a New Vehicle

When you add a new vehicle to your fleet:

  1. Add a challan for that vehicle in the Master Register sheet
  2. The vehicle will automatically appear in the vehicle dropdown in the web app on the next page load

Customising Vehicle Types

In ChallanWebApp.gs, find the VEHICLE_TYPES array and add or remove types:

VEHICLE_TYPES: [
  "TM", "TOWING VEH", "B-BENZ TIPPER",
  // add your vehicle types here
],

Known Limitations

  • Not real-time — the web app loads data when you open a tab. Use the Refresh button to get latest data if someone else made changes directly in the sheet.
  • Google account required — users must sign in with the Google account you added to AUTHORISED_USERS
  • No Parivahan API integration — challans must be entered manually. Auto-import from the portal is not yet implemented.
  • Single sheet — designed for one company with one Master Register. Multi-company support not included.

Roadmap / Possible Improvements

  • Auto-import challans from Parivahan portal by vehicle number
  • Vehicle-wise report download as PDF
  • WhatsApp notification integration
  • Multi-plant filtering on dashboard
  • Bulk upload of past challans via CSV

Pull requests welcome.


Contributing

This project was built for an internal use case in the Indian fleet management space. If you work in logistics, RMC, construction, or any fleet-heavy industry in India and have ideas or improvements — open an issue or submit a PR.

If you use this and find it useful, a star on GitHub goes a long way.


License

MIT License — free to use, modify, and distribute. See LICENSE file.


Author

Built by Kp — Fleet Coordinator, Grasshopper Mobility, Kerala.

"Built this because we needed it. Sharing it because others do too."

About

Free open-source e-challan tracking system for Indian fleet operators — built on Google Sheets + Apps Script

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors