Skip to main content

Nuxt Backend-for-Frontend

How the Shell uses Nuxt server routes as a BFF layer.

BFF Pattern

The Shell implements the Backend-for-Frontend pattern using Nuxt server routes to:

  • Handle authentication flows
  • Proxy API requests
  • Manage sessions
  • Transform data

Server Routes

TODO: Document server routes:

Authentication Routes

  • POST /api/auth/hydra/login - Hydra login flow
  • POST /api/host/logout - Logout

User Routes

  • GET /api/host/me - Current user session

Webhook Routes

  • POST /api/webhooks/kratos/identity - Kratos identity webhook

Proxy Routes

  • ALL /c5/* - Legacy Core5 proxy
  • GET /c5-asset/* - Legacy asset proxy

Server Middleware

TODO: Document server middleware:

  • Authentication middleware
  • CORS handling
  • Request logging

Session Management

TODO: Document how sessions are managed in server routes

API Proxying

TODO: Document how Shell proxies requests to:

  • AppServer GraphQL
  • AppServer gRPC
  • Legacy systems