The Breed Industries website is a modern Next.js application showcasing the company's services and providing interactive features for customers, including a quote generation system and contact form.
- Framework: Next.js 16.1.1
- UI Library: React 18.3.1
- Styling: TailwindCSS 3.4.15
- Email Service: SendGrid (SMTP relay via Nodemailer)
- PDF Generation: Puppeteer with chrome-aws-lambda
- Deployment: Netlify
/
├── .github/workflows/ # GitHub Actions workflows
├── .next/ # Next.js build output
├── assets/ # Static assets like images
├── public/ # Public assets
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes
│ │ │ ├── contact/ # Contact form API
│ │ │ └── generate-quote/ # Quote generator API
│ │ └── ... # Page routes
│ ├── components/ # React components
│ └── ... # Other source files
├── .env # Environment variables (non-sensitive)
├── .env.local # Local environment variables (sensitive)
├── netlify.toml # Netlify configuration
└── package.json # Project dependencies
The quote generation system allows customers to request quotes for services. It includes:
- Interactive form for customer details and service selection
- PDF generation using Puppeteer
- Email delivery via SendGrid
Implementation Files:
src/components/QuoteGenerator.tsx: Frontend componentsrc/app/api/generate-quote/route.ts: API endpoint
The contact form enables visitors to send inquiries directly to the company:
- Form validation
- Email delivery via SendGrid
- Success/error feedback
Implementation Files:
src/components/ContactForm.tsx: Frontend componentsrc/app/api/contact/route.ts: API endpoint
The application requires the following environment variables:
# Required for email functionality (SendGrid SMTP)
SENDGRID_SMTP_HOST=smtp.sendgrid.net
SENDGRID_SMTP_PORT=587
SENDGRID_SMTP_USER=apikey
SENDGRID_SMTP_PASS=your_sendgrid_smtp_api_key
COMPANY_EMAIL=info@thebreed.co.za
# Optional for local development
PORT=3000
-
Local Development:
npm run dev
-
Building for Production:
npm run build
-
Running Production Build:
npm start
The application is configured for deployment on Netlify. See DEPLOYMENT_GUIDE.md for detailed instructions.
- "Unauthorized" Error: Check that the SendGrid API key is properly set in environment variables
- PDF Generation Failure: Ensure Puppeteer and chrome-aws-lambda are properly configured for the deployment environment
- Logo Not Appearing: Verify the assets directory is included in the deployment
- Email Not Sending: Verify SendGrid API key and sender authentication
- Form Validation Errors: Check browser console for specific validation errors
To add new services to the quote generator:
- Update the service options in
src/components/QuoteGenerator.tsx - Ensure the API endpoint in
src/app/api/generate-quote/route.tscan handle the new service types
Email templates for quotes and contact form submissions can be modified in their respective API route files:
- Quote emails:
src/app/api/generate-quote/route.ts - Contact form emails:
src/app/api/contact/route.ts