Checking your workspace…

Dashboard

Good morning β€” here's what's happening at the front desk today
AAdmin Logout
πŸ‘₯
Total Visitors Today
0
↑ live tracking
🏒
Project Enquiries
0
↑ today
🀝
Meetings (AVP / MD)
0
↑ today
🚚
Vendors / Others
0
↑ today

πŸ”„ Live Queue Pipeline

0
Checked In
just arrived
0
Waiting
in lobby
0
In Meeting
with host
0
Checked Out
visit complete

✨ Today's Snapshot

πŸ’¬ WhatsApp Delivery Today

πŸ‘₯ Live Visitors (click a new visitor from the sidebar to check someone in)

NamePurposeMeetIn TimeStatusWhatsAppAction

πŸ“ˆ Last 7 Days Visitor Trend

πŸ“ New Visit Entry

πŸ‘₯ Visitors List

DateNameContactTypeLocation/ProjectPurposeAssignedInOutStatusWhatsAppAction

πŸ”„ Live Queue Pipeline

0
Checked In
just arrived
0
Waiting
in lobby
0
In Meeting
with host
0
Checked Out
visit complete

πŸ—‚οΈ Queue Board

Checked In
0
Waiting
0
In Meeting
0
Checked Out
0

πŸ“‹ Full Queue List

TokenNamePurposeAssigned ToWaiting SinceStatusAction
🏒
All Project Visits
0
πŸ“…
Project Enquiries Today
0
⏳
Currently Waiting
0
🀝
Converted to Meeting
0

🏒 Project-wise Visits

πŸ“Š Purpose-wise Summary

πŸ§‘β€πŸ’Ό Person-wise Summary

πŸ’¬ WhatsApp Delivery Report

0Sent
0Delivered
0Failed
0Pending
Per-visitor send/delivery history is available from the WhatsApp icon next to each visitor.

⏱️ Average Time in Building

β€”
Based on check-in to check-out time, checked-out visitors only.

πŸ” Repeat Visitors

Contacts with more than one visit on record, most frequent first.
NameContactVisitsLast VisitLast Purpose
πŸ”’
Data security recommendation: secure your Firebase Realtime Database with Firebase Authentication + security rules (not left fully public) before going live, since visitor names, phone numbers and visit history are personal data. In the Firebase console go to Realtime Database β†’ Rules and restrict read/write to authenticated requests only, then set an Auth Token above. Also confirm this app is only ever opened over https://, never plain http://, so data in transit is encrypted.

πŸ”₯ Firebase Live Database

Connected project: tncd-visitor-management. Firebase is the main online database. Visitor check-in, status updates, checkout and deletion are synchronized automatically.

πŸ“„ Google Sheets Backup

Google Sheets is retained as a backup and reporting copy. Firebase remains the primary database.

πŸ”„ Data Synchronization

0Records In This Session
β€”Firebase Records
β€”Google Sheet Records
Recommended flow: configure Firebase first, test it, upload existing local records once, then configure Google Sheets for automatic backup.
⚠️
Important for local files: when this HTML file is opened from your Downloads folder and gets re-downloaded (e.g. as "..._1.html", "..._2.html"), each filename is treated as a separate storage location by the browser. Access Token, Template Parameter Config and other settings saved on one file do not carry over to a renamed copy. Keep working from one saved file path, or re-enter and re-save settings here after opening a new copy.

πŸ’¬ WhatsApp API Configuration

Use the direct SmartiConnect URL only when CORS is enabled for your website. Recommended: enter your Cloudflare Worker proxy URL here. The proxy must forward the request to https://app.smarticonnect.com/api/send/template.
Optional: point this at a proxy endpoint that accepts ?messageId= and returns SmartiConnect's latest delivery status. When set, the "Check Status" button in each visitor's WhatsApp popup performs a live lookup instead of only showing the last known status.
πŸ”’ Security note: a production API token should normally be stored in a secure backend, not inside a public HTML file.

πŸ—ΊοΈ Stage-wise Approved Template Mapping

Only SmartiConnect / Meta-approved templates are used. The five TNCD stage templates are pre-mapped. Future approved templates can be added below without changing the code.

οΌ‹ Add Future Approved Template

🧩 Template Parameter Configuration

Each approved WhatsApp template has a fixed number of {{1}}, {{2}}... body variables, and may also have a media header (e.g. Image), as set on Meta / SmartiConnect's side. Both must exactly match what was approved β€” a wrong parameter count causes error #132000, and a missing/incorrect header causes error #132012 "Format mismatch". Check the template's approved content in your SmartiConnect / Meta Business dashboard to confirm both.

βœ… WhatsApp Send & Delivery Status

β€œAPI Accepted” means SmartiConnect accepted the request. Delivered/Read confirmation shows once SmartiConnect returns that status, a delivery webhook updates the app, or an advanced status check is run. Full history per visitor is available from the circular WhatsApp icon next to their name on any visitor list β€” click it to open, send, and check status.

☁️ Cloudflare Worker Proxy Code

Create a Cloudflare Worker, add a secret named SMARTICONNECT_TOKEN, paste this code, deploy it, then enter the Worker URL above.
export default {
  async fetch(request, env) {
    const cors = {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Headers": "Content-Type, Authorization",
      "Access-Control-Allow-Methods": "POST, OPTIONS"
    };
    if (request.method === "OPTIONS") return new Response(null, { headers: cors });
    if (request.method !== "POST") return new Response("Method not allowed", { status: 405, headers: cors });

    const body = await request.text();
    const response = await fetch("https://app.smarticonnect.com/api/send/template", {
      method: "POST",
      headers: {
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": `Bearer ${env.SMARTICONNECT_TOKEN}`
      },
      body
    });
    return new Response(await response.text(), {
      status: response.status,
      headers: { ...cors, "Content-Type": response.headers.get("Content-Type") || "application/json" }
    });
  }
};

🩺 Last Send Diagnostics

The exact request this app sent and the exact response SmartiConnect returned for the most recent WhatsApp send attempt β€” useful to paste into a SmartiConnect support ticket if a send keeps failing.

βž• Create Login Credential

πŸ”‘ Default access by role
Admin β€” every page, including Visit Entry Options, WhatsApp API, Firebase/Sheets and Login Access.
Reception β€” Dashboard, New Visit Entry, Visitors List, Queue, Projects, Reports and WhatsApp sending.
Viewer β€” read-only: Dashboard and Reports only.
Use the checkboxes above, or "Edit Access" on any existing user, to grant or remove individual pages beyond these defaults.

πŸ”‘ Login Users

NameUsernameRoleStatusLast LoginLast LocationAction
πŸ”’ Passwords are hashed (SHA-256) before being stored β€” even from this admin screen, existing passwords cannot be viewed, only reset.

πŸ•’ Login Activity

Every sign-in, with device and an approximate location looked up from the signing-in device's IP address. Location is best-effort β€” it will show "Unavailable" if the lookup is blocked or there's no internet at that moment.
TimeNameUsernameRoleDeviceApprox. Location