A modern, OEM-focused website for RENOZ Energy built with TanStack Start.
- Modern Stack: TanStack Start (React full-stack framework)
- Design System: RENOZ brand colors + authentic brand aesthetic
- CMS Integration: Supabase for products, blog, and form management
- Contact Forms: Integrated with Supabase + email notifications
- Responsive: Mobile-first design with tested breakpoints
- Performance: Optimized for Lighthouse scores 95+
- Plausible Analytics: Privacy-focused, no cookie banner needed
- Web Vitals Tracking: Automatic Core Web Vitals monitoring
- Vercel Analytics: Real User Monitoring (optional)
- Error Tracking: Built-in logging for debugging
- Content Security Policy: Comprehensive CSP headers
- Security Headers: HSTS, X-Frame-Options, CSP, and more
- PWA Support: Service worker for offline fallback
- Image Optimization: WebP format, lazy loading, proper caching
- Code Splitting: Automatic with TanStack Router
- Edge Functions: Server-side form processing
- Meta Tags: Comprehensive OG and Twitter cards on all pages
- Structured Data: Schema.org Organization markup
- Sitemap: Auto-generated with all routes
- Robots.txt: Configured for optimal crawling
- Fast Loading: < 3s on 3G connections
- GitHub Actions: Automated lint, build, and type checking
- TypeScript: Full type safety
- Biome: Fast linting and formatting
- Hot Reload: Instant feedback in development
- Dev Tools: TanStack Router and React devtools integrated
- Node.js 18+ (22.12+ recommended)
- Bun (recommended) or npm - Bun is faster and used in CI
- Supabase account
- Install dependencies:
# Using Bun (recommended)
bun install
# Or using npm
npm install- Set up environment variables:
# Copy the template to create your .env file
cp env.template .envEdit .env and add your credentials. See env.template for detailed instructions.
Required Variables:
VITE_SUPABASE_URL- Your Supabase project URLVITE_SUPABASE_ANON_KEY- Your Supabase anonymous keySUPABASE_SERVICE_ROLE_KEY- Server-only Supabase key used after Turnstile verification to save form submissionsVITE_TURNSTILE_SITE_KEY- Cloudflare Turnstile site key (for spam protection)TURNSTILE_SECRET_KEY- Cloudflare Turnstile secret keyRESEND_API_KEY- Resend API key (for email notifications)
Optional Variables (have defaults):
CONTACT_FORM_TO_EMAIL- Where contact form submissions go (default: sales@renoz.energy)WARRANTY_TO_EMAIL- Where warranty registrations go (default: support@renoz.energy)
-
Set up Supabase database:
- Create a new Supabase project at https://supabase.com
- Run the SQL schema from
supabase-schema.sqlin the SQL Editor - Run
setup-storage.sqlto create the warranty uploads bucket and RLS policies - This creates tables:
products,posts,inquiries,warranty_registrations
-
Start the development server:
# Using Bun (recommended)
bun run dev
# Or using npm
npm run devThe site will be available at http://localhost:3000
src/
├── routes/ # File-based routing
│ ├── index.tsx # Home page
│ ├── about.tsx # About page
│ ├── contact.tsx # Contact form
│ ├── homeowners.tsx # B2C landing page
│ ├── installers.tsx # B2B installer page
│ ├── admin.tsx # CMS admin interface
│ └── products/ # Product category pages
├── components/
│ ├── layout/ # Header, Footer
│ ├── ui/ # Button, Card components
│ └── sections/ # Page sections
├── lib/
│ └── supabase.ts # Supabase client
└── styles.css # Global styles + CSS variables
- Primary Green:
#00B140(RENOZ brand) - Cream:
#F5F0E8(section backgrounds) - Black:
#1A1A1A(hero/dark sections) - White:
#FFFFFF(content backgrounds)
- Font: Inter (Light 300, Regular 400, Medium 500, Bold 700)
- Headlines: Bold, large sizes (40-64px)
- Body: Light/Regular (16-18px), line-height 1.6
- Home (
/): Hero, feature panels, product segments, value props, CTA - Homeowners (
/homeowners): B2C-focused landing page - Installers (
/installers): B2B technical specs and support - Products (
/products): Overview and category pages (Residential, Rural, Commercial) - About (
/about): Company mission and certifications - Contact (
/contact): Contact form with Supabase integration - Warranty (
/warranty): Warranty registration form with file uploads - Admin (
/admin): CMS interface for products and blog posts
The database schema includes:
- products table: Product catalog with categories
- posts table: Blog/Resources CMS
- inquiries table: Contact form submissions
- warranty_registrations table: Warranty registration submissions
Row Level Security (RLS) is enabled:
- Products: Public read, authenticated write
- Posts: Public read published, authenticated write
- Inquiries: Public insert, authenticated read
-
Push to GitHub
git init git add . git commit -m "Initial commit" git push -u origin main
-
Import to Vercel
- Go to vercel.com → New Project
- Import GitHub repository
- Framework: Vite
- Build Command:
npm run build - Output Directory:
.output
-
Add Environment Variables (in Vercel Dashboard)
VITE_SUPABASE_URL=https://your-project.supabase.co VITE_SUPABASE_ANON_KEY=your_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key VITE_TURNSTILE_SITE_KEY=your_key TURNSTILE_SECRET_KEY=your_key RESEND_API_KEY=re_your_key
-
Deploy!
📖 Comprehensive Guide: See DEPLOYMENT.md for full deployment checklist, post-deployment tasks, SEO setup, and troubleshooting.
Code Quality:
-
bun run checkpasses (lint + format) -
bun run buildsucceeds - All forms tested locally
Services Setup:
- Supabase database created & schema deployed
- Cloudflare Turnstile configured
- Resend account setup & domain verified
- All environment variables ready
Content & SEO:
- All images optimized (WebP)
- Meta tags on all pages
- Sitemap up to date
- Legal pages reviewed
Day 1:
- Test all forms in production
- Verify email notifications
- Check mobile responsiveness
- Test page load speed
Week 1:
- Enable Vercel Analytics
- Set up Plausible Analytics
- Submit sitemap to Google Search Console
- Monitor Core Web Vitals
Month 1:
- Review analytics data
- Check form submissions in Supabase
- Monitor error logs
- Update content as needed
- Format:
npm run format(Biome) - Lint:
npm run lint(Biome) - Build:
npm run build - Preview:
npm run preview
- Logo: RENOZ ENERGY (text-based, green accent on "O")
- Colors: Defined in
src/styles.cssCSS variables - Font: Inter (Google Fonts)
- Create account at https://supabase.com
- Create new project
- Go to Settings > API to get URL and anon key
- Run
supabase-schema.sqlin SQL Editor - Run
setup-storage.sqlto create warranty uploads bucket
- Sign up at https://dash.cloudflare.com/sign-up/turnstile
- Add a new site (use your domain or 'localhost' for dev)
- Copy Site Key →
VITE_TURNSTILE_SITE_KEY - Copy Secret Key →
TURNSTILE_SECRET_KEY
- Sign up at https://resend.com (free: 100 emails/day)
- Verify your domain (or use resend.dev for testing)
- Go to API Keys and create a new key
- Copy the API key (starts with 're_') →
RESEND_API_KEY
- Contact Form: Visit
/contactand submit a test inquiry - Warranty Form: Visit
/warrantyand submit a test registration - Check Supabase tables for data
- Check email inbox for notifications
- Turnstile spam protection
- Email notifications via Resend
- Saves to Supabase
inquiriestable - Query parameter support:
homeowner/residential→ residential inquiriesinstaller/distributor/developer/partner→ partnership inquiriescommercial/consultation/farm/off-grid→ commercial inquiriesgeneral→ general inquiries
- Multi-step form with validation
- File uploads (images/PDFs) to Supabase Storage
- Automated emails to:
- Support team (full details)
- Installer (confirmation)
- Homeowner (confirmation, if applicable)
- Generates unique warranty ID
- Saves to
warranty_registrationstable
- ✅ Warranty form design aligned with site aesthetic
- ✅ Turnstile and Resend integration complete
- ✅ File upload system working
- Add authentication for admin interface
- Implement blog post detail pages
- Add case study detail pages
- Performance optimization (image lazy loading, etc.)
Private - RENOZ Energy