Commit graph

201 commits

Author SHA1 Message Date
justin
69b70ee96d Add Trucking/DOT to site-wide nav and footer
Nav dropdown: Trucking/DOT section with DOT Compliance Services,
MCS-150/BOC-3/UCR link, and DOT Compliance Check [FREE] badge.
Added to both desktop mega-dropdown and mobile menu.

Footer: DOT/Trucking in services list, DOT Compliance Check in
free tools list.

This updates all Astro-compiled pages site-wide (nav partial).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 23:12:27 -05:00
justin
ecbf7f0df7 Fix: use inline styles for orange banner (Tailwind classes not in Astro CSS)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 23:10:19 -05:00
justin
7042b3859b Add DOT/FMCSA trucking services landing page
/services/trucking — 7 service cards with pricing, full compliance
bundle CTA ($499), and free compliance check CTA. Orange theme.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 23:08:38 -05:00
justin
dddfd53cd3 Update DOT service pricing per competitive research
MCS-150: $69, BOC-3: $89, UCR: $69 + gov fee ($46 min),
New USDOT: $89, MC Authority: $349 + $300 gov fee,
D&A Program: $149/yr, Audit Prep: $399, Full Bundle: $499.

Positioned below market on entry-level services (MCS-150 $69 vs
$99-200 competitors) to win first orders and upsell.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 22:57:43 -05:00
justin
eeea9f5940 Wire DOT checker CTA to order page instead of email
"Fix My DOT Filings" now links to /order/dot-compliance?dot=XXXXX
instead of a mailto: link.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 22:46:08 -05:00
justin
13475dc8d0 Add DOT compliance batch order page
/order/dot-compliance — select DOT/FMCSA services and checkout.
8 services: MCS-150, BOC-3, UCR, DOT registration, MC authority,
Drug & Alcohol, Audit Prep, Full Compliance Bundle.

Pre-fills DOT#, email, and promo code from URL params.
Uses same batch order + checkout API as FCC compliance page.
Orange theme for trucking brand.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 22:45:38 -05:00
justin
8149996107 Add 8 DOT/FMCSA services to catalog and handler registry
Service catalog (compliance-orders.ts):
- mcs150-update: $79 (MCS-150 biennial update)
- boc3-filing: $149 (BOC-3 process agent)
- ucr-registration: $79 + $59 gov fee (UCR annual)
- dot-registration: $149 (new USDOT number)
- mc-authority: $499 + $300 gov fee (operating authority)
- dot-drug-alcohol: $199 (D&A compliance program)
- dot-audit-prep: $399 (new entrant safety audit prep)
- dot-full-compliance: $499 (bundle)

Handler registry (__init__.py):
- MCS150UpdateHandler for admin-assisted filings
- BOC3FilingHandler for process agent designations
- Other DOT services use MCS150 handler pattern (admin todo)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 22:43:57 -05:00
justin
8441c6f0c0 Add MCS-150 and BOC-3 service handlers for trucking compliance
MCS-150 Biennial Update ($79):
- Admin-assisted filing (FMCSA Portal requires Login.gov MFA)
- Creates admin todo with intake data and filing steps
- Checks current MCS-150 status via FMCSA API
- Sends status email to client

BOC-3 Process Agent Filing ($149):
- Partners with blanket process agent (NWRA or similar)
- Collects carrier info, submits designation to partner
- Partner files electronically with FMCSA
- Stub for future process agent API integration
- Sends status/confirmation emails

