Langstroth

Sneak peak at the new analytics page on PeakD, powered by a new stats backend

by @asgarth · 0 votes · 0.000 HBD
I'm starting to enjoy this new weekly format where I share what I've been working on. It's helping me stay consistent, and so far it's working well. Today I completed the rework of the analytics page for PeakD (sneak peek, still not live yet). It's powered by a brand new stats aggregator built by @peak.open and @yozen (more details later in this post). ![image.png](https://files.peakd.com/file/peakd-hive/asgarth/EoAgZBRBVdg7bqTZY39jfUhfddVyqNqH8C82eDwuE9Uc1Tw4pnPu5hnogJeotWmnLPL.png) ### Sneak peek of the next PeakD update The new page nicely combines two things that really belong together: - **PeakD frontend traffic** (most viewed pages, reading time, etc.) - **on-chain account stats** (rewards, balances, HP, votes, activity trends) This gives you much better context on which posts performed best on PeakD while also seeing what was happening on-chain during the same time. ![image.png](https://files.peakd.com/file/peakd-hive/asgarth/23tHb6kpjDHZdXArdqfFABsPtS6GKJfX657WoLNEsx9EKk7ZxaoWMwBDRcknjdNKZg4rR.png) A few highlights coming in this update: - One unified analytics page - Timeframe-based charts powered by the new stats service - Top pages table with post titles, creation dates, and payout info - Better visibility for recent posts in the rankings - Extra charts for incoming and outgoing votes - Much less direct loading from Hive nodes for analytics data Overall it finally feels like a real product feature instead of a utility page that somehow made it to production. ### Powered by a new backend All of this runs on a new open source **account stats backend** by @peak.open. Huge thanks to @yozen as he built the original foundation and gave me a really solid starting point. A lot of the recent work has been turning that foundation into something more generic, complete, and easy to use across different projects. The backend is powered by HafSQL by @madhiyari. Most of the logic lives in clean, focused SQL queries exposed as simple stat endpoints. The service is very flexible thanks to a config-driven approach (one config per metric). It supports snapshots, history series, transforms, and even auto-discovery of all available stats. The backend repo is available in our official GitLab: https://gitlab.com/peakd/hive-account-stats ### Also live on HiveHub The same backend now powers a clean, generic account stats page on **HiveHub** too. ![image.png](https://files.peakd.com/file/peakd-hive/asgarth/23u6QKZoH86CEAGkQEwDDMYZ6PEHxCk6aRhzhEQRehWf1YV6kuR8yoM6NmoQNPxwuLrSY.png) This is important because the goal wasn’t just to improve PeakD — we wanted a reusable stats system that works well for any Hive account. ### TL;DR 1. PeakD is getting a modern, unified analytics page in the next update 2. It’s powered by a new, solid account stats backend (already live) 3. The same backend also powers a new generic stats page on HiveHub Big thanks again to @yozen for the original work and @madhiyari for HafSQL — this wouldn’t exist without both of them. Still lot of things to polish and improve. Feel free to reach out with your feedback once it goes live!