Priority Fixes - Start Here
Create src/lib/theme.ts:
// src/lib/theme.ts
export const theme = {
// Card styles
card: 'glass-card',
cardAccent: 'glass-card-accent',
// Text styles
text: {
primary: 'text-white',
secondary: 'text-white/70',
muted: 'text-white/50',
accent: 'text-accent',
},
// Background styles
bg: {
deep: 'bg-color-bg-deep',
secondary: 'bg-color-bg-secondary',
glass: 'bg-white/5',
glassAccent: 'bg-accent/10',
},
// Border styles
border: {
default: 'border-white/10',
accent: 'border-accent/20',
hover: 'hover:border-white/20',
},
// Input styles
input: 'w-full rounded-lg bg-white/5 border border-white/10 p-3 text-white placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent',
// Button styles
button: {
primary: 'btn btn-primary',
outline: 'btn btn-outline',
ghost: 'btn btn-ghost',
},
};
// Helper function to combine classes
export function cn(...classes: (string | undefined | null | false)[]): string {
return classes.filter(Boolean).join(' ');
}Add to tailwind.config.js:
module.exports = {
theme: {
extend: {
colors: {
'color-bg-deep': '#1A1A1B',
'color-bg-secondary': '#242426',
'accent': '#CA8114',
'accent-light': '#E5A835',
'accent-dark': '#9B6310',
},
},
},
};Run these find/replace operations in VS Code:
Find: bg-white
Replace: bg-white/5
Find: className=".*white.*"
Review each: Replace with appropriate brand color
- Navigation (
src/components/layout/Header.tsx):
// OLD:
<Link href="/lab">Lab</Link>
// NEW:
<Link href="/build-package">Build Package</Link>- Rename Folder:
mv src/app/lab src/app/build-package- Update Internal Links:
Search for
/laband replace with/build-package:
src/app/page.tsxsrc/app/services/page.tsx- Any other files linking to lab
- Update Page Title (
src/app/build-package/page.tsx):
<PageHero
title="Build Your Package"
subtitle="Custom Quote Builder"
description="Select the services you need and get an instant quote"
/>Delete these files (they're duplicates):
rm src/components/header.tsx
rm src/components/footer.tsx
rm src/components/services.tsx
rm src/components/about.tsx
rm src/components/packages.tsx
rm src/components/package-builder.tsx
rm src/components/contact.tsx
rm src/components/team.tsx
rm src/components/hero.tsx
rm src/components/stats.tsx
rm src/components/benefits.tsx
rm src/components/cta.tsx
rm src/components/client-gallery.tsxNote: Make sure these aren't imported anywhere first!
/* Add to src/app/globals.css */
.glass-card {
@apply bg-white/5 backdrop-blur-md border border-white/10 rounded-xl shadow-lg transition-all duration-300;
}
.glass-card:hover {
@apply bg-white/10 border-white/20;
}
.glass-card-accent {
@apply bg-accent/10 backdrop-blur-md border border-accent/20 rounded-xl shadow-lg transition-all duration-300;
}
.glass-card-accent:hover {
@apply bg-accent/15 border-accent/30;
}
/* Grid overlay for backgrounds */
.grid-overlay {
background-image:
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
background-size: 50px 50px;
}
.grid-overlay-half {
background-image:
linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
background-size: 50px 50px;
}
.grid-overlay-animated {
background-image:
linear-gradient(rgba(202, 129, 20, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(202, 129, 20, 0.03) 1px, transparent 1px);
background-size: 50px 50px;
animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
0% {
background-position: 0 0;
}
100% {
background-position: 50px 50px;
}
}Home β Services β Lab β Contact
β β β β
Quote Quote Quote Quote
Home β Services (Browse) β Build Package (Configure) β Submit
- Remove quote functionality from Services page
- Make "Build Package" the only quote entry point
- Add clear CTAs pointing to Build Package
Create new folder structure:
src/components/quote/
βββ QuoteForm.tsx (Customer details)
βββ ServiceSelector.tsx (Service selection)
βββ QuotePreview.tsx (Preview & PDF)
βββ QuoteSummary.tsx (Price calculation)
βββ useQuoteState.ts (State management)
'use client';
import { useState } from 'react';
import { theme } from '@/lib/theme';
interface QuoteFormProps {
onSubmit: (data: CustomerData) => void;
}
export function QuoteForm({ onSubmit }: QuoteFormProps) {
const [formData, setFormData] = useState({
customerName: '',
customerEmail: '',
customerPhone: '',
projectName: '',
});
return (
<div className={theme.card + ' p-8'}>
<h2 className="text-2xl font-heading font-bold text-white mb-6">
Your Details
</h2>
<form className="space-y-4">
<div>
<label className={theme.text.secondary + ' text-sm mb-2 block'}>
Name *
</label>
<input
type="text"
className={theme.input}
value={formData.customerName}
onChange={(e) => setFormData({ ...formData, customerName: e.target.value })}
required
/>
</div>
{/* More fields... */}
<button type="submit" className={theme.button.primary}>
Continue
</button>
</form>
</div>
);
}Create dynamic route:
src/app/services/[category]/page.tsx
// src/app/services/[category]/page.tsx
import { Header } from '@/components/layout/Header';
import { Footer } from '@/components/layout/Footer';
import { PageHero } from '@/components/layout/PageHero';
import { serviceDefinitions } from '@/data/serviceDefinitions';
import Link from 'next/link';
export default function ServiceCategoryPage({
params
}: {
params: { category: string }
}) {
const services = serviceDefinitions.filter(
s => s.category.toLowerCase().replace(/\s+/g, '-') === params.category
);
return (
<>
<Header />
<PageHero
title={services[0]?.category || 'Services'}
subtitle="Detailed Information"
/>
<section className="py-20 bg-color-bg-secondary">
<div className="container mx-auto px-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
{services.map((service) => (
<div key={service.id} className="glass-card p-6">
<h3 className="text-xl font-heading font-bold text-white mb-3">
{service.name}
</h3>
<p className="text-white/70 mb-4">
{service.description}
</p>
<div className="text-accent font-bold mb-4">
{service.basePrice}
</div>
<h4 className="text-white font-semibold mb-2">Required Documents:</h4>
<ul className="space-y-2 mb-6">
{service.requiredDocuments.map((doc, idx) => (
<li key={idx} className="text-white/60 text-sm">
β’ {doc.name}
</li>
))}
</ul>
<Link href="/build-package" className="btn btn-primary">
Add to Package
</Link>
</div>
))}
</div>
</div>
</section>
<Footer />
</>
);
}After implementing changes, test:
- All pages load without errors
- Navigation works correctly
- Forms submit successfully
- Quote generation works
- PDF downloads correctly
- Email notifications send
- Mobile responsiveness
- Admin routes are protected
- No console errors
- All links work
# Check for white backgrounds
grep -r "bg-white" src/
# Check for duplicate components
find src/components -name "*.tsx" -type f
# Check for broken imports
npm run build
# Run linter
npm run lint
# Check for TypeScript errors
npx tsc --noEmit- White backgrounds: 649 instances
- Duplicate components: 12 files
- Quote entry points: 4
- Component size: 1,108 lines (QuoteGenerator)
- Protected routes: 0
- White backgrounds: 0 (all brand colors)
- Duplicate components: 0
- Quote entry points: 1 (Build Package)
- Component size: <300 lines each
- Protected routes: All admin routes
Solution: Clear .next folder
rm -rf .next
npm run devSolution: Restart dev server
# Ctrl+C to stop
npm run devSolution: Check imports and types
npx tsc --noEmit- β Complete Phase 1 (today)
- Review changes with team
- Test on staging environment
- Start Phase 2 (this week)
- Monitor analytics for improvements
Questions? Review the full audit in APP_AUDIT_AND_IMPROVEMENT_PLAN.md