Skip to content

Latest commit

Β 

History

History
455 lines (364 loc) Β· 10.5 KB

File metadata and controls

455 lines (364 loc) Β· 10.5 KB

Quick Implementation Guide

Priority Fixes - Start Here


🎯 PHASE 1: IMMEDIATE FIXES (Do Today)

1. Fix White Backgrounds Globally (30 minutes)

Step 1: Create Theme Utility

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(' ');
}

Step 2: Update Tailwind Config

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',
      },
    },
  },
};

Step 3: Find and Replace

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


2. Rename "Lab" to "Build Package" (15 minutes)

Files to Update:

  1. Navigation (src/components/layout/Header.tsx):
// OLD:
<Link href="/lab">Lab</Link>

// NEW:
<Link href="/build-package">Build Package</Link>
  1. Rename Folder:
mv src/app/lab src/app/build-package
  1. Update Internal Links: Search for /lab and replace with /build-package:
  • src/app/page.tsx
  • src/app/services/page.tsx
  • Any other files linking to lab
  1. 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"
/>

3. Delete Duplicate Components (10 minutes)

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.tsx

Note: Make sure these aren't imported anywhere first!


4. Standardize Glass Cards (20 minutes)

Update globals.css:

/* 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;
  }
}

πŸš€ PHASE 2: STRUCTURAL IMPROVEMENTS (This Week)

1. Simplify Quote Flow

Current (Confusing):

Home β†’ Services β†’ Lab β†’ Contact
  ↓       ↓        ↓       ↓
Quote  Quote   Quote  Quote

New (Clear):

Home β†’ Services (Browse) β†’ Build Package (Configure) β†’ Submit

Implementation:

  1. Remove quote functionality from Services page
  2. Make "Build Package" the only quote entry point
  3. Add clear CTAs pointing to Build Package

2. Split QuoteGenerator Component

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)

Example: QuoteForm.tsx

'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>
  );
}

3. Create Service Detail Pages

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 />
    </>
  );
}

πŸ“‹ TESTING CHECKLIST

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

πŸ” VERIFICATION COMMANDS

# 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

πŸ“Š BEFORE/AFTER METRICS

Before:

  • White backgrounds: 649 instances
  • Duplicate components: 12 files
  • Quote entry points: 4
  • Component size: 1,108 lines (QuoteGenerator)
  • Protected routes: 0

After:

  • 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

πŸ†˜ TROUBLESHOOTING

Issue: Build fails after renaming lab

Solution: Clear .next folder

rm -rf .next
npm run dev

Issue: Styles not applying

Solution: Restart dev server

# Ctrl+C to stop
npm run dev

Issue: TypeScript errors

Solution: Check imports and types

npx tsc --noEmit

πŸ“ž NEXT STEPS

  1. βœ… Complete Phase 1 (today)
  2. Review changes with team
  3. Test on staging environment
  4. Start Phase 2 (this week)
  5. Monitor analytics for improvements

Questions? Review the full audit in APP_AUDIT_AND_IMPROVEMENT_PLAN.md