Skip to content

feat(analytics): protocol analytics dashboard + subgraph (adopts + fixes #241) - #270

Merged
Sendi0011 merged 3 commits into
mainfrom
jsv-analytics-dashboard
Sep 15, 2026
Merged

Sendi0011 merged 3 commits into
mainfrom
jsv-analytics-dashboard

Conversation

@Sendi0011

Copy link
Copy Markdown
Contributor

Summary

Adopts @mijinummi's protocol analytics dashboard (original PR #241) into the org repo, resolves both CI failures, and supersedes the original PR.

What's included

  • app/api/v1/protocol/summary/route.ts — Next.js API route querying The Graph subgraph for protocol-level analytics (TVL, volume, active pools, daily trend, top pools by TVL). Response cached 60s via Next.js revalidate.
  • app/components/Dashboard.tsx — client-side AnalyticsDashboard component rendering protocol stats, per-pool TVL/volume, and daily trend data.
  • subgraph/ — The Graph subgraph scaffolding: schema.graphql, subgraph.yaml, factory.ts, pool.ts (event handlers), plus ABI placeholders.

Fixes vs original PR #241

  1. Component test failure: frontend/__tests__/pool.test.ts imported matchstick-as/assembly/index — a subgraph test framework not in frontend's dependencies. Moved to subgraph/tests/pool.test.ts where The Graph projects expect matchstick tests to live. This also removes it from vitest's test roots (__tests__/), fixing the Failed to resolve import error.
  2. Lint errors: 5× prefer-const and 1× @typescript-eslint/no-explicit-any in pool.test.ts (now const declarations, matchstick-as types). route.ts catch (error: any) replaced with instanceof Error check.
  3. Prettier: both frontend files formatted.
  4. Merged with current main.

CI

Soroban build ✅ | Frontend lint ✅ | Node unit tests ✅ | React component tests ✅ | Playwright ✅ | Edge functions ✅ | Supabase ✅ | Vercel preview ✅

Closes #241 (superseded)

mijinummi and others added 3 commits August 20, 2026 13:48
…nt + test placement

Adopts mijinummi's protocol analytics dashboard (API route + Dashboard component)
and the subgraph scaffolding (The Graph protocol indexer). Fixes two CI failures:

1. frontend/__tests__/pool.test.ts imported matchstick-as (a subgraph test
   framework not in frontend's deps) — moved to subgraph/tests/pool.test.ts
   where Graph projects expect matchstick tests to live. This also removes
   it from vitest's test roots (__tests__/).
2. prefer-const (5) and no-explicit-any (1) lint errors in pool.test.ts and
   route.ts fixed; route.ts error: any replaced with instanceof Error check.
3. Prettier run on route.ts and Dashboard.tsx.
@vercel

vercel Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
joint-save Ready Ready Preview Sep 15, 2026 3:33pm UTC
joint-save-y4yx Ready Ready Preview Sep 15, 2026 3:33pm UTC

This branch was successfully deployed

2 active deployments
Preview – joint-save — cb527977 Deployed Sep 15, 2026 by vercel[bot]
Preview – joint-save-y4yx — cb527977 Deployed Sep 15, 2026 by vercel[bot]
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.

2 participants