← Back to Projects
Dashboard

CFA Trending (CFA Radar)

May 21, 2026
5 min read

Context: The communications team needed to detect real TikTok trends (hashtags, words, accounts, audios, topics, and videos) without relying on “what appears on the feed,” and to compare week over week with an auditable history.


The challenge

Moving from a manual, subjective process to a reliable radar with data, filters, and consistency.

BeforeAfter
Someone checked the feed “by eye”Structured data by keyword
No history or traceabilityEvery sync has an auditable syncId
Metrics impossible to compareAutomatic weekly aggregations
Dependent on one personDashboard accessible to the whole team

The result

An internal dashboard app that centralizes trend analysis:

  • Syncs data by keywords from Apify
  • Normalizes and persists the dataset in PostgreSQL
  • Calculates aggregations and weekly metrics ready for consumption
  • Protects access with JWT + HTTP-only cookie

What is it and what does it do?

CFA-Trending (also called CFA Radar) is an internal application built to monitor trending TikTok content within a defined area of interest (sector/keywords).

ComponentDescription
weeklyMetricsVolume, behavior, growth signals
trendingHashtagsHashtags with the most traction
trendingWordsEmerging keywords
accountsTableAccounts gaining traction
trendingTopicsHot topics of the period
trendingAudiosTrending audios
featuredVideosFeatured videos for inspiration

How does it work?

Login and access control

The user logs in from the UI. The API validates credentials (environment variables). If correct, it signs a JWT and stores it as an HTTP-only auth cookie. A middleware protects routes — no valid cookie redirects to /login.

Sync and batch versioning

  • sync=false — reads the latest existing batch
  • sync=true or no previous data — queries Apify, transforms raw items to CleanVideo, saves to DB with a unique syncId

Dashboard aggregations

With the latest syncId, all structures consumed by the UI are calculated. The frontend only renders, filters, and presents.


Tech stack

LayerTechnology
FrontendNext.js (App Router) + React + TypeScript
UITailwind CSS + lucide-react
Backend APIHono inside Next (/api/*)
AuthJWT + HTTP-only cookie
DatabasePostgreSQL + drizzle-orm + postgres-js
Data sourceApify (TikTok keyword search)
Validationzod + react-hook-form
Testingvitest (with playwright browser support)
UI workshopStorybook

What does it enable?

  • Standardizes analysis: everyone looks at the same metrics calculated with the same logic
  • Auditable history: every batch has a syncId to track and compare
  • Reduces operational friction: one “Sync” button replaces repetitive manual tasks
  • Dev/mock mode: USE_MOCK_DATA=true lets you develop without depending on Apify

Future vision

Evolve the radar into a more complete editorial flow:

  • Save selections and internal notes per video/topic
  • Create collections and reports by campaign
  • Automated exports (weekly summaries for the team)

Subscribe to the newsletter

Get the latest insights on social engineering delivered directly to your inbox.