Menu

1 / 2

The Tiny Proxy That Fixed Local Development for Our Multi-Repo Frontend

DEV Community·Fabio Arcari·6 months ago
#niJypRFz
#api#frontend#microservices#proxy#local
Reading 0:00
15s threshold

This article is a follow-up to From Independent Microsites to Context-Driven Architecture , where we explain why we split our frontend into multiple independent Next.js repositories.

If you'd rather explore the code before reading the architecture behind it, a small demo is available here: https://github.com/Subito-it/articles-code/tree/main/olympus-mini

The Problem Everyone in a Micro-Frontend Setup Hits

Your production environment has a smart edge router: Akamai, Cloudflare, nginx, whatever, that maps URL paths to different frontend applications:

/search → next.js app A /ads → next.js app B /profile → next.js app C

Enter fullscreen mode

Exit fullscreen mode

It works beautifully in production. Then you open your laptop.

Each app runs on its own port, and suddenly you're managing this:

localhost:3001 → app A localhost:3002 → app B localhost:3003 → app C

Enter fullscreen mode

Exit fullscreen mode

Two things break immediately:

Cross-app links stop working.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.