Subcontractor Jobsite Safety Muster & Daily Shift Sign-off… — ⏤͟͞ROCODER — TG.ME

🏗️ Subcontractor Jobsite Safety Muster & Daily Shift Sign-off

Subcontractors on active commercial build sites refuse to install bloated native apps just to clock in and confirm their morning hazard walkthrough. Wiring Telegram's persistent reply keyboards directly to Firebase lets field crews tap physical, chunky buttons without peeling off their work gloves. Workers punch in, their muster timestamps push directly into your database, and clocking out cleanly dismisses the custom keyboard from their screen.

📁 Filename: shift.js
👨‍💻 Code:
sendReplyKeyboard("👷 *Jobsite Check-in Active*\nSelect your shift status below:", [
["/checkin", "/safety_ok"],
["/signoff"]
], "Markdown");


📁 Filename: checkin.js
👨‍💻 Code:
const stamp = new Date().toISOString();
pushDB("jobsite_logs", {
worker: user.first_name,
telegram_id: user.id,
event: "clock_in",
timestamp: stamp
});
sendMessage(` Clock-in recorded for *${user.first_name}* at \`${stamp.slice(11, 19)} UTC\`.`, { parse_mode: "Markdown" });


📁 Filename: safety_ok.js
👨‍💻 Code:
pushDB("safety_audits", {
worker_id: user.id,
worker_name: user.first_name,
status: "ppe_verified",
timestamp: Date.now()
});
sendMessage("🦺 *Safety briefing acknowledged.* Morning PPE check logged.", { parse_mode: "Markdown" });


📁 Filename: signoff.js
👨‍💻 Code:
pushDB("jobsite_logs", {
worker_id: user.id,
event: "clock_out",
timestamp: Date.now()
});
removeKeyboard("👋 Shift complete. Custom keyboard cleared. Drive safe!");


💡 When sending command strings inside reply keyboard rows, match each button text to an exact file in /command so taps route instantly without touching a fallback parser.

⚠️ Note: Set FIREBASE_URL and FIREBASE_SECRET in your environment so pushDB can persist log entries directly to your Realtime Database.


#FlexGram
👍1👌1
September 3, 2026 8