refactor(pricing): single source of truth for the service catalog
Previously two hand-maintained price lists (API COMPLIANCE_SERVICES + site SERVICE_META) drifted apart -- that is how the healthcare +$200 raise charged $399 while displaying $599. Eliminate the drift class entirely: - Move the catalog to api/src/service-catalog.ts (the authority; checkout charges from it). compliance-orders.ts imports it. - scripts/gen-service-catalog.mjs generates site/src/lib/service-catalog.generated.ts from the API source. intake_manifest.ts re-exports SERVICE_META from it, so all ~60 site pages keep working unchanged. - deploy.sh regenerates + drift-checks before building (site build context is ./site only and cannot read ../api, so generation happens host-side). - scripts/check-service-catalog-drift.mjs fails the build if the generated file ever diverges from the API (verified: passes aligned, fails on mismatch). To change a price now, edit ONE file: api/src/service-catalog.ts.
This commit is contained in:
parent
2bba28ae6b
commit
09e21a6c97
7 changed files with 718 additions and 534 deletions
|
|
@ -165,67 +165,11 @@ export const CATEGORY_GATED_STEPS: Record<string, IntakeStep[]> = {
|
|||
audio_bridging: ["audio_bridging"],
|
||||
};
|
||||
|
||||
// ── Pricing + human name lookup (mirrors COMPLIANCE_SERVICES server-side)
|
||||
export const SERVICE_META: Record<string, { name: string; price_cents: number; gov_fee_label?: string }> = {
|
||||
"fcc-compliance-checkup": { name: "FCC Carrier Compliance Checkup", price_cents: 79900 },
|
||||
"fcc-499a": { name: "FCC Form 499-A Filing", price_cents: 49900 },
|
||||
"fcc-499a-499q": { name: "FCC Form 499-A + 499-Q Bundle", price_cents: 59900 },
|
||||
"fcc-full-compliance": { name: "FCC Full Compliance Bundle", price_cents: 149900 },
|
||||
"cpni-certification": { name: "CPNI Annual Certification", price_cents: 19900 },
|
||||
"rmd-filing": { name: "RMD Registration / Recertification", price_cents: 24900 }, // + $100 FCC filing fee passthrough
|
||||
"stir-shaken": { name: "STIR/SHAKEN Implementation Assistance", price_cents: 49900 },
|
||||
"dc-agent": { name: "D.C. Registered Agent (Annual)", price_cents: 14900 },
|
||||
"bdc-broadband": { name: "BDC Broadband Deployment Filing", price_cents: 24900 },
|
||||
"bdc-voice": { name: "BDC Voice Subscription (formerly Form 477)", price_cents: 19900 },
|
||||
"bdc-filing": { name: "BDC Filing (Broadband + Voice)", price_cents: 34900 },
|
||||
"ocn-registration": { name: "NECA OCN / Company Code Registration", price_cents: 265000 },
|
||||
"cdr-analysis": { name: "CDR Traffic Study (Annual)", price_cents: 49900 },
|
||||
"cores-frn-registration": { name: "CORES / FRN Registration", price_cents: 14900 },
|
||||
"fcc-499-initial": { name: "Form 499 Initial Registration", price_cents: 34900 },
|
||||
"calea-ssi": { name: "CALEA SSI Plan", price_cents: 79900 },
|
||||
"fcc-63-11-notification": { name: "Foreign Carrier Affiliation Notification", price_cents: 34900 },
|
||||
"new-carrier-bundle": { name: "New Carrier Onboarding Bundle", price_cents: 179900 },
|
||||
"foreign-qualification-single": { name: "Foreign Qualification (One State)", price_cents: 14900 },
|
||||
"foreign-qualification-multi": { name: "Foreign Qualification (Multi-State)", price_cents: 9900 },
|
||||
// DOT / FMCSA
|
||||
"mcs150-update": { name: "MCS-150 Biennial Update", price_cents: 3900 },
|
||||
"boc3-filing": { name: "BOC-3 Process Agent Filing", price_cents: 8900 },
|
||||
"ucr-registration": { name: "UCR Annual Registration", price_cents: 3900, gov_fee_label: "UCR registration fee (tier-based, minimum shown)" },
|
||||
"dot-registration": { name: "New USDOT Number Registration", price_cents: 8900 },
|
||||
"mc-authority": { name: "MC Operating Authority Application", price_cents: 19900, gov_fee_label: "FMCSA operating authority application fee" },
|
||||
"dot-drug-alcohol": { name: "DOT Drug & Alcohol Compliance Program", price_cents: 14900 },
|
||||
"dot-audit-prep": { name: "New Entrant Safety Audit Preparation", price_cents: 39900 },
|
||||
"dot-full-compliance": { name: "DOT Full Compliance Bundle", price_cents: 39900 },
|
||||
"usdot-reactivation": { name: "USDOT Reactivation", price_cents: 14900 },
|
||||
// State-level trucking
|
||||
"irp-registration": { name: "IRP Registration Assistance", price_cents: 10900, gov_fee_label: "Apportioned IRP registration and plate fees (state, by jurisdictions and weight)" },
|
||||
"ifta-application": { name: "IFTA Application + Decals", price_cents: 10900, gov_fee_label: "IFTA license and decal fees (state)" },
|
||||
"ifta-quarterly": { name: "IFTA Quarterly Filing", price_cents: 10900, gov_fee_label: "IFTA taxes due, based on your mileage" },
|
||||
"or-weight-mile-tax": { name: "Oregon Weight-Mile Tax Setup", price_cents: 10900, gov_fee_label: "Oregon weight-mile tax account and bond/deposit fees (state)" },
|
||||
"ny-hut-registration": { name: "NY Highway Use Tax Registration", price_cents: 10900, gov_fee_label: "NY HUT certificate and decal fees (state)" },
|
||||
"ky-kyu-registration": { name: "KY Weight-Distance Tax Setup", price_cents: 10900, gov_fee_label: "KYU weight-distance account fees (state)" },
|
||||
"nm-weight-distance": { name: "NM Weight-Distance Tax Setup", price_cents: 10900, gov_fee_label: "NM weight-distance permit and account fees (state)" },
|
||||
"ct-highway-use-fee": { name: "CT Highway Use Fee Setup", price_cents: 10900, gov_fee_label: "CT Highway Use Fee registration and usage fees (state)" },
|
||||
"ca-mcp-carb": { name: "California MCP + CARB Compliance", price_cents: 22900, gov_fee_label: "CA MCP permit fee and CARB/Clean Truck Check fees (state, by fleet size)" },
|
||||
"state-dot-registration": { name: "State DOT Registration", price_cents: 10900, gov_fee_label: "State DOT/intrastate registration fee (state)" },
|
||||
"intrastate-authority": { name: "Intrastate Operating Authority", price_cents: 10900, gov_fee_label: "State intrastate authority filing fee" },
|
||||
"osow-permit": { name: "Oversize/Overweight Permit", price_cents: 10900, gov_fee_label: "State oversize/overweight permit fees, per trip/route" },
|
||||
"state-trucking-bundle": { name: "State Compliance Bundle", price_cents: 49900, gov_fee_label: "State registration, decal and tax fees for each included filing" },
|
||||
// Hazmat / emissions
|
||||
"hazmat-phmsa": { name: "PHMSA Hazmat Registration", price_cents: 14900, gov_fee_label: "PHMSA registration fee, by business size" },
|
||||
"state-emissions": { name: "State Clean-Truck / Emissions Compliance", price_cents: 10900 },
|
||||
// DOT lifecycle
|
||||
"emergency-temporary-authority": { name: "Emergency Temporary Authority", price_cents: 49900, gov_fee_label: "FMCSA emergency/temporary authority fee" },
|
||||
"carrier-closeout": { name: "Carrier Closeout / Deactivation", price_cents: 19900 },
|
||||
"entity-dissolution": { name: "Entity Dissolution Filing", price_cents: 4900, gov_fee_label: "State dissolution filing fee" },
|
||||
// Healthcare / NPI
|
||||
"npi-revalidation": { name: "Medicare PECOS Revalidation Filing", price_cents: 59900 },
|
||||
"npi-reactivation": { name: "NPI Reactivation", price_cents: 44900 },
|
||||
"nppes-update": { name: "NPPES Data Update / Attestation", price_cents: 34900 },
|
||||
"medicare-enrollment": { name: "Medicare Enrollment (PECOS)", price_cents: 69900 },
|
||||
"oig-sam-screening": { name: "OIG/SAM Exclusion Screening (Annual)", price_cents: 29900 },
|
||||
"provider-compliance-bundle": { name: "Provider Compliance Bundle (Annual)", price_cents: 89900 },
|
||||
};
|
||||
// ── Pricing + human name lookup ──────────────────────────────────────────
|
||||
// Re-exported from the generated catalog so the site can never drift from the
|
||||
// API's prices. SINGLE SOURCE OF TRUTH: api/src/service-catalog.ts.
|
||||
// Regenerated by scripts/gen-service-catalog.mjs on site prebuild.
|
||||
export { SERVICE_META, type ServiceMeta } from "./service-catalog.generated.js";
|
||||
|
||||
export function formatUSD(cents: number): string {
|
||||
return `$${(cents / 100).toLocaleString("en-US", {
|
||||
|
|
|
|||
84
site/src/lib/service-catalog.generated.ts
Normal file
84
site/src/lib/service-catalog.generated.ts
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/**
|
||||
* AUTO-GENERATED -- DO NOT EDIT.
|
||||
*
|
||||
* Source of truth: api/src/service-catalog.ts (COMPLIANCE_SERVICES).
|
||||
* Regenerate with: node scripts/gen-service-catalog.mjs (runs on site prebuild).
|
||||
*
|
||||
* Display-only subset (name, price_cents, gov_fee_label) of the API catalog,
|
||||
* so the public site can never drift from what the API actually charges.
|
||||
*/
|
||||
|
||||
export interface ServiceMeta {
|
||||
name: string;
|
||||
price_cents: number;
|
||||
gov_fee_label?: string;
|
||||
}
|
||||
|
||||
export const SERVICE_META: Record<string, ServiceMeta> = {
|
||||
"annual-report-filing": { name: "Annual Report / Franchise Tax Filing", price_cents: 14900 },
|
||||
"bdc-broadband": { name: "BDC Broadband Deployment Filing", price_cents: 24900 },
|
||||
"bdc-filing": { name: "BDC Filing (Broadband + Voice)", price_cents: 34900 },
|
||||
"bdc-voice": { name: "BDC Voice Subscription Filing (formerly Form 477 Voice)", price_cents: 19900 },
|
||||
"boc3-filing": { name: "BOC-3 Process Agent Filing", price_cents: 8900 },
|
||||
"ca-mcp-carb": { name: "California MCP + CARB Compliance", price_cents: 22900, gov_fee_label: "CA MCP permit fee + CARB/Clean Truck Check fees (state, by fleet size, billed at cost)" },
|
||||
"calea-ssi": { name: "CALEA SSI Plan", price_cents: 79900 },
|
||||
"carrier-closeout": { name: "Trucking Wrap-Up (USDOT Shutdown)", price_cents: 19900 },
|
||||
"cdr-analysis": { name: "CDR Traffic Study (Annual)", price_cents: 49900 },
|
||||
"cdr-storage-tier1": { name: "CDR Storage Tier 1 (50 GB / 50M calls)", price_cents: 9900 },
|
||||
"cdr-storage-tier2": { name: "CDR Storage Tier 2 (250 GB / 250M calls)", price_cents: 29900 },
|
||||
"cdr-storage-tier3": { name: "CDR Storage Tier 3 (1 TB / 1B calls)", price_cents: 79900 },
|
||||
"cores-frn-registration": { name: "CORES / FRN Registration", price_cents: 14900 },
|
||||
"cpni-certification": { name: "CPNI Annual Certification", price_cents: 19900 },
|
||||
"ct-highway-use-fee": { name: "CT Highway Use Fee Setup", price_cents: 10900, gov_fee_label: "CT Highway Use Fee registration (state, billed at cost)" },
|
||||
"dc-agent": { name: "D.C. Registered Agent (Annual)", price_cents: 14900 },
|
||||
"dot-audit-prep": { name: "New Entrant Safety Audit Preparation", price_cents: 39900 },
|
||||
"dot-drug-alcohol": { name: "DOT Drug & Alcohol Compliance Program", price_cents: 14900 },
|
||||
"dot-full-compliance": { name: "DOT Full Compliance Bundle", price_cents: 39900 },
|
||||
"dot-registration": { name: "New USDOT Number Registration", price_cents: 8900 },
|
||||
"ein-application": { name: "EIN Application (IRS SS-4)", price_cents: 7900 },
|
||||
"emergency-temporary-authority": { name: "Emergency Temporary Authority (ETA)", price_cents: 49900 },
|
||||
"entity-dissolution": { name: "Business Entity Dissolution (LLC/Corp)", price_cents: 4900, gov_fee_label: "State dissolution filing fee (varies by state, billed at cost)" },
|
||||
"entity-reinstatement": { name: "Entity Reinstatement", price_cents: 29900 },
|
||||
"entity-upgrade-bundle": { name: "Entity Upgrade Package (Sole Prop → LLC)", price_cents: 59900 },
|
||||
"fcc-499-initial": { name: "Form 499 Initial Registration", price_cents: 34900 },
|
||||
"fcc-499a": { name: "FCC Form 499-A Filing", price_cents: 49900 },
|
||||
"fcc-499a-499q": { name: "FCC Form 499-A + 499-Q Bundle", price_cents: 59900 },
|
||||
"fcc-499a-discontinuance": { name: "Form 499-A Discontinuance Filing", price_cents: 29900 },
|
||||
"fcc-499a-zero": { name: "FCC Form 499-A Filing (Zero Revenue)", price_cents: 17900 },
|
||||
"fcc-499q": { name: "FCC Form 499-Q Quarterly Filing", price_cents: 0 },
|
||||
"fcc-63-11-notification": { name: "Foreign Carrier Affiliation Notification (47 CFR § 63.11)", price_cents: 34900 },
|
||||
"fcc-compliance-checkup": { name: "FCC Carrier Compliance Checkup", price_cents: 79900 },
|
||||
"fcc-full-compliance": { name: "FCC Full Compliance Bundle", price_cents: 149900 },
|
||||
"foreign-qualification-multi": { name: "Foreign Qualification (Multi-State)", price_cents: 9900 },
|
||||
"foreign-qualification-single": { name: "Foreign Qualification (One State)", price_cents: 14900 },
|
||||
"hazmat-phmsa": { name: "PHMSA Hazmat Registration", price_cents: 14900, gov_fee_label: "PHMSA registration fee ($25 + $250-$3,000 processing, by business size, billed at cost)" },
|
||||
"ifta-application": { name: "IFTA Application + Decals", price_cents: 10900, gov_fee_label: "IFTA license & decal fees (state, billed at cost)" },
|
||||
"ifta-quarterly": { name: "IFTA Quarterly Filing", price_cents: 10900, gov_fee_label: "IFTA taxes due (remitted to the state at cost based on your mileage)" },
|
||||
"intrastate-authority": { name: "Intrastate Operating Authority", price_cents: 10900, gov_fee_label: "State intrastate authority filing fee (state, billed at cost)" },
|
||||
"irp-registration": { name: "IRP Registration Assistance", price_cents: 10900, gov_fee_label: "Apportioned IRP registration & plate fees (state, by jurisdictions + weight, billed at cost)" },
|
||||
"ky-kyu-registration": { name: "KY Weight-Distance Tax Setup", price_cents: 10900, gov_fee_label: "KYU weight-distance account fees (state, billed at cost)" },
|
||||
"mc-authority": { name: "MC Operating Authority Application", price_cents: 19900, gov_fee_label: "FMCSA operating authority application fee" },
|
||||
"mcs150-update": { name: "MCS-150 Biennial Update", price_cents: 3900 },
|
||||
"medicare-enrollment": { name: "Medicare Enrollment (PECOS)", price_cents: 69900 },
|
||||
"new-carrier-bundle": { name: "New Carrier Onboarding Bundle (FRN + 499 Initial + RMD + CPNI + CALEA)", price_cents: 179900 },
|
||||
"nm-weight-distance": { name: "NM Weight-Distance Tax Setup", price_cents: 10900, gov_fee_label: "NM weight-distance permit & account fees (state, billed at cost)" },
|
||||
"npi-reactivation": { name: "NPI Reactivation", price_cents: 44900 },
|
||||
"npi-revalidation": { name: "Medicare PECOS Revalidation Filing", price_cents: 59900 },
|
||||
"nppes-update": { name: "NPPES Data Update / Attestation", price_cents: 34900 },
|
||||
"ny-hut-registration": { name: "NY Highway Use Tax Registration", price_cents: 10900, gov_fee_label: "NY HUT certificate & decal fees (state, billed at cost)" },
|
||||
"ocn-registration": { name: "NECA OCN + Sponsoring CLEC Agreement", price_cents: 265000 },
|
||||
"oig-sam-screening": { name: "OIG/SAM Exclusion Screening (Annual)", price_cents: 29900 },
|
||||
"or-weight-mile-tax": { name: "Oregon Weight-Mile Tax Setup", price_cents: 10900, gov_fee_label: "Oregon weight-mile tax account & bond/deposit (state, billed at cost)" },
|
||||
"osow-permit": { name: "Oversize/Overweight Permit", price_cents: 10900, gov_fee_label: "State oversize/overweight permit fees (per trip/route, billed at cost)" },
|
||||
"provider-compliance-bundle": { name: "Provider Compliance Bundle (Annual)", price_cents: 89900 },
|
||||
"registered-agent": { name: "Registered Agent Service (1 Year)", price_cents: 9900 },
|
||||
"rmd-filing": { name: "RMD Registration / Recertification", price_cents: 24900, gov_fee_label: "FCC RMD filing fee" },
|
||||
"state-dot-registration": { name: "State DOT Registration", price_cents: 10900, gov_fee_label: "State DOT/intrastate registration fee (state, billed at cost)" },
|
||||
"state-emissions": { name: "State Clean-Truck / Emissions Compliance", price_cents: 10900 },
|
||||
"state-puc": { name: "State PUC/PSC Registration", price_cents: 39900 },
|
||||
"state-trucking-bundle": { name: "State Compliance Bundle", price_cents: 49900, gov_fee_label: "State registration, decal & tax fees for each included filing (billed at cost)" },
|
||||
"stir-shaken": { name: "STIR/SHAKEN Implementation Assistance", price_cents: 49900 },
|
||||
"ucr-registration": { name: "UCR Annual Registration", price_cents: 3900, gov_fee_label: "UCR registration fee (tier-based, minimum shown)" },
|
||||
"usdot-reactivation": { name: "USDOT Number Reactivation", price_cents: 14900 },
|
||||
"virtual-mailbox": { name: "Virtual Mailbox (1 Year)", price_cents: 14900 },
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue