Skip to content

Superfluid S6 campaign dashboard -- data logic + presentation - #50

Open
thalescb wants to merge 1 commit into
masterfrom
feat/superfluid-dashboard
Open

Superfluid S6 campaign dashboard -- data logic + presentation#50
thalescb wants to merge 1 commit into
masterfrom
feat/superfluid-dashboard

Conversation

@thalescb

@thalescb thalescb commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

What this adds

Live campaign dashboard for the Superfluid SUP Rewards Season 6 campaign, fetching directly from the Superfluid Points API.

Architecture

  • superfluid-api.js -- standalone data logic module (API client, reward calculations, data transformations). Pure JS, no DOM. This is the reviewable code.
  • index.html -- presentation layer that imports the module. Dark mode, responsive, Chart.js charts.

Features

  • Campaign hero with total allocation, participants, points
  • Two pool cards (GD Actions 217,700 SUP + Ecosystem Funding 404,300 SUP)
  • Campaign analytics: daily events chart, points distribution, cumulative participants
  • Leaderboard with pagination (10/page), estimated SUP reward per wallet
  • Reward calculator: paste address, see points + estimated reward
  • How to Participate CTAs with links
  • Season toggle: switch between S6 (live) and S5 (test data with 2,611 real participants) to verify logic
  • Event caching across toggles

How to review

The data logic lives entirely in superfluid-api.js. Key functions:

  • fetchCampaign(), fetchLeaderboard(), fetchBalanceBatch() -- API calls
  • calculateReward(), calculateCombinedReward() -- reward math
  • aggregateDailyCounts(), computeCumulativeParticipants() -- chart data

How to test

Serve locally with python -m http.server 8081 --directory projects/superfluid-s4/dashboard then open http://localhost:8081. Use the S5 toggle to see real data (campaign 511, 2611 participants).

Closes #42

- superfluid-api.js: standalone API client + reward calculations + data
  transformations. Reviewable as pure JS, no DOM dependencies.
- index.html: presentation layer importing the module. Dark mode,
  responsive, Chart.js visualizations.
- Season toggle: switch between S6 (live) and S5 (test data, 2611 users)
  to verify correctness.
- Leaderboard with pagination, reward calculator, pool cards, CTAs.
- Event caching across season toggles for instant switching.

Replaces previous single-file approach with proper code/presentation
separation per team review standards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Superfluid Season 6 -- Reporting and Analytics

1 participant