Welcome, Ernie — WebCoPilot 2.0 Onboarding Guide

Prepared by: GitHub Copilot (Claude Opus 4.6) — AI pair programmer
Date: February 24, 2026
Audience: Senior ColdFusion developer joining the project

What Is This Project?

WebCoPilot 2.0 is a ColdFusion-based CMS/marketplace platform originally built circa 2000. It powers a network of community shopping websites (think early Amazon marketplace meets local community directories). Each site has a storefront, event calendar, ad marketplace, and member portal. This specific installation runs mensprayerbreakfast.com — a men's prayer breakfast community site.

The system has been under active modernization since mid-2025, focusing on:

  1. Security — SQL injection hardening (~1,100 injection points across ~425 files)
  2. ColdFusion 2023 compatibility — removing deprecated tags (cflayout, cftooltip, cfdiv, cfajaximport)
  3. Bootstrap 5 UI modernization — replacing legacy tables/framesets/ActiveX with BS5 cards, DataTables, responsive layouts
  4. Delete infrastructure — converting hard DELETEs to soft-delete with UnDelete/HardDelete workflow
  5. Email masking — Alias system to hide email addresses from URLs and admin displays
  6. Local cart — replacing dead external checkout (secure.ntwrk.net) with local AJAX cart module
  7. Chapter network — multi-tenant provisioning for church chapters across cities

Your Key Reference Files

FileWhat It ContainsLines
.github/copilot-instructions.mdTHE BIBLE — every pattern, convention, table mapping, column rule, and CSS class. AI sessions are bound by these rules.~1,200
CLAUDE.md (site root)Tech stack, DB credentials, key paths, widget system architecture, Google Maps API key~200
CustomTags/CLAUDE.mdCF Admin JDBC details, button standards, card header style, calendar form paths~100
_session_changelog.txtComplete history of every session's changes — files modified, DB alterations, decisions made5,620

Read copilot-instructions.md first. Everything else is supplementary.


Tech Stack At a Glance

ComponentVersion / Detail
App ServerColdFusion 2023 Enterprise (Java 17+) on IIS 10 / Windows Server 2022
DatabaseSQL Server 2016, host sql-2016, sa/Gfyse2013
Primary DSNmensprayerbreakfast_com → DB Mensprayerbreakfast_com
Secondary DSNmensprayerbreakfast_com_2 → DB Mensprayerbreakfast_com_2
Global DBGlobal_Webstore (shared cross-site hub, 44 tables)
Billing DBbilling via DSN 3pb1 (site registry, DSN lookups)
SMTPntwrk.sendio.com — every cfmail MUST include server="ntwrk.sendio.com"
Front-EndBootstrap 5.3.3, Bootstrap Icons 1.11.3, jQuery 3.7.1, DataTables 1.13.7 (all CDN)
Site RootE:\m\mensprayerbreakfast.com\
Custom TagsC:\ColdFusion2023\cfusion\CustomTags\NewTags\

Git Repos

RepoRemoteContent
E:\m\mensprayerbreakfast.comWebCopilot2026/webcopilot (private)Main site code
C:\ColdFusion2023\cfusion\CustomTagsWebCopilot2026/WcpCustomTags (private)Custom tags

SQL Server Access (PowerShell)

