A lead-generation focused website for Brainchild Building Solutions, a building component supply company serving regional builders, custom home contractors, and commercial contractors.
Brainchild Building Solutions is a building component supply company that sources and supplies construction materials to builders and contractors. They specialize in:
- Roof trusses, floor joists, engineered beams
- Lumber and hardware components
- Supply chain logistics and coordination
- Expert guidance on component selection
Key Focus: Generate qualified leads through contact/quote forms while showcasing expertise and building credibility with potential clients.
- Regional Builders - Need reliable suppliers for consistent projects
- Custom Home General Contractors - Require specialized/custom components
- Commercial Contractors - Large volume projects with certification requirements
- Lead Generation Focused: Multiple contact forms strategically placed throughout the site
- Mobile-First Design: Optimized for construction workers browsing on phones at job sites
- Product Catalog: Detailed specifications for building components with quote request functionality
- Project Gallery: Portfolio of successful supply jobs with testimonials
- Performance Optimized: β₯90 Lighthouse scores, Core Web Vitals compliance
- Content Management: Easy-to-use Sanity Studio for non-technical content updates
- Real-time Visual Editing: Live preview of content changes with Sanity's Presentation Tool
- Netlify Forms Integration: Spam-protected contact forms with email notifications
- Frontend: Next.js 15 with App Router, React 19, TypeScript
- Styling: Tailwind CSS 4.x + shadcn/ui components
- CMS: Sanity v3 with TypeScript auto-generation
- Deployment: Netlify (frontend + forms) + Sanity Cloud (studio)
- Images: Next.js Image optimization with Sanity image loader
- Forms: Netlify Forms with honeypot spam protection
- Architecture: Monorepo with npm workspaces
- Home (
/
) - Hero, featured products, testimonials, services overview - Products (
/products
) - Building component catalog with specifications - Projects (
/projects
) - Portfolio of successful supply projects - About (
/about
) - Company story, team, certifications - Contact (
/contact
) - Contact form and business information - Services (
/services
) - Core services and capabilities
- Node.js 18+ and npm
- Git
- Sanity account (for CMS)
- Netlify account (for deployment and forms)
-
Clone the repository
git clone <repository-url> cd brainchild_building_solutions
-
Install dependencies
npm install
-
Set up environment variables
# Copy environment template cp .env.local.example .env.local # Add your Sanity project details NEXT_PUBLIC_SANITY_PROJECT_ID=your_project_id NEXT_PUBLIC_SANITY_DATASET=production SANITY_API_TOKEN=your_api_token
-
Run the development servers
# Start both Next.js and Sanity Studio npm run dev # Or start individually: npm run dev:next # Frontend only npm run dev:studio # Studio only
This starts:
- Next.js app at http://localhost:3000
- Sanity Studio at http://localhost:3333
- Access the Sanity Studio at http://localhost:3333
- Import sample data (optional):
npm run import-sample-data
- Create your first content using the Studio interface
- Generate TypeScript types after schema changes:
cd studio && npm run extract-types cd ../frontend && npm run typegen
brainchild_building_solutions/
βββ frontend/ # Next.js application
β βββ app/ # App Router pages
β β βββ about/ # About page with dynamic content
β β βββ contact/ # Contact page
β β βββ products/ # Product catalog
β β βββ projects/ # Project gallery
β β βββ services/ # Services page
β β βββ components/ # Reusable UI components
β βββ lib/ # Utilities and helpers
β βββ sanity/ # Sanity integration
β β βββ lib/ # Client, queries, and API
β β βββ schema/ # Type definitions
β βββ sanity.types.ts # Auto-generated TypeScript types
βββ studio/ # Sanity Studio CMS
β βββ src/
β β βββ schemaTypes/ # Content type definitions
β β β βββ documents/ # Document schemas
β β β βββ objects/ # Object schemas
β β βββ structure/ # Studio UI structure
β βββ schema.json # Extracted schema for type generation
βββ CLAUDE.md # Development guidelines
βββ SANITY_SCHEMA_WORKFLOW.md # Schema update process
βββ SANITY_TYPESCRIPT_INTEGRATION.md # TypeScript integration guide
βββ PERFORMANCE_OPTIMIZATIONS.md # Performance tracking
βββ netlify.toml # Netlify deployment config
product
- Building components with specs, images, lead timesproject
- Case studies with client info, images, components suppliedservice
- Core services with benefits and descriptionstestimonial
- Client testimonials with ratings and author infohomePage
- Homepage hero and featured content (singleton)aboutPage
- Company information with dynamic years calculation (singleton)contactPage
- Contact page content and form configuration (singleton)page
- Flexible pages with page builder componentspost
- Blog posts (legacy)person
- Team members and authors
blockContent
- Rich text content with custom markscallToAction
- CTA blocks with internal/external linksinfoSection
- Structured content sectionslink
- Flexible internal/external link handling
settings
- Global site settings, navigation, business info (singleton)
- Connect your GitHub repository to Netlify
- Set build settings:
- Build command:
npm run build --workspace=frontend
- Publish directory:
frontend/out
- Base directory:
/
(monorepo root)
- Build command:
- Configure environment variables in Netlify dashboard
- Enable Netlify Forms for contact form functionality
cd studio
npm run deploy
- Lighthouse Performance: β₯90
- Core Web Vitals:
- LCP < 2.5s
- CLS < 0.1
- FID < 100ms
- SEO Score: β₯90
- Accessibility: WCAG 2.2 AA compliance
- Clear value proposition for building component supply
- Featured products with specifications
- Social proof through testimonials
- Services overview
- Prominent call-to-action buttons
- Multiple contact forms throughout the site
- "Request Quote" buttons on product pages
- Phone numbers prominently displayed
- Clear contact information on every page
- TypeScript strict mode enabled
- ESLint + Prettier configured
- Mobile-first responsive design
- Component-based architecture
- Accessible design (WCAG 2.2 AA)
- Netlify Forms for all contact/quote forms
- Honeypot fields for spam protection
- Clear success/error states
- Mobile-optimized form layouts
- β₯10 form submissions per month within 3 months
- <40% bounce rate on product pages
- β₯90% Core Web Vitals performance scores
- Qualified leads generated through contact forms
- Improved online presence for construction industry searches
- Enhanced credibility through professional web presence
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement
) - Commit your changes (
git commit -am 'Add improvement'
) - Push to the branch (
git push origin feature/improvement
) - Create a Pull Request
- SANITY_SCHEMA_WORKFLOW.md - Schema update process
- SANITY_TYPESCRIPT_INTEGRATION.md - TypeScript integration
- PERFORMANCE_OPTIMIZATIONS.md - Performance tracking
- CLAUDE.md - Complete development guidelines and project overview
- SANITY_SCHEMA_WORKFLOW.md - Step-by-step schema update process
- SANITY_TYPESCRIPT_INTEGRATION.md - TypeScript integration deep dive
- PERFORMANCE_OPTIMIZATIONS.md - Performance improvements tracker
# Root level commands
npm run dev # Start both frontend and studio
npm run dev:next # Start frontend only
npm run dev:studio # Start studio only
npm run import-sample-data # Import sample content
# Frontend commands (in /frontend)
npm run build # Production build
npm run lint # ESLint check
npm run typegen # Generate TypeScript types
# Studio commands (in /studio)
npm run extract-types # Extract schema to JSON
npm run deploy # Deploy studio to Sanity
Every decision should support lead generation for Brainchild Building Solutions.