An admin-only social media dashboard for tracking members and internal Bricks/Brett accounts across Instagram, TikTok, YouTube, and Facebook Reels.
Bricks collects daily social media performance data, stores it historically, and surfaces growth over time through:
- daily view counts
- weekly and monthly average views per content item
- follower growth over time
- pre-Bricks vs post-Bricks comparisons
- Next.js 16 with the App Router (Node 22)
- TypeScript
- Tailwind CSS for styling
- Clerk for admin authentication
- Neon Postgres with Drizzle ORM for data storage
- Vercel Cron + Vercel Workflow for daily sync orchestration
- Modash.io for Instagram, TikTok, and YouTube data
- Apify for Facebook Reels data
- Vercel for hosting and deployment
- Admin login only
- Admin ability to add and manage tracked people
- Admin ability to add and manage public social media accounts
- Daily sync of public profile and content metrics
- Daily historical storage in the database
- Weekly and monthly rollups
- Internal dashboard views for growth over time
- Tracking of both Bricks members and Brett / internal Bricks social accounts
- Member login
- Social account linking / OAuth
- Cross-posting automation
- Agent-based automations
- Member-facing dashboards
Requires Node 22.
npm installCopy the example env file and fill in the values you need.
cp .env.example .env.localYou will need:
- Clerk keys for authentication
- Neon Postgres connection string
- Modash API credentials
- Apify API token
npm run devhttp://localhost:3000
npm run dev # Run the development server
npm run build # Build for production
npm run start # Start the production build locally
npm run lint # Run ESLint- Tracked People -- Bricks members, Brett / internal creators, or other tracked entities
- Social Accounts -- Instagram, TikTok, YouTube, or Facebook accounts linked to a tracked person
- Content Items -- Posts, reels, shorts, videos belonging to a social account
- Daily Snapshots -- Profile-level and content-level metrics stored each day
- Rollups -- Weekly and monthly averages computed from daily data
- Vercel Cron triggers once per day
- Cron route starts a Vercel Workflow run
- Workflow loads all active social accounts from Neon
- Each account is processed by platform:
- Instagram / TikTok / YouTube via Modash
- Facebook Reels via Apify
- Raw vendor data is normalized into the Bricks schema
- Daily profile and content snapshots are written to Neon
- Weekly and monthly rollups are updated
- The admin dashboard reads from stored data and rollups
All data is stored in Neon Postgres using Drizzle ORM.
Schema and migrations live in the repo. Drizzle handles schema-as-code in TypeScript and SQL-friendly migrations.
Stored data includes:
- Tracked people (member records, Bricks start date, notes)
- Social accounts (platform, handle, URL, active status)
- Content items (platform content ID, type, URL, published date)
- Daily profile snapshots (followers, following, total content count, average views/likes/comments)
- Daily content snapshots (views, likes, comments, shares)
- Weekly and monthly rollups (average/median views, follower delta, growth trends)
Clerk handles admin-only authentication for V1. Only admins can log in and manage data.
This app is designed for Vercel deployment.
Key deployment concerns:
- Connect the GitHub repo to a Vercel project
- Add environment variables in Vercel for Clerk, Neon, Modash, and Apify
- Configure the Vercel Cron schedule for daily sync
- Vercel Workflow handles the sync orchestration
app/-- Next.js App Router pages and API routesdb/-- Drizzle schema and migrationsworkflows/-- Vercel Workflow definitionsjobs/-- Cron job entry pointslib/vendors/-- Modash and Apify adapter codetypes/-- Shared TypeScript types
This repo includes local conventions and skills for Claude Code usage.
Important files:
CLAUDE.mddocs/for engineering guidance.claude/skills/for local skills