RetroFed Forum
Your home away from modern life.
Server Routes vs. API Routes: Choosing the Right Approach
Post Reply
AuthorMessage
monica_b1998 lemmy.world monica_b1998@lemmy.world
Joined: 2024-08-17
Quote

4   Original
Artwork lemmy.world artwork@lemmy.world
Joined: 2025-12-03
#2 · Quote Reply

Typical architecture

- Nuxt app: Handles UI, SSR, routing, and some light data orchestration.
- Backend API: Exposes REST/GraphQL endpoints, handles business logic, auth, and data persistence.
...

In practice, many real‑world apps use a hybrid approach:

- External API: Core business logic, data models, and long‑lived endpoints.
- Nuxt server routes: BFF layer that adapts the external API to the needs of the Nuxt app.

This gives you the best of both worlds: a reusable backend plus a Nuxt‑specific layer optimized for your UI and SSR.

Source [web-archive]

// Backend‑for‑frontend (BFF)

There's a wish there was more about the concepts and more strict difference between those stated, but regardless, thank you!
I've been into PHP and web-dev for around two decades now...
And with quite much experience, I do the projects, flows and Communities of PHP, Laravel, Symfony, and sure the frequent and brilliant VueJs, InertiaJs, and, Nuxt! ✨

2
Post Reply
Back to top