Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion MainApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Login } from './components/Login';
import { AnalysisResult, InvoiceItem, ProcessingStatus, SavedInvoice, Product, UserRole } from './types';
import { analyzeInvoiceImage } from './services/geminiService';
import { getAllGlCodes } from './services/glCodeService';
import { DEMO_BOOKING_URL } from './src/siteConfig';
import { GLCode } from './types';
import { saveInvoiceToHistory, checkForDuplicate, getSavedInvoices } from './services/storageService';
import { saveNewProduct, migrateLocalProductsToDb } from './services/productService';
Expand Down Expand Up @@ -1129,7 +1130,9 @@ const App: React.FC = () => {
</span>
</div>
<a
href="mailto:[email protected]?subject=Upgrade%20to%20Paid%20Plan"
href={DEMO_BOOKING_URL}
target="_blank"
rel="noopener noreferrer"
className={`whitespace-nowrap font-bold underline hover:no-underline ${trialStatus.status === 'active' ? 'text-brand-700' : 'text-white'}`}
>
Upgrade →
Expand Down
3 changes: 2 additions & 1 deletion components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ChefHat, Lock, User, Mail, CheckCircle2, Loader2, ArrowLeft, UserPlus,
import { UserRole } from '../types';
import { signIn, signUp, getUserRole, Plan } from '../services/authService';
import { supabase } from '../services/supabaseClient';
import { DEMO_BOOKING_URL } from '../src/siteConfig';

interface LoginProps {
onLogin: (role: UserRole) => void;
Expand Down Expand Up @@ -438,7 +439,7 @@ export const Login: React.FC<LoginProps> = ({ onLogin }) => {
<p className="text-[10px] text-slate-500">Unlimited locations + SSO + EDI</p>
</div>
</div>
<a href="mailto:[email protected]?subject=Enterprise%20Demo%20Request" className="text-[11px] font-bold text-violet-700 hover:text-violet-900 underline">
<a href={DEMO_BOOKING_URL} target="_blank" rel="noopener noreferrer" className="text-[11px] font-bold text-violet-700 hover:text-violet-900 underline">
Book a Demo →
</a>
</div>
Expand Down
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<link rel="apple-touch-icon" href="/logo.svg" />
<title>ChefCode.ai — AI Invoice Coding</title>

<!-- Search + link previews. This is a client-rendered SPA, so the crawler
and the link unfurlers (LinkedIn, Slack, iMessage, WhatsApp, Outlook)
only ever see this <head> — none of the page copy. Everything a shared
link needs to render a card has to live here. og:image must be an
absolute URL; relative paths are silently dropped by most unfurlers. -->
<meta name="description" content="ChefCode reads your supplier invoices, assigns the right GL codes, and flags vendor overcharges — automatically. Built for food service teams." />
<link rel="canonical" href="https://www.chefcode.cc/" />
<meta name="theme-color" content="#157559" />

<meta property="og:type" content="website" />
<meta property="og:site_name" content="ChefCode.ai" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://www.chefcode.cc/" />
<meta property="og:title" content="ChefCode.ai — AI Invoice Coding" />
<meta property="og:description" content="ChefCode reads your supplier invoices, assigns the right GL codes, and flags vendor overcharges — automatically. Built for food service teams." />
<meta property="og:image" content="https://www.chefcode.cc/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="ChefCode.ai — Code every invoice in seconds." />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="ChefCode.ai — AI Invoice Coding" />
<meta name="twitter:description" content="ChefCode reads your supplier invoices, assigns the right GL codes, and flags vendor overcharges — automatically. Built for food service teams." />
<meta name="twitter:image" content="https://www.chefcode.cc/og-image.png" />
<!-- Tailwind is compiled by the Vite build (src/index.css + tailwind.config.js),
which scans the whole app. The old cdn.tailwindcss.com runtime shim has
been retired; `cyan` is remapped to brand green in tailwind.config.js. -->
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build && node scripts/check-build-secrets.mjs",
"build": "vite build && node scripts/check-build-secrets.mjs && node scripts/check-cta-links.mjs",
"check:secrets": "node scripts/check-build-secrets.mjs",
"preview": "vite preview"
"preview": "vite preview",
"check:ctas": "node scripts/check-cta-links.mjs"
},
"dependencies": {
"@google/genai": "^1.41.0",
Expand Down
Binary file added public/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions scripts/check-cta-links.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Build-time CTA gate. Fails the build if a "Book a Demo" button would ship
// pointing at somewhere nobody reads. Runs after `vite build` — see
// package.json "build". Companion to check-build-secrets.mjs.
//
// Why this exists: the demo buttons spent months pointing at
// [email protected], a domain that was never registered. Every enterprise and
// trial-upgrade lead bounced silently — nothing failed, nothing logged, the
// mail just went nowhere. A dead CTA is invisible in testing, so it gets
// caught here instead.

import { readFileSync, readdirSync, statSync } from 'node:fs';
import { join } from 'node:path';

const DIST = 'dist';

// [pattern, what the person should do about it]
const BAD = [
[/REPLACE_ME/, 'The demo booking link is still the placeholder. Open src/siteConfig.ts and set DEMO_BOOKING_URL to your real Cal.com or Calendly URL (the full https:// address).'],
[/mailto:[^"'\s]*@chefcode\.ai/, 'A button still points at an @chefcode.ai address. That domain is not registered, so the mail goes nowhere. Point it at DEMO_BOOKING_URL in src/siteConfig.ts instead.'],
];

function walk(dir) {
const out = [];
for (const name of readdirSync(dir)) {
const p = join(dir, name);
if (statSync(p).isDirectory()) out.push(...walk(p));
else if (/\.(js|mjs|cjs|html)$/.test(name)) out.push(p);
}
return out;
}

let files;
try {
files = walk(DIST);
} catch {
console.log('[check-cta-links] no dist/ dir — skipping.');
process.exit(0);
}

const problems = new Map(); // advice -> Set(files)
for (const file of files) {
const text = readFileSync(file, 'utf8');
for (const [re, advice] of BAD) {
if (re.test(text)) {
if (!problems.has(advice)) problems.set(advice, new Set());
problems.get(advice).add(file);
}
}
}

if (problems.size) {
console.error('\n\x1b[31m✗ BUILD BLOCKED — a "Book a Demo" button would go nowhere.\x1b[0m\n');
for (const [advice, fileSet] of problems) {
console.error(' ' + advice);
console.error(' found in: ' + [...fileSet].join(', ') + '\n');
}
process.exit(1);
}

console.log('[check-cta-links] OK — every demo CTA points at a real destination.');
7 changes: 5 additions & 2 deletions src/components/landing/FinalCTA.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ArrowRight, Zap } from 'lucide-react';
import { useReveal } from '../../hooks/useReveal';
import { DEMO_BOOKING_URL } from '../../siteConfig';

export default function FinalCTA() {
const ref = useReveal();
Expand Down Expand Up @@ -37,10 +38,12 @@ export default function FinalCTA() {
<ArrowRight className="w-4 h-4 transition-transform group-hover:translate-x-1" />
</a>
<a
href="mailto:[email protected]?subject=Book%20a%20Demo"
href={DEMO_BOOKING_URL}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center justify-center gap-2 px-8 py-4 rounded-xl bg-white/[0.08] border border-cream/20 text-cream font-medium text-base hover:bg-white/[0.14] transition-all"
>
Book a 15-Min Demo
Book a 30-Min Demo
</a>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/components/landing/Pricing.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from 'react';
import { Check, Star } from 'lucide-react';
import { useReveal } from '../../hooks/useReveal';
import { DEMO_BOOKING_URL } from '../../siteConfig';

const plans = [
{
Expand All @@ -26,7 +27,7 @@ const plans = [
price: { monthly: null, yearly: null },
desc: 'For university systems and hotel chains.',
cta: 'Book a Demo',
href: 'mailto:[email protected]?subject=Enterprise%20Demo%20Request',
href: DEMO_BOOKING_URL,
featured: false,
items: ['Unlimited locations', 'Unlimited team members', 'Unlimited invoices', 'Everything in Professional', 'SSO / SAML integration', 'API access', 'Vendor EDI connections', 'Dedicated account manager', 'Custom onboarding'],
},
Expand Down Expand Up @@ -92,6 +93,9 @@ export default function Pricing() {

<a
href={p.href}
{...(p.href.startsWith('http')
? { target: '_blank', rel: 'noopener noreferrer' }
: {})}
className={`block w-full text-center py-3 rounded-xl text-sm font-semibold transition-all ${
p.featured ? 'bg-brand-600 text-cream hover:bg-brand-700 shadow-lg shadow-brand-600/25' : 'bg-brand-900 text-cream hover:bg-brand-800'
}`}
Expand Down
24 changes: 24 additions & 0 deletions src/siteConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// ─────────────────────────────────────────────────────────────────────────────
// Site-wide contact destinations.
//
// Everything a prospect can click to reach a human lives here, so there is
// exactly one place to change it and no way for one button to drift dead while
// the other still works. (The previous mailto: pointed at [email protected] —
// a domain that was never registered, so every Enterprise and demo lead
// bounced silently.)
// ─────────────────────────────────────────────────────────────────────────────

/**
* Where "Book a Demo" / "Book a 30-Min Demo" send people.
*
* If this ever changes, change it HERE and nowhere else — the landing page,
* the pricing table, the login screen and the trial-upgrade banner all read
* this one value. Keep the button copy's stated duration in step with the
* Calendly event's real duration.
*
* scripts/check-cta-links.mjs fails the build if this is left unset.
*/
export const DEMO_BOOKING_URL = 'https://calendly.com/et-ajith2k/30min';

/** True once DEMO_BOOKING_URL has been pointed at a real https:// booking page. */
export const hasBookingLink = /^https:\/\//.test(DEMO_BOOKING_URL);
Loading