You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a standalone AI Credits analytics data widget — a new GoodWidget app
(apps/ai-credits-analytics-web) that fetches AntSeed AI Credits analytics data and
visualizes it using the chart components shipped in PR #148 (Scorecard, LineAreaChart,
BarChart, DataTable).
Problem or opportunity
The existing AntSeed analytics dashboard (data-team repo, projects/antseed-analytics/dashboard/app.js) is a one-off vanilla JS + Chart.js static
page, live at https://gooddollar.github.io/data-team/antseed-analytics. It doesn't share
GoodWidget's design system/theme and can't be maintained or deployed alongside the other
GoodWidget standalone apps. Recreating it as a proper GoodWidget app lets it reuse the
new analytics chart components and follow the same build/deploy pipeline as ai-credits-web / superfluid-campaign-web.
Proposed solution
New app apps/ai-credits-analytics-web (Vite + React + TamaguiProvider), following the apps/ai-credits-web / apps/superfluid-campaign-web pattern (index.html, main.tsx, App.tsx, vite.config.ts, vercel.json, tsconfig.json, reactNativeSvgWeb shim,
Playwright tests).
Data-fetch/transform layer as an internal module inside the app (not a separate package
for now — revisit only if a clear reuse case emerges), recreating app.js's flow:
GET {WORKER_URL}/v1/analytics?days=365, POST {WORKER_URL}/v1/analytics/refresh
Chart 3: Unique Wallets per Day — LineAreaChart, 2 series (G$ Buyers + Credit Users)
DataTable: daily summary (date, G$ deposited, G$ streamed, total G$, AI credits USD,
wallets G$, wallets AI)
No wallet connection anywhere — purely read-only internal visualization (unlike ai-credits-web/superfluid-campaign-web, which both require wallet connect).
New deploy workflow mirroring deploy-ai-credits-web.yml / deploy-superfluid-campaign-web.yml
(own VERCEL_*_PROJECT_ID secret, preview/production jobs) — hold this file until
Laurence has confirmed specifics; do not push it without that sign-off.
Required states, flows, and behaviors
Initial load → attempt live fetch; on success, show live data with "Live" toggle active.
Live fetch fails/unreachable → fall back to generated demo data, "Demo" toggle active,
demo banner/badge shown.
Manual Live/Demo toggle → switches source; if Live selected but endpoint unavailable, show
an inline "endpoint not yet deployed" state in the chart/table sections (toggle stays
visible/clickable).
Refresh button → POST to refresh endpoint, short delay, then re-fetch; button shows a
loading state throughout.
Auto-refresh every 5 minutes using whichever source (live/demo) is currently active.
All wei-string fields converted via the documented decimal rules (18 for G$, 6 for
USD/credits, flow-rate special case) — no precision loss.
Daily summary table paginated (10 rows/page, matching the reference) with
first/prev/next/last controls.
Empty state (daily.length === 0) shown distinctly in both charts and table.
Acceptance criteria
apps/ai-credits-analytics-web exists, builds, and deploys as a standalone Vite+React app.
3 scorecards render correct values (Total G$ Spent, AI Credits Used USD, G$ Flow Rate/day).
Daily summary table renders with correct columns and pagination.
Live/Demo toggle works, including graceful fallback when the live endpoint is unreachable.
Auto-refresh every 5 minutes; manual Refresh button triggers POST /v1/analytics/refresh
then re-fetch.
BigInt wei-string conversions match the documented decimal rules.
No wallet-connection UI anywhere in the app.
New deploy workflow added, but only pushed after Laurence has confirmed its specifics.
All GoodWidget deploy workflows (existing + new) clearly show which app/widget/preview
they relate to in job/environment naming, not just the workflow file name.
Additional context
Internal work (not a bounty), requested by Thales Barbosa (relaying from Lewis) in
#goodbounties-lead, 2026-08-18 — same track as the analytics chart components (#143-146, PR #148): skips the contributor/[GoodBounty] pickup stage, implementation goes straight to a
coding agent → PR. Branch from feat/analytics-components; new PR opens against #148, not main. App/package naming and internal-module-vs-separate-package for the data layer are
an engineering judgment call, per Thales/Lewis ("start simple ... per needed basis") — revisit
if the data layer needs reuse elsewhere later. Thales has no GitHub write access — leave issue
unassigned, consistent with #143-146.
Endpoint: https://gooddollar-antseed-integration.gooddollar.workers.dev/v1/analytics?days=365
(refresh: POST /v1/analytics/refresh)
Create the plan
Based on the above description create an execution plan in a new sub-issue and preserve the original issue content unchanged.
Do not execute the plan until given instructions to do so.
Sub-issue requirements:
Title format: [DRAFT][PLAN] <what issue is being planned>
Type: Task
Description must start with: <sub-issue title>
Link the sub-issue back to this parent issue.
Instructions when creating the plan:
Map relevant files that are too be used as reference from all repos mentioned
Map new components that should be created. Assess when a new component should be created in the new savings widget package or made part of the reusable packages/ui
Feature summary
Create a standalone AI Credits analytics data widget — a new GoodWidget app
(
apps/ai-credits-analytics-web) that fetches AntSeed AI Credits analytics data andvisualizes it using the chart components shipped in PR #148 (Scorecard, LineAreaChart,
BarChart, DataTable).
Problem or opportunity
The existing AntSeed analytics dashboard (
data-teamrepo,projects/antseed-analytics/dashboard/app.js) is a one-off vanilla JS + Chart.js staticpage, live at https://gooddollar.github.io/data-team/antseed-analytics. It doesn't share
GoodWidget's design system/theme and can't be maintained or deployed alongside the other
GoodWidget standalone apps. Recreating it as a proper GoodWidget app lets it reuse the
new analytics chart components and follow the same build/deploy pipeline as
ai-credits-web/superfluid-campaign-web.Proposed solution
apps/ai-credits-analytics-web(Vite + React + TamaguiProvider), following theapps/ai-credits-web/apps/superfluid-campaign-webpattern (index.html,main.tsx,App.tsx,vite.config.ts,vercel.json,tsconfig.json,reactNativeSvgWebshim,Playwright tests).
for now — revisit only if a clear reuse case emerges), recreating
app.js's flow:GET {WORKER_URL}/v1/analytics?days=365,POST {WORKER_URL}/v1/analytics/refreshweiToGd(÷10^18),weiToUsd(÷10^6),flowRateToDaily(wei/sec × 86400, ÷10^18)
unreachable
LineAreaChart, one-time deposits + streamed)BarChartLineAreaChart, 2 series (G$ Buyers + Credit Users)DataTable: daily summary (date, G$ deposited, G$ streamed, total G$, AI credits USD,wallets G$, wallets AI)
ai-credits-web/superfluid-campaign-web, which both require wallet connect).deploy-ai-credits-web.yml/deploy-superfluid-campaign-web.yml(own
VERCEL_*_PROJECT_IDsecret, preview/production jobs) — hold this file untilLaurence has confirmed specifics; do not push it without that sign-off.
Required states, flows, and behaviors
demo banner/badge shown.
an inline "endpoint not yet deployed" state in the chart/table sections (toggle stays
visible/clickable).
POSTto refresh endpoint, short delay, then re-fetch; button shows aloading state throughout.
USD/credits, flow-rate special case) — no precision loss.
first/prev/next/last controls.
daily.length === 0) shown distinctly in both charts and table.Acceptance criteria
apps/ai-credits-analytics-webexists, builds, and deploys as a standalone Vite+React app.wallets/day, 2-series line) all render using PR feat(ui): add analytics chart components (Scorecard, Pie/Donut, Bar, Line/Area, DataTable) #148's chart components.
POST /v1/analytics/refreshthen re-fetch.
they relate to in job/environment naming, not just the workflow file name.
Additional context
Internal work (not a bounty), requested by Thales Barbosa (relaying from Lewis) in
#goodbounties-lead, 2026-08-18 — same track as the analytics chart components (#143-146, PR
#148): skips the contributor/
[GoodBounty]pickup stage, implementation goes straight to acoding agent → PR. Branch from
feat/analytics-components; new PR opens against #148, notmain. App/package naming and internal-module-vs-separate-package for the data layer arean engineering judgment call, per Thales/Lewis ("start simple ... per needed basis") — revisit
if the data layer needs reuse elsewhere later. Thales has no GitHub write access — leave issue
unassigned, consistent with #143-146.
Reference:
GoodDollar/data-team@projects/antseed-analytics/dashboard/app.jshttps://gooddollar-antseed-integration.gooddollar.workers.dev/v1/analytics?days=365(refresh:
POST /v1/analytics/refresh)Create the plan
Based on the above description create an execution plan in a new sub-issue and preserve the original issue content unchanged.
Do not execute the plan until given instructions to do so.
Sub-issue requirements:
[DRAFT][PLAN] <what issue is being planned>Task<sub-issue title>Instructions when creating the plan:
Plan specification required sections: