What Programming Languages Does TrendRadar Use? A Complete Technical Breakdown

TrendRadar is a multi-language project built primarily in Python, with a web front-end in HTML, CSS, and JavaScript, plus deployment scripts in Shell and Windows Batch.

TrendRadar is an open-source trend monitoring tool that combines multiple programming languages to deliver its core functionality. This article examines the exact languages used, their specific roles, and where they appear in the codebase.

Python: The Core Engine

Python (version 3.9+) serves as the backbone of TrendRadar. All business logic resides in the trendradar package, with several key components:

Scheduler and Crawler

The system uses asyncio for concurrent crawling across multiple hot-list platforms. The entry point for command-line execution is:


# trendradar/__main__.py

# Allows: python -m trendradar

Configuration Loading

Configuration parsing happens in trendradar/core/loader.py, which handles:

Storage and AI Integration

The codebase includes:

  • sqlite persistence via storage mix-ins for daily snapshots
  • liteLLM wrappers for LLM provider calls
  • Notification modules for Feishu, Telegram, Slack, and other platforms

Running the Python Core


# Install in editable mode

pip install -e .

# Run with default configuration

python -m trendradar

# Use custom config

python -m trendradar --config path/to/custom_config.yaml

HTML, CSS, and JavaScript: The Web Front-End

TrendRadar generates a self-contained HTML report that can be viewed locally or hosted on GitHub Pages.

HTML Report Generation

The file trendradar/report/html.py renders a static index.html containing all trend data. The report includes:

  • Embedded CSS for styling
  • All visualization markup

JavaScript Interactivity

The front-end includes a small JavaScript bundle in docs/assets/script.js that enables:

  • "Save as image" functionality
  • Split-save actions for exporting reports as PNG files

Using the Save Feature

// Button in index.html triggers saveAsImage()
document.querySelector('.save-btn').addEventListener('click', saveAsImage);

Shell and Batch Scripts: Deployment Automation

TrendRadar includes platform-specific bootstrap scripts for streamlined deployment.

Shell Scripts (Bash)

  • start-http.sh — Launches a local HTTP server using python -m http.server for viewing the HTML report
  • setup-mac.sh — macOS-specific installation script for Python dependencies and optional Docker setup

Windows Batch

  • setup-windows.bat — Windows-specific bootstrap for dependency installation and Docker container startup

Dockerfile: Container Orchestration

The docker/Dockerfile defines the runtime environment:

Docker Deployment


# Build the image

docker build -t trendradar .

# Run with mounted config

docker run -d -v $(pwd)/config:/app/config -p 8080:8080 trendradar

Summary

  • Python 3.9+ — Core engine, crawling, AI integration, storage, and notifications
  • HTML + CSS — Static report generation and styling
  • JavaScript — Browser-side interactivity for report export
  • Shell/Bash — macOS and Linux deployment scripts
  • Windows Batch — Windows deployment automation
  • Dockerfile — Container image definition

Frequently Asked Questions

What version of Python does TrendRadar require?

TrendRadar requires Python 3.9 or higher. The core package uses modern Python features including asyncio for concurrent operations and type hints throughout the codebase.

Can I run TrendRadar without knowing JavaScript?

Yes. The JavaScript components are only for the optional "save as image" feature in the HTML report. All core functionality—crawling, analysis, storage, and notifications—runs entirely through Python commands and configuration files.

Where is the main entry point for the application?

The primary entry point is trendradar/__main__.py, which enables execution via python -m trendradar. This file imports and runs the main application logic from trendradar/context.py.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →