Modular Business Website Framework: Efficient Client Site Architecture
Role: Full-Stack Developer & UX Designer
Timeline: 8 hours (MVP) + 3-5 hours per deployment
Year: 2025-2026
Clients: DesignsByADino, Amy's Hen House, The Umbral Garden
Status: 3 live sites, framework ready for additional deployments
THE HOOK
Built a reusable website architecture that deploys fully-customized small business sites in 3-5 hours—handling e-commerce, bookings, galleries, and admin dashboards while maintaining unique brand identities across completely different industries.
THE CHALLENGE
After building several websites for small businesses and independent creators, I recognized a pattern: most small business sites need identical core functionality (products/services, booking, contact, about pages) but with completely different branding and content structures.
The problem with traditional approaches:
Custom development for each client: Days to weeks per site, high costs
Website builders (Squarespace, Wix): Limited customization, inflexible, ongoing subscription costs
Generic templates: Difficult to customize deeply, clients look cookie-cutter
I needed a solution that combined the flexibility of custom development with the efficiency of templates—something that could deploy professional sites in hours, not days, while maintaining complete design freedom.
THE APPROACH
Phase 1: Building the Foundation (MVP - 8 hours)
Database Architecture (1.5 hours)
Designed flexible PostgreSQL schema supporting multiple business models
Implemented Row Level Security policies for multi-tenant architecture
Created modular tables:
gallery,shop_items,commissions,orders,site_settingsBuilt payment-processor-agnostic structure (easy to swap Square → Stripe → PayPal)
Core Pages & Features (3 hours)
Home, Gallery, Shop, Contact, About pages
Service/product display systems
Booking and commission request forms
Responsive navigation with mobile optimization
Admin Dashboard (3.5 hours)
Product/service management
Order tracking
Commission Kanban board
Gallery management
Tech Stack:
Next.js 16.1.6 | React 19 | TypeScript | Tailwind CSS 4 | Supabase PostgreSQL | Square Payments | Resend
Phase 2: The Theming System
CSS Variable-Based Customization
Every visual element pulls from a single configuration:
css
@theme {
--color-site-blue: #161854;
--color-site-gold: #AAB8EE;
--font-heading: "Georgia", serif;
--font-body: "Segoe UI", system-ui, sans-serif;
}Automatic Accessibility
Built a contrast calculation utility that ensures WCAG AA compliance automatically:
javascript
// Every component gets accessible text colors automatically
const heroBg = theme === "dark" ? "#333333" : "#FFFFFF";
const textColor = getTextColor(heroBg); // Auto-calculates contrastResult: Complete visual rebranding without touching component code.
Phase 3: Rapid Deployments (3-5 hours per site)
Configuration Process:
Update
site_settingstable with brand colors and business infoSwap logo, favicon, and background pattern assets
Configure payment integration (Square credentials)
Set up email notifications (Resend templates)
Customize content structure and copy
Deploy to Vercel
Three Live Examples:
DesignsByADino - Handcrafted Kigurumis
E-commerce with custom product showcase
Gallery system for portfolio
Commission request forms
Amy's Hen House - Handcrafted Creations
Hybrid shop/portfolio
Custom commission intake
Adapted product display
The Umbral Garden - Tarot & Metaphysical Services
Service-based booking system
Live video session scheduling
Future-proofed for shop launch
KEY FEATURES IMPLEMENTED
Performance Optimizations
React.memo for static components (Navbar, Footer) - prevents unnecessary re-renders
Dynamic imports for modals - reduces initial bundle by ~40%
WebP image conversion - 90-95% file size reductions (902KB → 48KB)
Server-side rendering for optimal SEO
Lazy loading for images
Lighthouse Performance score: 95+
Database Features
Multi-image support with backward compatibility
JSONB fields for flexible schema evolution
Strategic indexing (sub-500ms queries)
Commission Kanban with drag-and-drop ordering
Real-time updates via Supabase subscriptions
Security
Row Level Security policies at database level
Multi-environment support (sandbox/production)
Secure payment processing via Square
Storage path tracking for automatic image cleanup
Developer Experience
TypeScript for compile-time error catching
Version-controlled database migrations
Environment-based configuration
Comprehensive inline documentation
TECHNICAL CHALLENGES SOLVED
Challenge: Supporting both old single-image schema and new multi-image system without breaking existing sites.
Solution: Built backward-compatible component that gracefully handles both:
typescript
interface ShopItem {
image_url: string; // Legacy support
images: ImageData[]; // New multi-image
}
// Component adapts automatically
{item.images?.length > 0 ? (
<ImageCarousel images={item.images} />
) : (
<Image src={item.image_url} />
)}Challenge: Maintaining consistent theming while allowing complete visual customization.
Solution: CSS variables combined with automatic contrast calculation. Every component calculates accessible colors dynamically—no manual color tweaking needed.
Challenge: Payment processor flexibility without schema rewrites.
Solution: Processor-agnostic database design:
sql
CREATE TABLE orders (
payment_id TEXT,
payment_method TEXT NOT NULL DEFAULT 'square',
UNIQUE(payment_id, payment_method)
);Can swap payment providers without touching the schema.
Challenge: Image optimization at scale.
Solution: Sharp + WebP pipeline. Background images: 902KB → 48KB (94.7% reduction). Pattern images: 366KB → 36KB (90.2% reduction). Total savings: ~1.2MB per page load.
THE RESULTS
Development Velocity
First Site (MVP): ~8 hours total
Database schema: 1.5 hours
Core pages: 3 hours
Admin dashboard: 3.5 hours
Subsequent Sites: 3-5 hours each
40-60% time reduction from MVP
Reusable patterns eliminate repetitive work
Proven deployment process
Established theming system
Performance Metrics
Image Optimization:
Background images: 902KB → 48KB (94.7% reduction)
Pattern images: 366KB → 36KB (90.2% reduction)
Total page savings: ~1.2MB
All images converted to WebP
Runtime Performance:
Dynamic imports: 40% reduction in initial bundle
React.memo: Eliminated navbar/footer re-renders
Lighthouse score: 95+ (Performance)
Sub-500ms database queries
Cost Efficiency
Infrastructure:
Supabase free tier: 500,000 reads/month
Resend free tier: 100 emails/day
Square processing: 2.9% + 30¢ (industry standard)
Vercel hosting: Free tier for small sites
Actual Costs:
Within free tiers: $0/month
At scale: ~$25/month
Business Impact
For Clients:
Professional online presence at accessible price point
Automated email notifications (saves ~2 hours/week)
Real-time inventory tracking
Secure payment processing
Mobile-optimized experience
For Development:
Single codebase to maintain
Updates propagate to all sites
Type-safe development catches errors early
Zero-downtime deployments
Scalable architecture
KEY LEARNINGS
Database Design Matters Early: JSONB fields for flexible data (images array, variant metadata) allowed adding features without breaking existing sites. The multi-image backward compatibility meant no migration headaches.
Performance Has a Budget: WebP conversion achieved 90-95% file size reductions. That 1.2MB saved per page load is noticeable on mobile connections—worth the upfront optimization time.
Configuration > Code: Moving site settings from environment variables to database enabled runtime theme updates without redeployment. This single decision made the framework viable.
RLS Policies Are Powerful: Supabase Row Level Security at the database level is more robust than application-layer checks, but debugging policies requires careful planning. Building them into the framework prevented security issues across all deployments.
Progressive Enhancement Works: Forms work without JavaScript, images lazy-load, modals dynamically import. These aren't theoretical—they're achievable with Next.js and improve real user experience.
Payment Integration Takes Time: Square's Web Payments SDK needed careful error handling. Building it once saved debugging hours on subsequent sites.
Type Safety Compounds: TypeScript caught dozens of errors that would have been runtime bugs. The upfront interface investment paid off across all three deployments.
Contrast Shouldn't Be Manual: The getTextColor() utility automatically ensures WCAG AA compliance, solving dark mode accessibility before it became a problem.
TECHNICAL TAKEAWAYS
This framework proves that modern web apps don't need heavyweight solutions—smart architecture with the right tools delivers professional results efficiently.
Core Principles Validated
Design Systems Scale: CSS variables + automatic contrast = consistent theming without intervention
Database-First Security: RLS policies prove more robust than application-layer checks
Performance Through Simplification: No UI library, WebP optimization, strategic memoization = faster loads
Flexibility Enables Growth: JSONB fields and processor-agnostic schemas support evolution without migrations
Applicability Beyond These Sites
This architecture works for any small business needing:
Portfolio/gallery showcase
E-commerce with inventory management
Service booking systems
Commission/project tracking
Client communication tools
The framework demonstrates that thoughtful architectural decisions create compound returns across multiple deployments.
WHAT'S NEXT
Framework Enhancements:
Incremental Static Regeneration for product pages
Multi-language support (i18n)
Advanced analytics dashboard
A/B testing capability
New Business Types:
Service booking with calendar sync
Event ticketing system
Digital product delivery
Course/membership platforms
Technical Improvements:
Stripe as payment alternative
Enhanced admin dashboard with real-time features
Drag-and-drop image management
Automated backup system
Live Sites:
Tech Stack: Next.js 16.1.6, React 19, TypeScript, Tailwind CSS 4, Supabase PostgreSQL, Square Payments, Resend, Vercel
Key Achievement: 8-hour MVP build → 3-5 hour deployments (40-60% time reduction) with zero compromise on features or performance. Rather than building three separate websites, I engineered infrastructure that transforms days of custom development into hours of configuration.

