TCB Shopz — Developer & SEO Documentation

Internal reference for junior/senior developers and SEO/digital marketers. Not linked publicly, not indexed.

1. Project Overview

TCB Shopz (The Coins Bureau Shopz, tcbshopz.com) is a PHP/HTML5/CSS3/JavaScript website with no framework dependency, running on standard Apache/Linux hosting. It connects the USA and Cameroon through personal shopping (Shop-For-Me), two-way shipping, gift delivery, and gift card exchange. See Project Transmission Document_ TCB Shopz Website Development.md for the full historical build log (V1–V8), and all_forms_to_crm.md for the original Zoho CRM integration brief this build follows.

Forms POST via AJAX to process_*.php handlers, which send email through Brevo, log leads into Zoho CRM, and redirect the browser (client-side, via JSON redirect field) to thank-you.php.

2. File Structure

PathPurpose
includes/header.php / includes/footer.phpGlobal layout, nav, meta tags, JSON-LD, analytics, WhatsApp/Tawk.to widgets — the ones actually used by every page.
header.php / footer.php / main.js (root)Legacy/unused — not included by any page. Safe to delete once confirmed; kept for now to avoid unrelated churn.
assets/css/style.css + style.min.cssSite-wide styling. No build/minify tool in this repo — the two files must be kept identical (copy one over the other) after any CSS change, since includes/header.php loads style.min.css.
assets/js/main.js + main.min.jsMobile nav toggle, hero slider, AJAX form handling. Same "keep both in sync" rule as CSS.
assets/js/whatsapp-button.js + assets/css/whatsapp-button.cssFloating WhatsApp button + pre-chat lead-capture modal.
includes/zoho-config.phpZoho CRM credentials. Never commit real secrets to a public repo. Blocked from direct web access by includes/.htaccess.
includes/zoho-client.phpZohoCRM class: token refresh/cache, createLead(), testConnection().
includes/brevo-api.phpBrevoEmailService class for transactional email.
includes/geolocation.phpGeolocationService — IPgeolocation.io wrapper, used for lead context and fraud signals.
includes/b2-storage.phpBackblaze B2 client for career résumé uploads.
process_contact.php / process_order.php / process_career.php / process_whatsapp_lead.phpForm handlers. All follow the same pattern: sanitize → validate → send Brevo email → push Zoho lead (non-blocking) → return JSON with redirect.
thank-you.phpShared success page for all form types (?type=contact|order|career). noindex. Has a hidden test panel at ?debug=1.
check_server.phpPHP/server environment compatibility check.
diagnostics.phpIntegration config/connectivity checker — never prints live secrets, only masked previews.
robots.txt / llms.txt / sitemap.xmlCrawler and AI-agent access files. See §8.
.htaccess (root) / includes/.htaccessSecurity headers, gzip/caching, blocks .bak/.log downloads, denies all direct access to /includes/.

3. Quick Start by Role

Junior Developer

  1. Every page starts with include 'includes/header.php' and ends with include 'includes/footer.php' — set $pageTitle / $pageDesc (and optionally $pageNoIndex = true;) before the header include.
  2. To change global nav/footer/logo/phone number, edit only includes/header.php / includes/footer.php — never the root-level duplicates.
  3. After any CSS/JS edit, copy the file over its .min. counterpart (no build tool exists here).
  4. Test forms locally with php -S localhost:8000 from the project root.

Senior Developer

  1. Zoho/Brevo pushes are intentionally non-blocking and wrapped in try/catch — a CRM or email outage must never break the visitor-facing JSON response. Preserve this pattern in any new handler.
  2. ZohoCRM::createLead() requires "trigger":["workflow"] in the payload to fire CRM workflow emails — do not strip it.
  3. Token caching lives in includes/zoho_token.json (gitignore this), refreshed 5 minutes before expiry.
  4. See §11 for the two unresolved data items (US phone number, ZIP code) before any further contact-info edits.

SEO / Digital Marketer

  1. Every page's $pageTitle/$pageDesc feed the <title>, meta description, Open Graph, and Twitter Card tags automatically — edit those two variables, not the head markup.
  2. llms.txt is the AI-answer-engine equivalent of a meta description for the whole site — update it whenever pricing or service structure changes.
  3. New pages must be added to sitemap.xml and, if customer-facing, to includes/header.php nav + includes/footer.php links.
  4. See §8 for content-depth and heading-structure guidelines.

4. Integrations

ServiceUsed ForConfig Location
Brevo (SMTP API)Order/contact/WhatsApp-lead transactional emailincludes/brevo-api.php
Zoho CRM (API v8)Lead capture from all three sources (contact, order, WhatsApp)includes/zoho-config.php
IPgeolocation.ioApproximate location on lead submissionsincludes/geolocation.php
Backblaze B2 (S3-compatible)Career résumé storageincludes/b2-storage.php
Google reCAPTCHA v2Spam protection on all formsInline site key in each form page
Google Analytics (gtag)Traffic analyticsincludes/header.php (loads on every page)
Tawk.toLive chat widget, pinned bottom-leftincludes/footer.php

Run diagnostics.php any time to see which of the above are configured, and check_server.php to verify the PHP/hosting environment itself.

5. Zoho CRM Setup

