Skip to content

Build the analytics module scaffold behind its feature flag #249

Description

@Lakes41

Difficulty: Advanced | Type: Feature

Background: NEXT_PUBLIC_FEATURE_ANALYTICS exists in the feature-flag table, defaulting to false in every environment, and "Advanced analytics" is explicitly listed under "Deferred (intentionally)."

Problem: There's currently no analytics module at all to gate — the flag exists as a reserved placeholder with nothing behind it, meaning the flag's "Feature unavailable" state is the entire experience today.

Expected Outcome: A first working version of the analytics module exists (e.g. membership growth over time, resource access frequency, role distribution), rendered only when the flag is explicitly enabled, using data available from existing endpoints (GET /v1/members, GET /v1/admin/events) without requiring new backend work.

Suggested Implementation: Add an app/admin/analytics/ route wrapped in <FeatureGate enabled={features.analytics} name="Analytics">, compute simple aggregate charts client-side from existing member/event data (e.g. using a lightweight charting library), and add the nav entry filtered by the flag per the existing pattern.

Acceptance Criteria:

  • Analytics page renders real, correctly computed aggregates from mock-mode data.
  • Page and nav entry are fully hidden when the flag is off (default), consistent with other gated modules.
  • At least two distinct chart/metric views are implemented (not a single placeholder number).

Likely Affected Files/Directories: app/admin/analytics/ (new), lib/features.ts, components/nav.tsx

Labels: feature, architecture, GrantFox OSS, Maybe Rewarded, Official Campaign | FWC26

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesOfficial Campaign | FWC26Official FWC26 campaign issue — eligible for campaign scoring and rewardsarchitectureStructural / design-level changefeatureNew feature, enhancement, or functional addition

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions