A simple mobile-friendly worker check-in/check-out page for Fateh Plumbing & Electric. It can be published as a public GitHub Pages site while keeping worker PINs inside Google Sheets / Apps Script.
- Open the site on their phone.
- Enter their name and PIN.
- Optionally enter the job and notes.
- Allow location.
- Tap Check In or Check Out.
The app records the local time, GPS location, action, worker name, optional job, and optional notes.
- Create a new Google Sheet.
- Go to Extensions > Apps Script.
- Delete the starter code and paste in
google-apps-script/Code.gs. - Click Save.
- Select the
setupfunction, click Run, and allow permissions. This creates the sheets. - In the
Workerssheet, add workers like this:
| Name | PIN | Active |
|---|---|---|
| Jas | 4321 | TRUE |
| Aman | 7788 | TRUE |
Use the exact name the worker will type. Set Active to FALSE to disable a worker.
- In Apps Script, click Deploy > New deployment.
- Choose Web app.
- Set Execute as to Me.
- Set Who has access to Anyone.
- Click Deploy and copy the Web App URL.
- Paste that URL into
config.js:
window.FATEH_TIME_CONFIG = {
scriptUrl: "https://script.google.com/macros/s/YOUR_SCRIPT_ID/exec",
};To confirm the deployed Apps Script is the current version, open this JSONP test URL:
https://script.google.com/macros/s/AKfycbyzQvufVp_j5I26De7iGxwf5YNNMpLOcKin_Rn4mCUbWGFhxfEBnm8rNDLzxvYsk2mE/exec?action=CHECK_STATUS&pin=6963&callback=test
If PIN 6963 is blocked in the Workers sheet, the response should include:
"Your access is blocked. Please contact the company."
- Push these files to a public GitHub repository.
- In GitHub, open Settings > Pages.
- Set the source to the main branch and root folder.
- Send the GitHub Pages link to workers.
- PINs are not stored in the public website code.
- GPS requires HTTPS, so GitHub Pages is a good fit.
- The Google Sheet is the source of truth for workers and time logs.
- Job and notes are optional.