Crafting a Performance-First Website for a Public Charity
Frontend Developer
Dhaga is a public charity / NGO that needed their digital presence to communicate their mission and showcase their work in the community. The challenge wasn't building features — it was exercising restraint. Every kilobyte matters when your audience is browsing on mobile networks in India. I built a site that loads instantly, looks polished, and uses almost nothing.
Where Less Is More
Content-heavy sites typically suffer from performance bloat — heavy JavaScript frameworks, unoptimized high-resolution images, and complex animations that destroy mobile performance. Dhaga's audience — supporters, donors, and community members — primarily browses on mobile in bandwidth-constrained environments. The organization needed visual impact without the technical weight.
Target audience browses primarily on mobile with variable network speeds
Event and field photography demands high-quality images that typically bloat page weight
Previous site had poor mobile Lighthouse scores affecting organic discovery and outreach
The organization needs a credible, polished presence — can't look like a template site
Minimal Dependencies, Maximum Impact
I adopted a constraint-driven design philosophy: what's the absolute minimum technical surface area needed to deliver a polished, credible experience for the organization? Every library had to justify its weight. The answer was 6 dependencies total.
Static Site Generation (SSG)
Pre-rendered every page at build time. Zero server compute, zero cold starts. Deployed to CDN edge nodes for instant global delivery.
Next.js Image Optimization Pipeline
Leveraged Next.js Image component for automatic WebP conversion, responsive srcset generation, and lazy loading with blur placeholders for the organization's event and community imagery.
Route-Based Code Splitting
Automatic route splitting ensures visitors only download JavaScript for the page they're viewing. Gallery code doesn't load until the gallery is visited.
Lightbox with Preloading
yet-another-react-lightbox handles full-screen gallery viewing with adjacent image preloading — the next image loads while you're viewing the current one.
System Architecture
Interactive architecture map — click any node to trace its connections.
Data Flows (click a node to filter)
Designing Under Constraints
Building a performance-first site isn't about adding things — it's about having the discipline to not add things. Every feature request was weighed against its performance cost.
Week 1: Design System
Established Tailwind utility patterns, responsive breakpoints, and typography scale. No component library — just Tailwind utilities and custom CSS where needed.
Week 2: Image Pipeline
Configured the Next.js Image optimization pipeline. Tested various quality/size tradeoffs until finding the sweet spot for community and event photography on mobile.
Week 3: Gallery & Interactions
Integrated the lightbox with preloading strategy. Added subtle CSS transitions for hover states — no JavaScript animation library needed.
Week 4: Performance Audit & Launch
Ran Lighthouse audits, fixed remaining CLS issues, optimized LCP with priority image loading, and deployed to CDN with perfect scores.
Elegance Through Simplicity
The final site proves that the best performance optimization is not needing the thing in the first place. Six dependencies, perfect scores, zero ongoing server costs.
Perfect Lighthouse performance on mobile — 100/100 across all metrics
Full-screen image gallery of the organization's work and causes with seamless preloading between images
Responsive design that feels premium on every screen size (mobile-first)
Zero server costs — entire site served from CDN edge nodes globally
Only 6 runtime dependencies — minimal maintenance surface and zero security vulnerabilities
Performance as a Feature
When your site loads instantly on a 3G connection in rural India, that IS the feature. The brand's digital experience finally matches the quality of their physical products.
What I Took Away
“The best dependency is no dependency”
Every npm package is a maintenance burden, security surface, and bundle weight. For a content site, vanilla CSS transitions beat Framer Motion. Tailwind utilities beat component libraries.
“SSG is underrated for content and nonprofit sites”
A charity's content site doesn't need real-time data. Static generation gives you perfect caching, zero server costs, and the fastest possible time-to-first-byte. It's the obvious choice once you stop defaulting to SSR.
“Image optimization is the highest-ROI performance work”
For an image-heavy site, proper srcset, WebP conversion, and lazy loading with blur placeholders delivered more performance improvement than any code optimization could.
Tech Stack
Framework
Styling
Gallery
Deployment
Building an Animation-Rich Financial Services Platform on Next.js 15
Dhan Orbis Capital • 2024