Both follow the same handler pattern as FCC services (admin todo
with structured data when full automation isn't possible).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 22:37:47 -05:00
justin
79ebcc001a Add comprehensive FMCSA trucking compliance product plan
Covers all 5 phases: data pipeline (done), additional checks (UCR,
IFTA, IRP, D&A, new entrant, hazmat, state-level), service catalog
with 10 services and pricing, email campaign segmentation for 29K+
overdue carriers, and filing automation roadmap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:43:54 -05:00
justin
8895319a51 Restyle DOT compliance checker with full site chrome
Matches FCC checker layout: site nav, footer, Astro CSS, auth modal,
support panel, subscribe modal, Tawk.to chat, analytics. Orange
accent theme for trucking brand. Removed all inline styles in favor
of Tailwind classes from the Astro CSS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:40:25 -05:00
justin
2b30ff693e Change placeholder from Swift to Werner Enterprises
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:34:07 -05:00
justin
6e0a84418f Add DOT/FMCSA compliance checker frontend page
Static page at /tools/dot-compliance-check with:
- DOT number lookup with live FMCSA API checks
- Name search against local census database
- Color-coded check cards (green/yellow/red) for each filing
- Auto-fill from ?dot= URL param
- CTA to email for help when issues found
- Mobile responsive, orange/trucking theme

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:30:23 -05:00
justin
b1d21c2ba7 Add DOT/FMCSA trucking services to homepage (dev only)
- Red CRTC promo bar → orange DOT compliance services banner
- "Four areas" → "Five areas" with Trucking/DOT icon card
- DOT Compliance Check link added to nav dropdown with NEW badge
- Links to /tools/dot-compliance-check (page TBD)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:16:58 -05:00
justin
b0f518b1c4 Fix MCS-150 date display format (ISO date only)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:13:50 -05:00
justin
c40d85b343 Fix: named import for pool from db module
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:13:05 -05:00
justin
46069b07a0 Add DOT/FMCSA compliance checker API
GET /api/v1/dot/lookup?dot=XXXXXX — live compliance check combining
local census data + FMCSA QCMobile API. Checks:
- Operating status (allowed to operate Y/N)
- MCS-150 biennial update (overdue detection)
- Insurance filing (BIPD, cargo, bond)
- Safety rating (S/C/U)
- Operating authority status
- Out-of-service rates vs national average
- Crash record

GET /api/v1/dot/search?name=Acme — name search against local census

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:11:46 -05:00
justin
dfee4fc6c0 Add FMCSA motor carrier census table and Socrata data downloader
New vertical: FMCSA/DOT motor carrier compliance services.
- Migration 078: fmcsa_carriers table with 31 fields (DOT#, name,
  email, phone, address, fleet size, MCS-150 date, carrier type)
- Downloader: Socrata API ingest for 2M+ carriers with upsert
- Data source: data.transportation.gov (free, public)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:05:46 -05:00
justin
27a1a1f7ed Add Frontier Networks + Twilio to vendor guide (12 vendors total)
Skipped Comwave (acquired). Full list: Fibernetics, Iristel,
Flowroute/BCM One, VoIP.ms, Telnyx, SkySwitch/Sangoma, Distributel,
Allstream/Zayo, Bandwidth, IXICA, Frontier Networks, Twilio.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:21:07 -05:00
justin
79375c11b3 Add Bandwidth and IXICA to vendor guide from CRTC registry data
Scraped CRTC registered providers list (4,669 records, 1,843 companies).
Added Bandwidth Inc. (CLEC, wholesale DID/voice API) and IXICA
Communications (Toronto CLEC, wholesale voice/data). Now 10 vendors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:20:35 -05:00
justin
9919947440 Fix: Flowroute (Intrado) -> Flowroute (BCM One)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:17:13 -05:00
justin
15cd006260 Vendor guide: Calibri font, US carrier note, cleanup
- Set Calibri as explicit font on all runs via _run() helper
- Added note that many large US carriers work with Canadian carriers
  and to ask about specific regulatory requirements
- BCM One ownership for Flowroute
- Cleaned up leftover manual font assignments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:16:02 -05:00
justin
3bac30510e Update Flowroute ownership: now BCM One (acquired from Intrado)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:14:12 -05:00
justin
32c1e57c5c Add Canadian Wholesale Vendor Reference Guide to CRTC binder
New DOCX generator with 8 recommended upstream providers:
Fibernetics, Iristel, Flowroute, VoIP.ms, Telnyx, SkySwitch,
Distributel, Allstream. Each with services, website, and notes.

Wired into CRTC handler Step 6a (generates before eSign pause)
and added to binder compiler default sections.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:11:47 -05:00
justin
7aec5b23cb Add Fibernetics to recommended Canadian wholesale carrier references
Added alongside Iristel, Flowroute, and SkySwitch in the CRTC
service page case studies and wholesale provider mentions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:08:36 -05:00
justin
7139630fa8 Add Accessible Canada Act (ACA) compliance tracking for CRTC orders
- CRTC handler: new compliance calendar entry for ACA accessibility
  plan/progress report (June 1 annual deadline), with 2-month advance
  reminder. Covers new entrant feedback process and existing carrier
  plans/reports. Notes dual notification requirement (Commissioner + CRTC).
- Order page: amber advisory banner about June 1, 2026 ACA deadline
  with key obligations and penalty warning
- "What's included" list: added ACA accessibility compliance tracking

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 10:09:33 -05:00
justin
d4c4ae003e Fix 6 bugs from code review
Critical:
- Single-order discount used wrong column names (discount_pct/discount_flat_cents
  → discount_type/discount_value). Discounts were silently $0.
- Single-order discount skipped allowed_emails and expires_at checks
- Free orders now set paid_at = NOW()

High:
- Discount usage now tracked in discount_usage table + current_uses incremented
- Flat discount only replaces bundle when flat >= bundle (was always replacing)

Minor:
- Removed unused CDR profile fetch in EntityStep

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 02:16:38 -05:00
justin
4125b0f09f Auto-fill entity from FRN in order intake_data, not just URL param
When intake loads from ?order=CO-xxx, the FRN is in the order's
intake_data, not the URL. Now checks state.intake_data.frn and
state.entity.frn as fallback sources for auto-fill.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:53:44 -05:00
justin
03c72a2525 Pre-fill intake form from order data via ?order=CO-xxx
When the intake page is loaded with ?order=CO-xxx (from the
confirmation email), fetch the order and pre-fill customer name,
email, and FRN from the order record. Previously only worked
with JWT token-based links.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:51:12 -05:00
justin
2316168072 Clarify email field is not shared with FCC
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:49:53 -05:00
justin
d62a858098 Clarify USAC Filer ID: 6 digits starting with 8, with example and link
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:48:47 -05:00
justin
0cb6e20021 Clarify intake form labels: name, email, carrier entity
- "Email address (yours)" → "Your email address" with helper text
- "Your name" → "Your first and last name" with placeholder
- "Carrier legal name" → "Carrier entity legal name" with examples

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:47:52 -05:00
justin
bf0c6dc85e Hide payment methods when order total is $0
When discount brings total to zero, hide the payment method selector
and change button from "Continue to Secure Payment" to "Place Free Order".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:32:30 -05:00
justin
a8cdfc65f6 Fix: promo re-render trigger used wrong checkbox selector
Was looking for .svc-cb:checked but checkboxes use
input[data-slug]:checked. Discount display never updated after
promo info loaded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:30:26 -05:00
justin
de50971fb3 Add intake form links to compliance order confirmation email
The confirmation email now includes a prominent blue box with
direct links to the intake form for each ordered service. Subject
changed to "Action Required" to prompt the customer to complete it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:26:33 -05:00
justin
5cb360acba Fix: add allowed_emails to DiscountCode TypeScript interface
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:19:12 -05:00
justin
6ed5105ae5 Send intake email for $0 free orders
Free orders bypass Stripe, so the Stripe webhook never fires and the
intake/confirmation email never gets sent. Now trigger
sendComplianceIntakeEmail directly in the $0 bypass flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:18:19 -05:00
justin
844cc7e11f Add inline free-order success handler to success page
Static inline script that verifies $0 orders via API and shows
"Order Confirmed" state. Re-asserts success state on delays to
override the Astro hoisted JS which would otherwise show error
(since there's no Stripe session_id for free orders).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:11:26 -05:00
justin
b81e102d39 Validate allowed_emails on discount code lookup
The /api/v1/discount/:code endpoint now checks allowed_emails when
an email is provided. If the email isn't in the allowed list, returns
valid:false so the frontend doesn't show a fake discount. The promo
field is cleared and unlocked if validation fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:08:51 -05:00
justin
7bb08f3493 Handle already-paid orders gracefully in checkout
When create-session is called for an order that's already paid (e.g.
free order with page refresh, duplicate submit, or browser retry),
return a success redirect instead of 404. Prevents confusing
"Payment Not Confirmed" errors on the success page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:07:27 -05:00
justin
316d4a4912 Fix success page for $0 free orders
When free=1 is in the URL, verify order status via API instead of
looking for a Stripe session. Checks payment_status=paid on the
server side — no security hole since the server already validated
the discount code before marking the order paid.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 01:01:02 -05:00
justin
ae5dc4745e Fix: fetch actual discount type/value from API instead of hardcoding 25%
The checkout page was hardcoding 25% for all promo codes. Now fetches
/api/v1/discount/:code to get real discount_type (percent vs flat) and
discount_value, then displays correct amount.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:56:44 -05:00
justin
fdbed5c097 Pre-fill email from URL on checkout and compliance checker
Email passes through the full funnel: campaign email (?email=) →
compliance checker → order page. Reduces friction for campaign
recipients who would otherwise have to type their email manually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:49:28 -05:00
justin
b91e76e44c Fix: FCC errors now fall through to local DB fallback
Was returning 502 early instead of throwing to trigger the catch block
where the local fcc_499_filers fallback lives.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:42:43 -05:00
justin
bbfa6393fa Fall back to local DB when FCC name search is blocked
FCC/Akamai is blocking our server IP (403). Name search now falls back
to querying the local fcc_499_filers table (20K+ records) when the
live FCC search fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:41:47 -05:00
justin
33684a9152 Better error message when FCC 499 search is down
FCC ColdFusion app returns 503 periodically. Show helpful message
suggesting FRN search instead of generic "Search failed".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:39:38 -05:00
justin
7909f130c6 Fix $0 checkout bypass: remove nonexistent status column
compliance_orders has payment_status, not status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:36:15 -05:00
justin
6d441a5cc0 Add email-restricted discount codes and $0 order bypass
- discount_codes.allowed_emails: when set, code only valid for listed emails
- Flat discounts now replace bundle discount (don't stack)
- $0 orders skip all payment gateways, mark paid immediately, redirect to success
- FREEDOM249: $249 flat off restricted to 4+ deficiency carriers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 00:16:47 -05:00
justin
868b0eeca5 Pass promo code through compliance checker to order page
- Compliance checker reads ?code= from URL, stores it, passes it
  through to the order page CTA link
- Allows email campaigns to link to checker with coupon pre-applied

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 15:16:27 -05:00
justin
ba2f6eb667 UPL-proof document templates + reliable bounce sync
Templates (22 files):
- Replace "Reviewed By" with "Document prepared by" + consulting disclaimer
- Add "not a law firm / not legal advice" footer to all CPNI, CALEA, RMD docs
- Change "on behalf of" to "at the direction of" in discontinuance letter
- Reframe RMD penalty language as client acknowledgment

Bounce sync:
- New listmonk-bounce-sync.py replaces unreliable bash tail watcher
- Scans full mail.log, matches QIDs to campaign senders, inserts directly
  into Listmonk DB with proper subscriber_id foreign keys
- Idempotent, runs via cron every 5 minutes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 15:06:29 -05:00
justin
d39e10485f Add URL promo code pre-fill and fix discount stacking logic
- Checkout page reads ?code= or ?promo= from URL, pre-fills and locks the
  promo field, shows the promo discount in the summary instead of the 15%
  bundle discount
- API: when a promo code % >= bundle %, replace the bundle discount entirely
  instead of stacking (e.g. MEMORIAL25 at 25% replaces the 15% bundle)
- Also checks discount code expiration in the query

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 15:06:19 -05:00