Full step-by-step is in all_forms_to_crm.md; summary below.

  1. Log in to api-console.zoho.com with the account that owns Org 888320108 (The Coins Bureau Shopz).
  2. Open the Self Client → Generate Code tab.
  3. Scope: ZohoCRM.modules.leads.ALL,ZohoCRM.modules.deals.ALL,ZohoCRM.settings.READ
  4. Duration: 10 minutes. Copy the generated code (starts with 1000.) — it is single-use and expires fast.
  5. Immediately exchange it:
    curl -X POST "https://accounts.zoho.com/oauth/v2/token" \
      -d "grant_type=authorization_code" \
      -d "client_id=1000.IR6C6WKA5T16NNMJXTNY9D4RP7SCZL" \
      -d "client_secret=<client secret>" \
      -d "code=PASTE_GRANT_CODE_HERE"
  6. Paste the returned refresh_token into includes/zoho-config.php. This is the only credential the site needs long-term — it does not expire unless revoked.
  7. Confirm on diagnostics.php with the "Test Zoho Connection" button.

TODO As of this build, includes/zoho-config.php ships with client_id/client_secret filled in but an empty refresh_token — the CRM push is currently a safe no-op (logged, never breaks the visitor flow) until someone with Zoho console access completes the steps above. Two different Client IDs were found across project docs during this build (...R7SCZL in all_forms_to_crm.md vs ...KPEG in self_client_CRM+ZOHO.json) — the guide's ID was used; confirm this is the intended one before generating the grant code.

6. WhatsApp Lead Capture

The floating WhatsApp button (assets/js/whatsapp-button.js) is bottom-right, green, pulsing/bouncing to draw attention. Clicking it opens a modal asking for name, WhatsApp number, and email (optional) before handing the visitor off to wa.me. On submit:

  1. A fetch(..., {keepalive: true}) POST fires to process_whatsapp_lead.php — fire-and-forget, survives the page navigation.
  2. process_whatsapp_lead.php emails contact@tcbshopz.com + thecoinsbureau@icloud.com via Brevo, and pushes a Lead to Zoho CRM with Lead_Source = "Website - WhatsApp Button".
  3. window.open() immediately sends the visitor to wa.me/237670931202 with a pre-filled, personalized message.

The handler is designed to always respond success even if Brevo/Zoho fail — a backend hiccup must never block someone from reaching WhatsApp.

Tawk.to live chat is pinned bottom-left via Tawk_API.customStyle in includes/footer.php, specifically so it never overlaps the WhatsApp button.

7. Testing the Submission Pipeline

ToolWhat It Checks
check_server.phpPHP version, cURL/OpenSSL/JSON extensions, upload limits, required files present
diagnostics.phpWhich integrations are configured (masked, no secrets shown) + a live Zoho token-refresh test
thank-you.php?debug=1Confirms which form type actually redirected here, plus a manual end-to-end checklist

This build's automated verification covered UI/JS behavior only (modal open/validate, form submit → redirect) via browser automation against a local php -S server — it did not make live calls to Brevo/Zoho with real secrets. Run the manual checklist on thank-you.php?debug=1 against a live/staging deployment before considering the CRM/email pipeline fully verified.

8. SEO & GEO (AI Search) Setup

On-page

Every page sets $pageTitle and $pageDesc before including includes/header.php, which auto-generates: <title>, meta description, canonical URL, Open Graph tags, Twitter Card tags, and a sitewide LocalBusiness JSON-LD block. Content pages use a single <h1>, <h2> for major sections, <h3>/<h4> for sub-points, and comparison tables (.pricing-table / .table-responsive) where structured data helps both users and AI summarizers.

Crawler access

FilePurpose
robots.txtExplicitly allows major search bots and AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, CCBot, etc.); disallows /includes/, form processors, and dev-only tools.
llms.txtMachine-readable site summary in the emerging llms.txt convention — key facts, page index, and citation notes for AI answer engines.
sitemap.xmlAll customer-facing pages, referenced from robots.txt.

Content depth guideline

Primary service/landing pages target ~800–1200 words of unique content with a full heading hierarchy and at least one data table where relevant (pricing, comparisons, process steps). Utility pages (privacy, terms) prioritize completeness and clarity over word count. thank-you.php, diagnostics.php, and check_server.php are intentionally noindex — they're conversion/dev tooling, not search-facing content.

9. Brand Identity Reference

TokenValueSwatch
--primary-blue#0F4C81
--primary-gold#D4AF37
--secondary-blue#0A365C
WhatsApp green#25D366 (hover #1EBE5D)

Logo: https://tcb-media.s3.us-east-1.amazonaws.com/images/TCBSHOPZ/the_coin_bureau_shopz_logo.png (rectangular, transparent background). Used at ~54px height in the header and ~44px in the footer with a filter: brightness(0) invert(1) applied so the transparent-background mark reads clearly on the dark footer gradient. A local copy also lives in /logo/ for design reference — the live site pulls from the S3 URL directly, consistent with how every other site image is served.

10. Responsive / Mobile Notes

11. Known TODOs & Open Items

ItemStatusNotes
Zoho refresh_tokenTODOGenerate per §5 and paste into includes/zoho-config.php. CRM push is a safe no-op until then.
US phone/WhatsApp numberUnverifiedThe flyer's "+1 555 971-6317" is not a valid US number format (555 is a fictional exchange code). Left as "coming soon" sitewide until a real number is confirmed.
ZIP codeResolvedConfirmed 20708 (site value) over the flyer's 20707.
wp-config.php.bakSecurityLeftover WordPress DB credentials file found in project root, unrelated to this site. Blocked via root .htaccess during this build; recommend deleting it outright.
Legacy root header.php/footer.php/main.jsCleanupUnused duplicates of the real includes/ versions. Not referenced anywhere; safe to delete after confirming with the team.
services.phpFixedWas linked from nav/footer on every page but did not exist (404). Created during this build.
CSS/JS "minified" filesProcess gapNo build tool exists in this repo — style.min.css/main.min.js are plain copies of their source files, not actually minified. Fine functionally; consider adding a real build step later.