Skip to Main Content

The Feature Registry is a core architectural feature of the Stock SaaS Application that formalizes how application features are registered, structured, and surfaced across the system. It serves as the canonical source of truth for what features exist in the application, how they are implemented in code and data, and how they are accessed and personalized for different users through the Rich Role system.

This registry addresses a common and growing problem in complex SaaS applications: as functionality expands across dashboards, analytics tools, admin panels, and workflows, the ability to manage and trace features becomes increasingly difficult. This leads to fragmented permissions, duplicated work, inconsistent onboarding, and opaque system behavior.

The Feature Registry introduces a structured metadata layer that provides:

Developers interact with the Feature Registry through a simple, structured JSON or TypeScript file (featureRegistry.ts), which defines each feature and links it to source directories (e.g., src/features/orgGraph), database schemas, and configuration flags (e.g., Firebase Remote Config keys).

From a product perspective, this enables:

Developer Inspiration

This pattern is inspired by modular monorepo systems like Nx, feature flagging tools like LaunchDarkly, and metadata-driven CMS platforms. It draws architectural ideas from frameworks like Django’s apps.py, which organizes modular features with clear domain boundaries.

🔐 Role Access

System Administrator

System Administrators are the owners of the Feature Registry. They can view and manage all registered features, update configuration for gating/rollout, and ensure that each feature aligns with standardized source code paths and access rules.

User Stories:

Customer Success

Customer Success may need to inspect feature definitions when supporting a customer or diagnosing role-based access issues. While they can’t define new features, they need read-only access to understand what each feature does and which users should see it.

User Stories:

Customer Administrator

Customer Administrators don’t directly interact with the registry, but may benefit from simplified read-only views that explain what features are enabled for their organization. This supports transparency and delegated access control.

User Stories:

Manager / Standard User

These users don’t interact with the Feature Registry directly. However, their experience is dynamically personalized based on it. The features they see, the content they access, and the actions they can take are governed by registry rules.

No direct UI or user stories apply.

📄 Pages and Screens

1. Feature Registry Overview Page

Displays a list of all registered features with metadata columns. Allows creation, editing, and deletion (restricted by role). Supports search and filtering by role access, feature type (core/experimental), and flag status.

Screen Content:

2. Feature Registry Detail Page

View/edit page for an individual feature. Used by System Admins to define a feature or by support staff to understand its composition.

Screen Content:

3. Role-to-Feature Matrix View

Table view showing which Rich Roles have access to which features. Provides matrix-style layout for visibility and export. Filters for subscription tier, customer, or role.

Screen Content:

🧱 Data Model

NameDescriptionConstraintsNotes
NameDescriptionConstraintsNotes
keyUnique feature identifierRequired, unique, lowercase slugUsed in code, configs
nameHuman-friendly display nameRequired, max 128 charsAppears in UI
descriptionFeature summaryOptional, max 512 chars 
code_pathPath to feature source codeRequirede.g. src/features/orgGraph
db_tablesList of related DB tablesOptional, multi-stringFor traceability
available_rolesArray of Rich Role keysOptionalUsed to drive personalization
flags.enabled_by_defaultWhether the feature is active by defaultBooleanDefault: true
flags.subscription_requiredTier required (e.g., free, pro, enterprise)EnumOptional gating model
flags.experimentalFeature is in beta rolloutBooleanDefault: false

🤖 LLM Query

LLMs can be used to:

LLMs can be embedded as a helper within the Feature Registry Detail screen to auto-fill draft metadata or perform QA checks on incomplete records.