Back to Work

RestoLink

Morocco Restaurant Supply Marketplace

Year
2025
Status
client-delivered
Technology Stack
ReactReactViteViteTypeScriptTypeScriptExpressExpressTanStackTanStack QueryTailwind CSSTailwind
RestoLink - Screenshot 1
RestoLink - Screenshot 2
RestoLink - Screenshot 3
1 / 3

01 — Overview

Built custom server-side rendering architecture instead of Next.js to optimize performance for Morocco's inconsistent connectivity. Achieved 47% improvement in time to first contentful paint through strategic architectural decisions.

Custom SSR implementation for fine-grained rendering control
Multi-vendor catalog architecture with dynamic routing
Advanced state management with TanStack Query caching strategies

02 — The Challenge

Building a B2B/B2C marketplace for Morocco's restaurant supply industry required solving unique infrastructure challenges. Most restaurant owners operate in areas with unreliable internet connectivity, making traditional Next.js SSR approaches impractical.

The platform needed to serve thousands of products across multiple vendors while maintaining fast load times even on 3G networks—a requirement that led to abandoning Next.js 15 in favor of a custom SSR solution.

Technical Requirements
Support 3G network speeds (100-200ms latency)
Multi-vendor product catalog with real-time inventory
Server-side rendering for SEO and performance
Progressive enhancement for offline capabilities

03 — Technical Solution

I built a custom server-side rendering system using Express.js that pre-renders React components on the server. This approach gave us complete control over the rendering pipeline and allowed aggressive optimization for low-bandwidth scenarios.

By extracting and inlining critical CSS for above-the-fold content, we achieved a 47% improvement in First Contentful Paint compared to the initial Next.js implementation—critical for user retention in low-connectivity environments.

04 — Performance Metrics

47%
FCP Improvement
First Contentful Paint optimization on 3G networks
<2s
Time to Interactive
On average mobile 3G connection (100ms latency)

The custom SSR solution outperformed Next.js in our specific use case by giving us fine-grained control over HTML streaming, CSS delivery, and JavaScript hydration timing. This architecture became the foundation for all subsequent performance optimizations.

05 — Key Learnings

Context-Driven Technology Choices

Next.js is an excellent framework, but not every project needs it. Understanding your infrastructure constraints (network reliability, user device capabilities) should drive architectural decisions—not framework popularity.

Performance as a Feature

In emerging markets, performance isn't just about user experience—it's a core product requirement. A 2-second delay can be the difference between a sale and an abandoned cart.

Building vs. Configuring

While frameworks provide conveniences, building custom solutions when needed teaches you the fundamentals. This project deepened my understanding of SSR, hydration, and critical rendering paths in ways a framework would have abstracted away.