🏪
KALAKAL Hub
🏪 Hub 🖥️ POS Main ⚡ SUPER ADMIN
📡 Live Platform
📦Orders today
🏪Active stores
Pending orders
📅Orders this week
⚠️Dead stores
Total Stores
Open Now
Featured
Hidden
🧪 Test Stores
Total Products
Needs Attention
⚡ Bulk actions (applies to stores currently shown below):
Store Town Type Status Health Score Orders Today Products Flags Actions
📋 Admin Action Log (this session)
No actions yet this session.
⭐ Featured Products Max 5
Manually pick products to appear in the Hub homepage "Featured Products" section.
Loading...
🗺️ Hub Regions Commerce Zones
Define commerce regions and which cities belong to each hub. A city can appear in multiple hubs (e.g. Tacloban in both Leyte and Samar). Stores whose city matches will appear in that hub's search.
Loading regions...
Hub ID (no spaces)
Hub Name
Cities (comma-separated)
⭐ Featured Stores Max 5
Manually pick stores to appear in the Hub homepage "Featured Stores" section.
Loading...
🏷️ Set Business Type per Store
Tag each store with a business type. This enables the Hub business type filter for buyers.
Loading stores...
🚨 Emergency Delivery Fare Multiplier
Business policy, not hardcoded (ADR-014 Part C) — how many times the normal fare an Emergency Responder driver earns.
x normal fare

🚚 Transport Partner Applications

Review license, police clearance, and vehicle registration before approving.

Loading applications...

👥 People Directory

Hanapin ang kahit sinong driver, sender, o receiver — makita ang buong history, warning status, at gumawa ng action.

Loading...
Real merchant usage against KALAKAL Free/Growth/Pro capacity — the pilot's pricing laboratory. Numbers here are launch hypotheses being tested, not final thresholds.
In Pilot
Pilot Ended
Over Capacity
Median Products
Median Inventory
Reads each store's commercial doc — may take a moment for large store counts.
StorePlanPilot StatusProductsInventory ValueOnline Orders (mo)Upgrade Triggers
Click "🔄 Refresh" or open this tab to load.

📖 Hub Admin — User Manual

Read this before using any buttons. Some actions are permanent.