Import-Module SqlServer
Invoke-Sqlcmd -ServerInstance "sql-2016" -Username "sa" -Password "Gfyse2013" `
  -Database "Mensprayerbreakfast_com" -TrustServerCertificate -Query "SELECT ..."

Architecture: How Pages Work

The Widget System

Pages aren't flat HTML files — they're assembled from Layout Pages containing Widgets arranged in Columns.

Request → bsPage.cfm → queries Layout_Pages → calls <cf_Widget_Handler> per column
                              ↓
                     queries Widgets table → loops each widget
                              ↓
                     <cfswitch> on Widget_Name → renders "HTML", "Page", "DynamicInclude",
                                                 "Gallery", "Calendar", "AdSpace", etc. (100+ types)

The Custom Tags

Called as <cf_tagname> → maps to tagname.cfm in CustomTags\NewTags\. Key ones:


The Five Patterns You Must Know

1. Soft-Delete Convention (NEVER hard delete)

Every table has its own "deleted" value:

Normal delete → UPDATE SET active_col = deleted_value  (soft-delete)
Un-delete    → UPDATE SET active_col = 1               (restore)
Hard delete  → DELETE WHERE active_col = deleted_value  (only removes soft-deleted records)
TableColumnActiveDeleted
Calendaractive1/NULL2
Layout_Pagesactive117
PagesIsActive12
SponsorsIs_Active12
ColorsActive12
ProductsDiscontinued02
OrdersOrderStatus(any)'Deleted'

NEVER use BIT columns for active/status. Always TINYINT. BIT breaks soft-delete values >1 and Query-of-Query filtering.

2. The Gold Standard Admin Page

Every admin search page follows this template:

Dark header bar (#1a1a2e) → Toolbar card → Results card with DataTable

DataTable column order (MANDATORY):

Checkbox | ...data columns... | Actions | Status/✓ | ID

Action buttons use .act pill classes (7 colors, text-only, 7pt font):

3. Security: cfqueryparam Everywhere

Every SQL parameter MUST use cfqueryparam. No raw variable interpolation in queries.

<!--- WRONG --->
WHERE ID = #url.ID#

<!--- RIGHT --->
WHERE ID = <cfqueryparam value="#url.ID#" cfsqltype="cf_sql_integer">

For ORDER BY direction, use whitelist validation (can't parameterize):

<cfset _dir = ListFindNoCase("ASC,DESC", url.dir) ? url.dir : "ASC">

4. Ownership Model (Two FK Patterns)

Most ownership uses Email_Username (string FK): Layout_Pages.Owner, Pages.Owner, Links.Owner, Colors.Owner, Calendar.Username, Widgets.Username

Products and Orders use Sponsor.ID (integer FK): Products.Owner, Orders.Owner

Workgroup = comma-delimited list of usernames a user can see/manage. Admin1 workgroup contains ALLBOX (sees everyone).

5. Alias System (Email Masking)

Email_Username is the internal FK (NOT changed). Alias is a display-friendly identifier shown in URLs and admin columns instead of the raw email.

URL resolution: if url.owner matches an Alias, it's translated to Email_Username before any query runs.


What's Been Done (Summary of ~20 Sessions)

Security (completed)

CF2023 Compatibility (completed)

Admin Pages Modernized to Gold Standard (~40 pages)

E-Commerce (completed)

Members Portal (completed)

Chapter Network (completed)


Active/Recent Work

File Manager (Members/dirlist.cfm) — Just Finished

The file manager now uses a deferred commit workflow:

  1. Upload → files on disk + tn200/tn1280 thumbnails. NO database write.
  2. Rename / Bulk Rename → works on disk only. Uncommitted files shown with amber NEW badge.
  3. Save to Gallery → green button scans directory, INSERTs new files to global_Images, soft-deletes orphaned records, rebuilds Gallery_ImageList.

Files Still Pending Modernization


How to Navigate

AreaEntry PointKey Files
Admin panel/admin.cfmBS5 sidebar iframe layout
Public pages/bsPage.cfm?page=PageNameWidget-based rendering
Member portal/members/index.cfmFusebox routing via fbx_switch.cfm
File Manager/members/dirlist.cfm?subdir=galleriesGallery file management
Gallery admin/Modules/Galleries/Gallery_Search.cfmGallery CRUD + image management
Product admin/Modules/WebStore/Product_Search.cfmProduct catalog management
Order admin/Modules/WebStore/Orders_Search.cfmOrder management
Calendar/files/calendar/index.cfmEvent management
Config vars/Modules/Configuration/index.cfmCustomVars CRUD

Coding Conventions Checklist

Before writing any code, verify:


The copilot-instructions.md file is the single source of truth. Updated every session.
Check _session_changelog.txt for decision history.

Welcome aboard, Ernie. 🛠️