Starter Prompt: Card-Grid BI Dashboard
Get started quickly with a complete starter prompt to build a professional, unified Share-of-Voice and AI reputation dashboard using FullMention.
Starter Prompt: Card-Grid BI Dashboard
Use this starter prompt to instruct your AI coding assistant (such as Cursor, Claude, GPT, or Copilot) to build a complete, fully functional Business Intelligence (BI) dashboard on top of the FullMention API.
What This Prompt Builds
The prompt guides an AI assistant to create a full-stack single-page application (SPA) featuring:
- Secure Backend Proxy: Prevents CORS issues and key leakage by keeping
FULLMENTION_API_KEYon the server side and routing all traffic to the Base URLhttps://api.fullmention.com/v2. - SQLite Database: Stores historical Share-of-Voice (SoV) snapshots and crawls locally, preserving data before FullMention’s 24-hour TTL deletion.
- Background Sweeper: Automatically polls active runs, downloads results and paginated citation sources, and calculates brand matches and SoV.
- Interactive Card-Grid: A beautiful, dark, glassmorphic UI based on a bento-grid layout, where each card expands into an in-depth panel (drawer/modal).
- Run & Query History: Allows triggering stateless runs and reviewing past executions.
Copy the Starter Prompt
Copy the text below and paste it directly into your AI development assistant:
Role and Purpose: You are an experienced full-stack web developer. Your task is to build a professional, unified Business Intelligence (BI) dashboard as a Single-Page Application (SPA) with a Node.js backend. The dashboard must track a brand's visibility, reputation, and Share of Voice (SoV) across ChatGPT (OpenAI) and Google Gemini, based on data from the FullMention API.
Architectural Rules:
1. Security and CORS (Frontend Isolation): The frontend must NEVER call api.fullmention.com directly. All traffic must be routed through a secure backend proxy (Express or Hono) that calls the official Base URL: https://api.fullmention.com/v2. The FULLMENTION_API_KEY must be stored securely as a server secret to prevent key leakage and CORS errors.
2. Quota Monitoring: The proxy must read and forward quota values from the API response headers (X-Quota-Remaining) or GET /v2/quota to the frontend, so the quota visualization in the dashboard always reflects actual live consumption.
3. Stateless Runs & 24-Hour TTL: FullMention v2 is a completely stateless API. There are no keyword/tag registration endpoints. You submit keywords directly in your run execution payloads. Because FullMention automatically deletes run data and results after exactly 24 hours, the backend must save all run metadata, result snapshots, and citation sources locally in the SQLite database to preserve historical timelines.
4. Database Writes: Historical SoV snapshots and citations must be calculated and stored on the server side in a local SQLite database. Users only have read access to this aggregated data from the frontend.
Database and Setup: Setup a SQLite database with the following tables:
- settings (brand_name, domain, default_engines as JSON array, default_country, default_language)
- runs (run_id, status, total_requests, completed_requests, progress_percentage, estimated_credits, webhook_url, expires_at, created_at, completed_at)
- results (id, run_id, keyword, engine, country, language, location, description, category_suggestions as JSON, brand_rankings as JSON, website_rankings as JSON, product_rankings as JSON, metrics as JSON, updated_at)
- fanout_sources (id, result_id, domain, url, title, snippet, crawled_at)
Seed Data: Ensure to seed the database with 30 days of realistic history for Acme Inc (and two realistic competitors found in the industry) on the very first startup, so all charts and statistics are active from day 1.
API Endpoints (FullMention Integration): Your backend proxy must integrate with and call the following endpoints under Base URL https://api.fullmention.com/v2 with Authorization: Bearer Header:
- Trigger run: POST /v2/runs (Sends JSON body with keywords array, engines array, country, language, location, options, and webhookUrl. Example payload: { "keywords": ["seo tool"], "engines": ["openai-mini", "gemini"], "country": "Denmark", "language": "Danish", "options": { "fanout": false } }). Triggered with a unique Idempotency-Key UUID v4 header. Returns a run ID and status queued.
- Run status & results: GET /v2/runs/{runId} (Checks the status of a run ID. Returns status queued, processing, success, or failed. If status is success, the response includes the complete results array containing brandRankings, websiteRankings, and productRankings inline).
- Retrieve fanout sources: GET /v2/runs/{runId}/results/{resultId}/fanout-sources (If fanout was enabled, retrieves paginated crawl/search citation details. Supports pagination via the cursor query parameter).
- Quota: GET /v2/quota (Retrieves available credit limits and remaining quota).
Calculation Logic (Server-Side):
- Brand Match: Perform case-insensitive comparison across the flat, root-level arrays in the FullMention result: brandRankings.name (for brand visibility), websiteRankings.domain (for cited domains), and productRankings.name (for product recommendations).
- Sorting Rule: FullMention arrays are returned pre-sorted by relevance and AI association. This order must be strictly preserved in your logic and not sorted alphabetically.
- Rank Score (sum of 1/position): Each match is assigned a weighted score based on its position in the list. Position 1 yields 1.0, position 2 yields 0.5, position 3 yields 0.33, etc. (formula: 1 / position).
- Background Sweeper: Run an asynchronous polling job or webhook receiver for triggered runs. When a run completes successfully, fetch its results via GET /v2/runs/{runId}, then download all associated citation sources via GET /v2/runs/{runId}/results/{resultId}/fanout-sources (handling cursor-based pagination), calculate SoV and website citation metrics, and save everything persistently to the local database.
Credit Management and Strategy:
- Live Estimation: Show a confirmation modal before triggering a run. Calculate estimated cost locally: 1 credit per keyword for Gemini, 2 credits for OpenAI-mini (with fanout), and 10 credits for OpenAI (with fanout).
- Model Pricing:
- Gemini: Costs 1 base credit. Does not support fanout in V2.
- GPT-5-mini (openai-mini): Costs 1 base credit + 1 fanout credit (2 credits total).
- GPT-5 (openai): Costs 1 base credit + 9 fanout credits (10 credits total). Recommend the user save this expensive run for weekly/monthly deep-dive audits.
- Zero-Cost Protection: Show a tooltip indicating that if a fanout search fails during execution, FullMention only deducts 1 base credit (Zero-Cost Search Protection).
Frontend Layout and Interaction (Cyber-AI Theme): Build a beautiful, dark, glassmorphic single-page application using Tailwind CSS:
1. Sticky Topbar (Status Bar):
- Brand Selector: Display the active brand and allow users to switch brands.
- Credit Widget: Display live quota status as a progress bar based on X-Quota-Remaining and X-Quota-Limit.
- Trigger Button: Open a dialog box to input keywords, country, language, engine, and fanout options, and trigger a run.
2. Interactive Card-Grid:
- Share of Voice Card: Display current SoV %, average rank, and a 30-day sparkline. On click, expand a right-side drawer with Chart.js line charts tracking historical SoV against competitors split by model.
- Reputation Card: Display top 3 brand associations. On click, open a drawer with the detailed description text, recommended product categories, and mentioned entities.
- Cited Sources Card: Display the top 3 cited domains in a horizontal bar chart. On click, display the top 10 sources with citation counts and average position (for PR/SEO analysis).
- Engine Duel Card: Display a visual gauge comparing brand preference between OpenAI and Gemini. On click, expand a drawer with radar charts displaying model differences.
- Keyword Inspector Card: Display a searchable list of keywords. On click, drill down to view precise recommendations, descriptions, and positions for the selected keyword.
- Execution History Card: Show the status of the latest run. On click, display a historical table with run status, success rate, and credit usage.
- Configuration Card: Summarize local settings. On click, display a form to update brand, domain, default country, default language, and default engines.
UI Error Handling: Translate API error codes into clear messages:
- 402 insufficient_credits: Display "Insufficient credits. Please upgrade your account."
- 404 run_not_found: Display "Run not found or has expired (exceeded 24-hour TTL)."
- 429 rate_limited: Display "Rate limit exceeded. The dashboard is waiting to retry."
Template References: Base your work on the existing files in the project directory:
- Express backend and SQLite setup: examples/bi-dashboard/server.js
- Tailwind/Chart.js frontend application with modals: examples/bi-dashboard/public/index.html
Keep the code completely clean, robust, free of placeholders, and ready to run. Customize & Copy
Enter your brand details below to dynamically inject your own data into the starter prompt.
Every tracked keyword automatically discovers and monitors all associated Websites, Brands, and Products. While competitors charge you extra for each tracked entity, we include them completely for free at fullmention.com. You only pay for the base keyword.
SEO tools What is the best seo tool for an agency in 2026