This repository serves as a template for creating new TRACE analysis content repositories. Timestamped Reproducible Analytics for Crypto Ecosystems.
Each TRACE analysis should be its own independent git repository, cloned from this template. This ensures:
- Reproducibility: Each analysis is self-contained with its own queries, data, and results
- Version Control: Independent versioning and history per analysis
- Sharing: Easy to share, cite, or embed individual analyses
- Separation: Analysis content separate from website infrastructure
Before starting, ensure you have:
-
UV (Python package manager) — Install with:
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
FlipsideAI MCP Key — Required for running SQL queries via the Flipside MCP tools to query crypto data. Available at: https://flipsidecrypto.xyz/chat/settings/mcp-keys - generous free tier available.
-
Verify installation:
uv run python --version
-
Read the guides:
templates.md— Report layout optionshighcharts_embedding_guide.md— Chart conventionsGET-STARTED.md- An LLM input to explain the repo and confirm your MCP key is active.
CLONE & RENAME is easiest way.
# Clone this template
git clone <template-repo-url> my-analysis-name
cd my-analysis-name
# Remove template git history and initialize new repo
rm -rf .git
git init
git add .
git commit -m "Initial commit: Analysis template"Review templates.md and select the appropriate layout:
| Template | Best For |
|---|---|
| 0: Minimal | Single visualization with evolving data |
| 1: Simple Overview | Standard report with metrics + viz + table |
| 2: Comparison | Comparing two groups side-by-side |
| 3: Alternating Narrative | Deep-dive with multiple advanced metrics |
| 4: Multi-Section Report | Linear narrative, static/time-bound analysis |
| 5: Grid Dashboard | Multiple self-explanatory visualizations |
| 6: Viz + Table | Minimalist with summary statistics |
| 7: Report Style | Multi-faceted overview at consistent depth |
- Create
REPORT.htmlfollowing your chosen template structure - Add SQL queries →
queries/folder (e.g.,01_market_share.sql) - Add data files →
data/folder (e.g.,01_market_share.json) - Add visual files →
visuals/folder (e.g.,AREA_market_share.html) - Create
trace-metadata.jsonwith your analysis details
git add .
git commit -m "Initial analysis"
git remote add origin <your-repo-url>
git push -u origin mainmy-analysis-repo/
├── trace-metadata.json # REQUIRED: Metadata for TRACE website
├── templates.md # Report layout templates (choose one)
├── REPORT.html # Final report (embeds visuals into chosen template layout)
├── README.md # Analysis-specific README
├── pyproject.toml # UV project configuration
├── knowledge/ # High-level guides on using TRACE effectively with Flipside CLI
│ ├── api.md # Flipside API reference
│ ├── flipside_cli.md # CLI usage guide
│ ├── highcharts_embedding_guide.md # Highcharts style guide
│ ├── style.md # Styling and formatting guidelines
│ └── templates.md # Template usage instructions
├── queries/ # SQL query files
│ ├── 01_market_share.sql
│ └── 02_volume_analysis.sql
├── data/ # JSON data files (match query names)
│ ├── 01_market_share.json
│ └── 02_volume_analysis.json
├── visuals/ # Standalone Highcharts HTML files (viewable individually)
│ ├── AREA_market_share.html # Complete HTML with data embedded
│ └── LINE_volume_daily.html
├── utils/
│ └── swap_placeholder.py # Placeholder replacement utility
└── assets/
└── thumbnail.png
-
QUERY → DATA: 1:1 relationship
queries/01_market_share.sql→data/01_market_share.json
-
DATA → VISUAL: 1:many relationship
data/01_market_share.json→visuals/AREA_market_share.htmldata/01_market_share.json→visuals/LINE_market_share.html
| File | Purpose | Contains |
|---|---|---|
visuals/*.html |
Standalone — viewable in browser for debugging/review | Complete HTML (<html>, <head>, Highcharts CDN, data embedded) |
REPORT.html |
Final deliverable — the published analysis | Full report with charts duplicated from visuals/ |
Why duplication? Each VISUAL file is self-contained so you can open it directly to test/debug a single chart. The REPORT then assembles all visuals into the final narrative layout.
⚠️ Keep in sync: If you edit a chart in REPORT, update the matching VISUAL file (and vice versa). They should always match.
This section documents how to rebuild the REPORT from component files without re-running SQL queries.
Create REPORT.html following your chosen template layout from templates.md. Use placeholders for content that will be injected:
<script>
const data01 = {{DATA_01_PLACEHOLDER}};
</script>
<details class="query-section">
<summary>View SQL Query</summary>
<pre><code class="sql">{{QUERY_01_PLACEHOLDER}}</code></pre>
</details>
<div class="chart-wrapper">
{{VISUAL_01_PLACEHOLDER}}
</div>Use the utility to replace placeholders with file contents:
# Inject data into REPORT
uv run python utils/swap_placeholder.py REPORT.html "{{DATA_01_PLACEHOLDER}}" data/01_market_share.json
# Inject data in STANDALONE VISUAL
uv run python utils/swap_placeholder.py visuals/AREA_market_share.html "{{VISUAL_01_PLACEHOLDER}}" data/01_market_share.jsonRun the validation script to catch common issues:
uv run python utils/validation.py --verbose- Ensure all CSS is inlined in
<style>tags (standalone report) - Ensure Highcharts loads via CDN
- Update metadata sections (Author, Reviewer, Network(s), Timestamp Range)
- Test that the report renders correctly with no broken references
See highcharts_embedding_guide.md for complete documentation. Key rules:
- Use built-in
format:strings — avoid customformatter: function() - Colors: Use the high-contrast palette (
#0000B9,#FF2424, etc.) - Credits: Set to
'Data: FlipsideAI' - Smart Titles & Subtitles The title should be the point, the subtitle defining key terms or adding context.
- X-axis dates: Use
{value:%b '%y}format (e.g., "Jan '20")
CRITICAL: Every content repository MUST include this file.
{
"analysis": {
"id": "aerodrome-rise",
"title": "The Rise of Aerodrome DEX on Base",
"subtitle": "Market dominance analysis from August 2023 to August 2024",
"htmlFile": "aerodrome-rise.html"
},
"repository": {
"url": "https://github.com/username/trace-aerodrome-rise",
"branch": "main"
},
"metadata": {
"author": "Your Name",
"reviewer": "Reviewer Name",
"networks": ["Base"],
"timestampRange": {
"start": "2023-08-01",
"end": "2024-08-31"
},
"analysisDate": "2025-11-20",
"dataSource": "FlipsideAI"
}
}id: Unique identifier (used in URLs, no spaces/special chars)title: Display title for the analysissubtitle: Brief description shown on landing pagehtmlFile: Path to the final HTML file (relative to repo root)thumbnail: Optional thumbnail image path
url: Full GitHub/GitLab URL to the repositorybranch: Branch name (usually "main")
author: Analysis author namereviewer: Optional reviewer namenetworks: Array of blockchain networks analyzedtimestampRange: Object withstartandenddates (YYYY-MM-DD)analysisDate: When the analysis was completed (YYYY-MM-DD)dataSource: Data provider (e.g., "FlipsideAI")
Run the validation script to catch common issues:
# Basic validation
uv run python utils/validation.py
# Verbose output with all details
uv run python utils/validation.py --verbose
# Custom thresholds
uv run python utils/validation.py --min-data-size 500 --check-syncThe script checks:
- ✅ Required directories exist (
data/,queries/,visuals/) - ✅ Files exist with correct extensions
- ✅ Files meet minimum size thresholds (catches truncation)
- ✅
REPORT.htmlexists - ✅
trace-metadata.jsonis valid and not using placeholder values - ✅ No unresolved
{{PLACEHOLDER}}patterns - ✅ Data content appears embedded in REPORT and visuals (sync check)
After automated validation passes:
- VISUAL files match REPORT (keep in sync!)
- TOC updated and links work
- Report is standalone (no broken external references)
- Highcharts loads and renders correctly
- Credits show "Data: FlipsideAI"
- Colors follow
highcharts_embedding_guide.mdpalette - No custom formatter functions (use
format:strings)
The TRACE website will:
- Scan repositories for
trace-metadata.jsonfiles - Extract metadata to build landing page cards
- Link to HTML files via GitHub raw content URL
- Provide links to the GitHub repository for queries/data
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{htmlFile}
- Must be self-contained (all CSS inlined)
- Highcharts via CDN
- All data embedded in HTML
- Include link back to GitHub repository
- Keep it simple: Static HTML, no build process
- Self-contained: Analysis works when cloned standalone
- Document everything: Methodology, data sources, assumptions
- Version your data: Commit data files to git
- Tag releases: Use git tags for major versions
- Validate JSON: Ensure
trace-metadata.jsonis valid before committing
eth_fusaka — Median Ethereum Transaction Fees analysis with key upgrade milestones (2020–present)
Demonstrates:
- Proper README structure
trace-metadata.jsonconfiguration- Query → Data → Visual file relationships
- Final REPORT.html with embedded Highcharts
See the main TRACE website repository for integration details.