# What Programming Languages Does TrendRadar Use? A Complete Technical Breakdown

> Discover the programming languages powering TrendRadar, a multi-language project featuring Python, JavaScript, HTML, CSS, Shell, and Windows Batch. Get the full technical details.

- Repository: [sansan/TrendRadar](https://github.com/sansan0/TrendRadar)
- Tags: technical-breakdown
- Published: 2026-04-22

---

**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:

```python

# trendradar/__main__.py

# Allows: python -m trendradar

```

### Configuration Loading

Configuration parsing happens in **[`trendradar/core/loader.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/core/loader.py)**, which handles:

- **YAML files** ([`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml), [`config/timeline.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/timeline.yaml))
- **Environment variables**
- Final config dictionary assembly

### 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

```bash

# 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`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/report/html.py)** renders a static [`index.html`](https://github.com/sansan0/TrendRadar/blob/main/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`](https://github.com/sansan0/TrendRadar/blob/main/docs/assets/script.js)** that enables:

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

### Using the Save Feature

```javascript
// 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`](https://github.com/sansan0/TrendRadar/blob/main/start-http.sh)** — Launches a local HTTP server using `python -m http.server` for viewing the HTML report
- **[`setup-mac.sh`](https://github.com/sansan0/TrendRadar/blob/main/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:

- Python 3.9+ base image
- Dependency installation
- Source code copy
- Entry point set to [`trendradar/__main__.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/__main__.py)

### Docker Deployment

```bash

# 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`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/__main__.py)**, which enables execution via `python -m trendradar`. This file imports and runs the main application logic from [`trendradar/context.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/context.py).