TOOLBAR BUTTONS
🔄 Refresh
Reloads all store data from Firestore. Safe to click anytime. No data is changed.
🔧 Repair Missing Stores
Scans ALL POS client accounts and creates a Hub listing for any store that is not yet visible in the Hub. Use this once to fix old accounts registered before the Hub listing feature was added. It skips stores already listed — it will NEVER overwrite or delete existing Hub data. Safe to run multiple times.
🗺️ Repair Hub Assignments
Assigns primaryHub and servingHubs to all existing stores that were registered before the hub zone system was added. You will be asked which Hub ID to assign (e.g. "leyte"). Stores that already have a hub assignment are SKIPPED — never overwritten. Run this once after first deployment to bring all old stores into your first hub. Safe to run multiple times.
Filter: All / Open / ⭐ Featured / Hidden / ⚠️ Dead
These are VIEW FILTERS only — they do NOT delete anything. They just change which stores you see in the table. "Dead" means stores with 0 products and 0 orders — they still exist, they just have no activity yet. Clicking any filter is 100% safe.
PER-STORE ACTION BUTTONS
🔗 View
Opens the store's online order page in a new tab. No data changed. Safe.
⭐ Feature / Unfeature
Marks a store as Featured so it appears at the top of the Hub with a star badge. Reversible — you can unfeature anytime. Does NOT delete anything.
👁 Hide / Unhide
WARNING: This makes the store invisible to the public in the Hub. The store still exists — it is NOT deleted. The store owner can still log in to their POS. You can unhide it anytime by clicking the button again. Use this for suspended or problematic stores.
📋 Plan Dropdown (— Set Plan — / POS Only / Hub Only / Full Suite)
Changes the store's subscription plan. A confirmation dialog will appear before any change is saved. "POS Only" will automatically hide the store from the public Hub. Will ask for confirmation before executing.
🗑 Delete (Trash Icon)
⚠️ PERMANENT — CANNOT BE UNDONE. This removes the store from the Hub directory and deletes all its Hub products. The POS account and sales data are NOT affected — the store owner can still log in. But their store will no longer appear in the Hub and must be re-added manually. Only use this if a store owner requests removal or for spam/fake stores.
TRANSPORT PARTNERS (🚚 TAB)
🪪 Relaxed Onboarding — Valid ID + Vehicle Photo First
Applicants only need a Valid ID and a vehicle photo to apply now — License and Police Clearance are deferred, submittable within 30 days after approval. If you don't manually review an application within 24 hours, it auto-approves at Basic tier — this keeps drivers from waiting indefinitely, but means some approvals will happen without your direct action. If a driver still hasn't submitted License/Clearance 30 days after going live, their account auto-suspends and you're notified. Watch the Admin Notifications panel above this tab for both events.
✅ Fully Verified vs ⚠️ Basic Verified
A driver with all 3 documents on file — Driver's License, Police Clearance, and Vehicle Registration (OR/CR) — is tagged Fully Verified and can accept any request type, including Emergency and Buy-For-Me. A driver missing any of the three (whether from the relaxed onboarding grace period, or simply never submitting OR/CR) is tagged Basic Verified and is restricted to standard Send-a-Package requests only — this is enforced at the database level (Firestore rules), not just hidden in the app, so it can't be bypassed. The badge shows on every partner card so you can see tier at a glance during review.
Approve / Reject / Suspend / Reactivate
Standard review actions on a pending or existing driver application. Approve makes them eligible to receive delivery requests. Suspend immediately stops them from receiving new requests (does not delete their account or history). All actions ask for confirmation first.
🧹 Find Test Accounts
Review tool, not an auto-delete button. Scans all transport partner records for names matching common test/demo patterns (test, demo, sample, dummy) or known placeholder phone numbers, and shows them in a list. Nothing is deleted automatically — you review each one individually and click Delete only for the ones you confirm are actually test data. Deletion is permanent.
PEOPLE DIRECTORY (👥 TAB)
One search box for everyone
Opens by default showing everyone with at least one report on file, worst offenders first — the actual useful starting point when a complaint comes in and you don't yet know who it's about. Search by name or phone to find someone specific instead.
Direct actions from the profile view
Suspend/Reactivate for drivers, Block/Unblock for senders and receivers — no need to leave the directory or hunt through other tabs. The "Itago sa Publiko" (Hide from Public) button next to any public report lets you manually redeem it once a dispute is genuinely resolved with both parties — the report stays in the permanent internal record either way, only its public visibility changes.
ACCOUNTABILITY SYSTEM — HOW REPORTS ESCALATE
The 4-strike structure — applies to both drivers and senders
Report #1 — First Warning, stays completely private (only you and the reported party know).
Report #2 — Last Warning, becomes public from here on (shown on the driver's bid card, or triggers the sender's own warning notification).
Report #3 — Final Warning, also public.
Report #4 — Auto-suspends the driver, or auto-blocks the sender/receiver (via the existing blocked_contacts system) — pending your investigation.
Warnings never expire on their own
A report from a year ago still counts toward the 4-strike total. The only two ways a specific report stops showing publicly: you manually clear it from the People Directory once a dispute is genuinely resolved, or the driver earns 5 genuinely good reviews (4-5 stars) after that report's date, which auto-hides it. Either way, the underlying report and strike count are permanent — only public visibility changes.
STATS CARDS (TOP OF PAGE)
Total Stores — all stores in hub_stores collection.
Open Now — stores with isOpen = true.
Featured — stores marked as featured.
Hidden — stores hidden from public view (still exist).
Total Products — all products listed across all stores.
Needs Attention — stores with 0 products AND 0 orders (Dead stores). These are likely new accounts that haven't added products yet.
QUICK REFERENCE — SAFE vs PERMANENT
✅ ALWAYS SAFE (reversible):
Refresh, Filter buttons, View, Feature/Unfeature, Hide/Unhide, Plan change, Repair Missing Stores, Repair Hub Assignments, Hub Regions save/delete, Transport Partner Approve/Reject/Suspend/Reactivate, Find Test Accounts (scan step)
⚠️ PERMANENT (cannot undo):
🗑 Delete (trash icon) — removes store from Hub permanently. 🗑️ Delete inside Find Test Accounts — removes a transport partner record permanently.
HUB CONFIG TAB
🗺️ Hub Regions — Commerce Zones
Define the commerce zones for the platform. Each region has a Hub ID (e.g. "leyte"), a Hub Name (e.g. "Leyte Hub"), and a list of included cities (comma-separated).

A city can appear in multiple hubs — for example, Tacloban can be in both Leyte Hub and Samar Hub because it is an economic center for both areas.

First-time setup: Add Leyte Hub first with all cities in Leyte, then run 🗺️ Repair Hub Assignments from the Stores tab.
⭐ Featured Products / Featured Stores
Manually curate which products and stores appear in the Hub homepage spotlight sections. Max 5 each. These are fully reversible — add and remove anytime.
🏷️ Business Type per Store
Tag each store with a business type (e.g. Grocery, Restaurant, Pharmacy, Spa). This enables the business type filter chips on the Hub landing page for buyers.
HOW COMMERCE HUBS WORK
When a user selects a Hub Region in the Hub (e.g. Leyte Hub), the system shows only stores that match ANY of these conditions:

1. The store's servingHubs array includes that hub ID
2. The store's primaryHub equals that hub ID
3. The store's city/town is in the hub's includedCities list (fallback for older stores)

New stores registered after the hub system was deployed automatically get primaryHub: "leyte". Old stores need the 🗺️ Repair Hub Assignments button run once.
⚠️
Are you sure?
This action cannot be undone.