- Implemented the Lakeside Orders demo rebrand:

New licensed lake, picnic, dining, server, burger, and food photography.
Rebuilt homepage gallery, logo, colors, copy, menu, specials, and 
exports.
Added dashboard-configurable branding in [settings.php (line 
18)](/Users/tyemeclifford/Documents/GH/fatbottomgrille/views/admin/settings.php:18).
Added a public attribution page and full [image 
credits](/Users/tyemeclifford/Documents/GH/fatbottomgrille/public/assets/images/CREDITS.md).
Migrated existing SQLite menu data and admin email to 
admin@lakesideorders.test.
Verified 51 PHP files, JSON/JavaScript, storefront pages, database 
migration, admin settings, and menu PDF. All passed.
This commit is contained in:
Ty Clifford
2026-06-14 14:26:09 -04:00
parent 03348cad79
commit b14f4c1796
33 changed files with 531 additions and 123 deletions
+19 -2
View File
@@ -567,6 +567,21 @@ final class AdminController extends BaseController
'business.postal_code',
'business.hours',
'business.announcement',
'branding.location_label',
'branding.meta_description',
'branding.hero_eyebrow',
'branding.hero_heading',
'branding.hero_emphasis',
'branding.hero_intro',
'branding.hero_image',
'branding.gallery_picnic_image',
'branding.gallery_patio_image',
'branding.gallery_service_image',
'branding.story_image',
'branding.story_eyebrow',
'branding.story_heading',
'branding.story_text',
'branding.footer_tagline',
'square.environment',
'square.application_id',
'square.location_id',
@@ -687,7 +702,9 @@ final class AdminController extends BaseController
. '/unsubscribe?user=' . $recipient['id'] . '&signature=' . $signature;
$html = '<p>Hi ' . htmlspecialchars((string) $recipient['full_name'], ENT_QUOTES, 'UTF-8') . ',</p>'
. '<div>' . nl2br(htmlspecialchars($content, ENT_QUOTES, 'UTF-8')) . '</div>'
. '<hr><p style="font-size:12px">You received this because you joined the Fat Bottom Grille news list. '
. '<hr><p style="font-size:12px">You received this because you joined the '
. htmlspecialchars((string) $this->config->get('business.name'), ENT_QUOTES, 'UTF-8')
. ' news list. '
. '<a href="' . htmlspecialchars($unsubscribe, ENT_QUOTES, 'UTF-8') . '">Unsubscribe</a></p>';
try {
$this->mailer->send((string) $recipient['email'], $subject, $html);
@@ -724,7 +741,7 @@ final class AdminController extends BaseController
$this->auth->requireStaff();
$orders = $this->db->fetchAll('SELECT * FROM orders ORDER BY placed_at DESC');
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="fat-bottom-orders-' . date('Y-m-d') . '.csv"');
header('Content-Disposition: attachment; filename="lakeside-orders-' . date('Y-m-d') . '.csv"');
$output = fopen('php://output', 'wb');
fputcsv($output, [
'Order', 'Placed', 'Customer', 'Email', 'Phone', 'Status', 'Payment',
+8 -1
View File
@@ -48,7 +48,7 @@ final class StoreController extends BaseController
);
View::render('store/home', $this->shared([
'title' => 'Keyser comfort food, ready when you are',
'title' => 'Lakeside food, ready when you are',
'categories' => $categories,
'specials' => $specials,
'featured' => $featured,
@@ -66,6 +66,13 @@ final class StoreController extends BaseController
]));
}
public function credits(): void
{
View::render('store/credits', $this->shared([
'title' => 'Image Credits',
]));
}
public function addToCart(): void
{
Security::verifyCsrf();
+124 -34
View File
@@ -306,6 +306,9 @@ SQL;
$this->normalizeLegacyOrderStatuses();
$this->syncCustomersFromOrders();
});
$this->runMigration('20260614_lakeside_orders_demo', function (): void {
$this->applyLakesideDemoBranding();
});
$this->pdo->exec('CREATE UNIQUE INDEX IF NOT EXISTS idx_orders_tracking_token ON orders(tracking_token)');
$this->pdo->exec('CREATE INDEX IF NOT EXISTS idx_orders_customer ON orders(customer_id, placed_at)');
$this->pdo->exec('CREATE INDEX IF NOT EXISTS idx_customers_active ON customers(active, last_order_at)');
@@ -420,6 +423,92 @@ SQL;
}
}
private function applyLakesideDemoBranding(): void
{
$categories = [
[1, 'Dockside Burgers', 'dockside-burgers', 'Flame-grilled favorites stacked for hungry lake days.'],
[2, 'Picnic Baskets', 'picnic-baskets', 'Wraps, bowls, and handhelds made to travel well.'],
[3, 'Lakehouse Plates', 'lakehouse-plates', 'Relaxed comfort food for a proper table by the water.'],
[4, 'Boardwalk Sides', 'boardwalk-sides', 'Shareable extras for the dock, blanket, or patio.'],
[5, 'Cold Drinks', 'cold-drinks', 'Fresh pours for sunny afternoons.'],
];
$categoryStatement = $this->pdo->prepare(
'UPDATE menu_categories
SET name = ?, slug = ?, description = ?, updated_at = CURRENT_TIMESTAMP
WHERE id = ?'
);
foreach ($categories as [$id, $name, $slug, $description]) {
$categoryStatement->execute([$name, $slug, $description, $id]);
}
$items = [
[1, 1, 'Lakeside Double', 'lakeside-double', 'Two grilled patties, cheddar, lettuce, tomato, pickles, and dock sauce.', 1299, '/assets/images/lakeside-burger.jpg', '["House favorite"]', 1],
[2, 1, 'Dockmaster Bacon Burger', 'dockmaster-bacon-burger', 'Two patties, smoked bacon, cheddar, crisp lettuce, tomato, and onion.', 1399, '/assets/images/lakeside-burger.jpg', '[]', 1],
[3, 1, 'Sunset Mushroom Melt', 'sunset-mushroom-melt', 'Grilled beef, Swiss, mushrooms, caramelized onions, and peppercorn mayo.', 1299, '/assets/images/lakeside-burger.jpg', '[]', 0],
[4, 2, 'Marina Chicken Wrap', 'marina-chicken-wrap', 'Chicken, spinach, tomato, cucumber, and creamy herb dressing in a soft wrap.', 1199, '/assets/images/picnic-wrap.jpg', '["Picnic pick"]', 1],
[5, 2, 'Shoreline Falafel Bowl', 'shoreline-falafel-bowl', 'Falafel, seasoned rice, bright slaw, peppers, herbs, lemon, and green tahini.', 1249, '/assets/images/shoreline-bowl.jpg', '["Vegetarian"]', 1],
[6, 3, 'Lakehouse Chicken Plate', 'lakehouse-chicken-plate', 'Seasoned chicken legs with a creamy picnic side and rotating vegetables.', 1499, '/assets/images/lakehouse-chicken.jpg', '[]', 1],
[7, 3, 'Picnic Club Wrap', 'picnic-club-wrap', 'Sliced chicken, greens, tomato, smoky bacon, and herb dressing.', 1299, '/assets/images/picnic-wrap.jpg', '[]', 0],
[8, 4, 'Boardwalk Fries', 'boardwalk-fries', 'Golden fries finished with flaky salt and your choice of dipping sauce.', 599, '/assets/images/boardwalk-fries.jpg', '["Vegetarian"]', 1],
[9, 4, 'Garden Side Bowl', 'garden-side-bowl', 'Rice, chopped vegetables, herbs, lemon, and creamy green dressing.', 649, '/assets/images/shoreline-bowl.jpg', '["Vegetarian"]', 0],
[10, 5, 'Lemon Iced Tea', 'lemon-iced-tea', 'Fresh-brewed iced tea served with lemon.', 299, '/assets/images/lemon-iced-tea.jpg', '[]', 0],
[11, 5, 'Lakeside Lemonade', 'lakeside-lemonade', 'Bright house lemonade poured over ice.', 329, '/assets/images/lemon-iced-tea.jpg', '[]', 0],
];
$itemStatement = $this->pdo->prepare(
'UPDATE menu_items
SET category_id = ?, name = ?, slug = ?, description = ?, price_cents = ?,
image_url = ?, dietary_tags = ?, featured = ?, updated_at = CURRENT_TIMESTAMP
WHERE id = ?'
);
foreach ($items as [$id, $categoryId, $name, $slug, $description, $price, $image, $tags, $featured]) {
$itemStatement->execute([
$categoryId,
$name,
$slug,
$description,
$price,
$image,
$tags,
$featured,
$id,
]);
}
$specialStatement = $this->pdo->prepare(
'UPDATE specials
SET menu_item_id = ?, title = ?, description = ?, badge = ?, price_cents = ?,
updated_at = CURRENT_TIMESTAMP
WHERE id = ?'
);
$specialStatement->execute([
1,
'Sunset Burger Pick',
'The Lakeside Double at its easygoing online demo price.',
'Dock Deal',
1299,
1,
]);
$specialStatement->execute([
8,
'Boardwalk Break',
'A hot order of Boardwalk Fries for the table or picnic blanket.',
'Picnic Pick',
599,
2,
]);
$this->pdo->exec("UPDATE tax_rates SET name = 'Demo State Sales Tax' WHERE id = 1");
$this->pdo->exec("UPDATE tax_rates SET name = 'Lakeview Demo Tax' WHERE id = 2");
$this->pdo->exec(
"UPDATE users SET email = 'admin@lakesideorders.test'
WHERE email = 'admin@fatbottomgrille.com'
AND NOT EXISTS (
SELECT 1 FROM users AS existing
WHERE existing.email = 'admin@lakesideorders.test'
)"
);
}
private function seed(): void
{
$categoryCount = (int) $this->pdo->query('SELECT COUNT(*) FROM menu_categories')->fetchColumn();
@@ -430,11 +519,11 @@ SQL;
$this->pdo->beginTransaction();
try {
$categories = [
['Smash Burgers', 'smash-burgers', 'Hand-pressed beef, crisp edges, and the good stuff.', 10],
['Burritos & Bowls', 'burritos-bowls', 'Big, packed, and built your way.', 20],
['Dinner Plates', 'dinner-plates', 'Comfort-food plates made for a proper supper.', 30],
['Sides', 'sides', 'The supporting cast that tends to steal the show.', 40],
['Drinks', 'drinks', 'Cold drinks for hot food.', 50],
['Dockside Burgers', 'dockside-burgers', 'Flame-grilled favorites stacked for hungry lake days.', 10],
['Picnic Baskets', 'picnic-baskets', 'Wraps, bowls, and handhelds made to travel well.', 20],
['Lakehouse Plates', 'lakehouse-plates', 'Relaxed comfort food for a proper table by the water.', 30],
['Boardwalk Sides', 'boardwalk-sides', 'Shareable extras for the dock, blanket, or patio.', 40],
['Cold Drinks', 'cold-drinks', 'Fresh pours for sunny afternoons.', 50],
];
$categoryStatement = $this->pdo->prepare(
'INSERT INTO menu_categories (name, slug, description, display_order) VALUES (?, ?, ?, ?)'
@@ -449,22 +538,22 @@ SQL;
}
$items = [
['smash-burgers', 'The Fat Bottom', 'the-fat-bottom', 'Two smashed patties, American cheese, grilled onion, pickles, and house sauce.', 1199, 1, '["House favorite"]'],
['smash-burgers', 'Piedmont Bacon Burger', 'piedmont-bacon-burger', 'Two patties, smoked bacon, cheddar, lettuce, tomato, onion, and burger sauce.', 1349, 1, '[]'],
['smash-burgers', 'Allegheny Melt', 'allegheny-melt', 'Smashed beef, Swiss, caramelized onions, and peppercorn mayo on toasted sourdough.', 1299, 0, '[]'],
['burritos-bowls', 'Mountaineer Burrito', 'mountaineer-burrito', 'Seasoned beef, rice, black beans, queso, pico, lettuce, and crema.', 1249, 1, '["Big appetite"]'],
['burritos-bowls', 'Chicken Fajita Bowl', 'chicken-fajita-bowl', 'Grilled chicken, peppers, onions, rice, corn salsa, avocado crema.', 1199, 0, '["Gluten conscious"]'],
['dinner-plates', 'Country Fried Chicken', 'country-fried-chicken', 'Crispy chicken, peppered gravy, mashed potatoes, and green beans.', 1499, 1, '[]'],
['dinner-plates', 'Keyser Meatloaf', 'keyser-meatloaf', 'House meatloaf with brown gravy, mashed potatoes, and seasonal vegetables.', 1449, 0, '[]'],
['sides', 'Loaded Fries', 'loaded-fries', 'Crispy fries, queso, bacon, scallions, and ranch drizzle.', 699, 1, '[]'],
['sides', 'Mac & Cheese', 'mac-cheese', 'Creamy, baked, and unapologetically cheesy.', 449, 0, '["Vegetarian"]'],
['drinks', 'Sweet Tea', 'sweet-tea', 'Fresh-brewed southern sweet tea.', 299, 0, '[]'],
['drinks', 'Fountain Drink', 'fountain-drink', 'Your choice of fountain soda.', 299, 0, '[]'],
['dockside-burgers', 'Lakeside Double', 'lakeside-double', 'Two grilled patties, cheddar, lettuce, tomato, pickles, and dock sauce.', 1299, '/assets/images/lakeside-burger.jpg', 1, '["House favorite"]'],
['dockside-burgers', 'Dockmaster Bacon Burger', 'dockmaster-bacon-burger', 'Two patties, smoked bacon, cheddar, crisp lettuce, tomato, and onion.', 1399, '/assets/images/lakeside-burger.jpg', 1, '[]'],
['dockside-burgers', 'Sunset Mushroom Melt', 'sunset-mushroom-melt', 'Grilled beef, Swiss, mushrooms, caramelized onions, and peppercorn mayo.', 1299, '/assets/images/lakeside-burger.jpg', 0, '[]'],
['picnic-baskets', 'Marina Chicken Wrap', 'marina-chicken-wrap', 'Chicken, spinach, tomato, cucumber, and creamy herb dressing in a soft wrap.', 1199, '/assets/images/picnic-wrap.jpg', 1, '["Picnic pick"]'],
['picnic-baskets', 'Shoreline Falafel Bowl', 'shoreline-falafel-bowl', 'Falafel, seasoned rice, bright slaw, peppers, herbs, lemon, and green tahini.', 1249, '/assets/images/shoreline-bowl.jpg', 1, '["Vegetarian"]'],
['lakehouse-plates', 'Lakehouse Chicken Plate', 'lakehouse-chicken-plate', 'Seasoned chicken legs with a creamy picnic side and rotating vegetables.', 1499, '/assets/images/lakehouse-chicken.jpg', 1, '[]'],
['lakehouse-plates', 'Picnic Club Wrap', 'picnic-club-wrap', 'Sliced chicken, greens, tomato, smoky bacon, and herb dressing.', 1299, '/assets/images/picnic-wrap.jpg', 0, '[]'],
['boardwalk-sides', 'Boardwalk Fries', 'boardwalk-fries', 'Golden fries finished with flaky salt and your choice of dipping sauce.', 599, '/assets/images/boardwalk-fries.jpg', 1, '["Vegetarian"]'],
['boardwalk-sides', 'Garden Side Bowl', 'garden-side-bowl', 'Rice, chopped vegetables, herbs, lemon, and creamy green dressing.', 649, '/assets/images/shoreline-bowl.jpg', 0, '["Vegetarian"]'],
['cold-drinks', 'Lemon Iced Tea', 'lemon-iced-tea', 'Fresh-brewed iced tea served with lemon.', 299, '/assets/images/lemon-iced-tea.jpg', 0, '[]'],
['cold-drinks', 'Lakeside Lemonade', 'lakeside-lemonade', 'Bright house lemonade poured over ice.', 329, '/assets/images/lemon-iced-tea.jpg', 0, '[]'],
];
$itemStatement = $this->pdo->prepare(
'INSERT INTO menu_items
(category_id, name, slug, description, price_cents, featured, dietary_tags)
VALUES (?, ?, ?, ?, ?, ?, ?)'
(category_id, name, slug, description, price_cents, image_url, featured, dietary_tags)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)'
);
foreach ($items as $item) {
$itemStatement->execute([
@@ -475,32 +564,33 @@ SQL;
$item[4],
$item[5],
$item[6],
$item[7],
]);
}
$fatBottomId = (int) $this->pdo->query(
"SELECT id FROM menu_items WHERE slug = 'the-fat-bottom'"
$lakesideDoubleId = (int) $this->pdo->query(
"SELECT id FROM menu_items WHERE slug = 'lakeside-double'"
)->fetchColumn();
$loadedFriesId = (int) $this->pdo->query(
"SELECT id FROM menu_items WHERE slug = 'loaded-fries'"
$boardwalkFriesId = (int) $this->pdo->query(
"SELECT id FROM menu_items WHERE slug = 'boardwalk-fries'"
)->fetchColumn();
$specialStatement = $this->pdo->prepare(
'INSERT INTO specials (menu_item_id, title, description, badge, price_cents, display_order)
VALUES (?, ?, ?, ?, ?, ?)'
);
$specialStatement->execute([
$fatBottomId,
'The Fat Bottom Deal',
'Our signature burger at a special online price.',
'Online Special',
1099,
$lakesideDoubleId,
'Sunset Burger Pick',
'The Lakeside Double at its easygoing online demo price.',
'Dock Deal',
1299,
10,
]);
$specialStatement->execute([
$loadedFriesId,
'Loaded-Up Lunch',
'Loaded fries are $1 off weekdays from 11 to 2.',
'Weekday Deal',
$boardwalkFriesId,
'Boardwalk Break',
'A hot order of Boardwalk Fries for the table or picnic blanket.',
'Picnic Pick',
599,
20,
]);
@@ -508,8 +598,8 @@ SQL;
$taxStatement = $this->pdo->prepare(
'INSERT INTO tax_rates (name, jurisdiction, rate_basis_points) VALUES (?, ?, ?)'
);
$taxStatement->execute(['West Virginia Sales Tax', 'state', 600]);
$taxStatement->execute(['Keyser Municipal Tax', 'city', 100]);
$taxStatement->execute(['Demo State Sales Tax', 'state', 600]);
$taxStatement->execute(['Lakeview Demo Tax', 'city', 100]);
$adminStatement = $this->pdo->prepare(
'INSERT INTO users
@@ -518,7 +608,7 @@ SQL;
VALUES (?, ?, ?, ?, ?, ?, 0, CURRENT_TIMESTAMP)'
);
$adminStatement->execute([
'admin@fatbottomgrille.com',
'admin@lakesideorders.test',
password_hash('ChangeMe123!', PASSWORD_DEFAULT),
'Store Administrator',
'',
+1 -2
View File
@@ -32,7 +32,7 @@ final class Mailer
$from = sprintf(
'%s <%s>',
$this->config->get('mailgun.from_name', 'Fat Bottom Grille'),
$this->config->get('mailgun.from_name', 'Lakeside Orders'),
$this->config->get('mailgun.from_email')
);
@@ -77,4 +77,3 @@ final class Mailer
file_put_contents($directory . '/mail.log', $line, FILE_APPEND | LOCK_EX);
}
}
+2 -2
View File
@@ -30,7 +30,7 @@ final class MenuPdfExporter
$pdf = $this->buildPdf($pages);
header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="fat-bottom-grille-menu.pdf"');
header('Content-Disposition: attachment; filename="lakeside-orders-menu.pdf"');
header('Content-Length: ' . strlen($pdf));
echo $pdf;
exit;
@@ -52,7 +52,7 @@ final class MenuPdfExporter
$stream = "0.035 0.071 0.102 rg\n0 0 612 792 re f\n";
$stream .= "0.78 0.58 0.20 rg\nBT /F1 25 Tf 46 738 Td (" . $escape($businessName) . ") Tj ET\n";
$stream .= "0.91 0.92 0.90 rg\nBT /F1 10 Tf 46 718 Td (KEYSER, WEST VIRGINIA | ONLINE MENU) Tj ET\n";
$stream .= "0.91 0.92 0.90 rg\nBT /F1 10 Tf 46 718 Td (LAKESIDE PICKUP | ONLINE MENU) Tj ET\n";
$stream .= "0.78 0.58 0.20 RG\n46 704 m 566 704 l S\n";
$y = 678;
foreach ($lines as $line) {
+1 -1
View File
@@ -89,7 +89,7 @@ final class OrderStatusService
"Hi {{customer_name}},\n\nYour order {{order_number}} is now {{status_label}}.\n\n{{note}}\n\n{{tracking_url}}"
);
$values = [
'{{business_name}}' => (string) $this->config->get('business.name', 'Fat Bottom Grille'),
'{{business_name}}' => (string) $this->config->get('business.name', 'Lakeside Orders'),
'{{customer_name}}' => (string) $order['customer_name'],
'{{order_number}}' => (string) $order['order_number'],
'{{status_label}}' => order_status_label($status),
+2 -1
View File
@@ -27,9 +27,10 @@ final class TwoFactorService
);
$name = htmlspecialchars((string) $user['full_name'], ENT_QUOTES, 'UTF-8');
$businessName = (string) $this->config->get('business.name', 'Lakeside Orders');
$this->mailer->send(
(string) $user['email'],
'Your Fat Bottom Grille verification code',
"Your {$businessName} verification code",
"<p>Hi {$name},</p><p>Your verification code is <strong>{$code}</strong>.</p><p>It expires in 10 minutes.</p>"
);