Best of marmelabOctober 2025

  1. 1
    Article
    Avatar of Marmelabmarmelab·32w

    Do you need a Backend For Frontend?

    The Backend-for-Frontend (BFF) pattern addresses common issues in multi-client applications where frontend teams struggle with API complexity and performance problems. A BFF acts as a dedicated translation layer between frontends and backend services, aggregating data and handling client-specific logic. While it can dramatically improve development velocity and mobile performance, it's not suitable for simple applications or small teams due to increased operational complexity.

  2. 2
    Article
    Avatar of Marmelabmarmelab·28w

    From GraphQL to Zod: Simplifying Arte's API Architecture

    Marmelab helped Arte migrate from a complex GraphQL-based backend-for-frontend to a simpler REST API architecture using Zod for runtime type validation. The original GraphQL layer, implemented in 2017 to aggregate data across multiple platforms, had evolved into a REST API that internally used GraphQL.js, creating maintenance overhead and onboarding friction. By prototyping with the most complex endpoint first, the team discovered Zod could provide the same runtime type safety as GraphQL schemas while reducing architectural complexity. Key challenges included handling runtime validation, JSON serialization gotchas with undefined values, and filtering extra properties. Advanced patterns like using merge() instead of intersection() for discriminated unions proved essential. The migration reduced cognitive load while maintaining type safety, demonstrating that architectural decisions should evolve with project needs.