Skip to content

Core Concepts of Polyfea

Polyfea combines modern web standards with cloud-native Kubernetes patterns to create a powerful microfrontend architecture. This guide explains the fundamental concepts that make Polyfea work.

Introduction

Polyfea bridges two worlds: browser-based web components and Kubernetes-managed deployments. Instead of hardcoding microfrontends into your application, Polyfea lets you declare them as Kubernetes resources that are dynamically assembled at runtime.

This architecture enables:

  • Independent deployment - Teams deploy microfrontends without coordinating releases
  • Runtime composition - Applications adapt based on available components
  • Declarative configuration - Infrastructure-as-code for your frontend
  • Multi-tenancy - Safe isolation between teams and applications

Let's explore the key concepts that power this architecture:

  • Web Components are the building blocks of Polyfea's frontend architecture. They are custom HTML elements that encapsulate functionality, styles, and behavior.
  • Kubernetes Custom Resources allow you to define microfrontends as first-class Kubernetes objects, enabling declarative configuration and management.
  • Browser-Side Loading is handled by the Polyfea core library, which dynamically loads and renders web components based on the metadata provided by the Kubernetes controller.
  • Display Rules let you conditionally render microfrontends based on context, user roles, or other criteria, providing flexibility in how components are presented.
  • The Complete Flow outlines how Polyfea orchestrates the interaction between the browser, Kubernetes controller, and microfrontends to deliver a seamless user experience.

Key Benefits of This Architecture

1. Decoupled Development - Teams define WebComponents in their namespace - No coordination needed for deployments - Independent release cycles

2. Runtime Composition - Application structure determined at runtime - Add/remove features without redeploying shell - A/B testing and feature flags via display rules

3. Security & Isolation - Namespace policies prevent unauthorized access - CSP headers protect against injection - Each microfrontend loads from its own service

4. Kubernetes-Native - GitOps-friendly YAML definitions - Standard kubectl commands - Integrates with existing CI/CD

5. Progressive Enhancement - Load only what's needed - Dependency management automatic - Failed components don't break the app