_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Backends for Frontends (BFF)

19. 01. 2016 1 min read intermediate

BFF pattern: separate backend for each client type. Web, mobile, IoT — each has different needs.

The Problem with One API

Mobile needs different data than web. One API = over-fetching, under-fetching, compromises.

Architecture

Web UI → Web BFF → [Order Service, User Service, Analytics]
Mobile → Mobile BFF → [Order Service, User Service]
IoT    → IoT BFF   → [Telemetry Service]

Example

// Web BFF — full data
app.get('/api/dashboard', async (req, res) => {
    const [orders, stats, notifs] = await Promise.all([
        orderService.getRecent(20),
        analyticsService.getDashboard(),
        notificationService.getUnread()
    ]);
    res.json({ orders, stats, notifs });
});

// Mobile BFF — optimized response
app.get('/api/dashboard', async (req, res) => {
    const orders = await orderService.getRecent(5);
    res.json({ orders: orders.map(o => ({ id: o.id, status: o.status })) });
});

Summary

BFF is the right choice with multiple client types. Each BFF should ideally be owned by the team developing that frontend.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.