星网(GW)卫星星座数据仪表盘
Project description
功能特性
- 数据仪表盘 — 卫星与发射统计总览、制造商/火箭分布图表
- 交互式地图 — 卫星实时位置与轨迹展示,支持 LEO 覆盖范围可视化
- 轨道追踪 — 前端基于 SGP4/TLE 实时解算卫星轨道,近地点/远地点历史图表
- 自动更新 — 后台守护进程定期爬取最新 TLE 数据,无需手动干预
- 多数据库支持 — SQLite / MySQL / PostgreSQL 三种后端可选
快速开始
安装
# 从 PyPI 安装(推荐)
pip install gw-dashboard
# 或从源码安装
git clone https://github.com/NearlyHeadlessJack/gw-dashboard.git
cd gw-dashboard
uv sync
遇到安装问题?参见 安装指南,涵盖 Windows、Linux(虚拟环境 / pipx / uv)和 macOS 的详细说明。
也可以使用 Docker 部署,镜像托管在 GitHub Container Registry;详细步骤见 安装指南的 Docker 部署章节。
运行
# PyPI 安装后直接运行
gw-dashboard
# 从源码运行
uv run -m gw
# 开发模式(启动前自动构建前端,需要 Node.js)
uv run -m gw -d
首次运行时,如果数据库不存在,程序会自动爬取数据并初始化,然后启动 Web 服务。控制台会打印访问 URL。
配置
默认无需配置文件即可运行(使用 SQLite)。如需自定义,复制示例配置:
cp config.example.yaml config.yaml
主要配置项:
database:
type: sqlite3 # sqlite3 / mysql / postgresql
connection: database/gw.sqlite3
backend:
host: 0.0.0.0
port: 8000
cache_ttl_seconds: 30
daemon:
update_check_interval_seconds: 3600 # 数据更新检查间隔
data_valid_duration_seconds: 86400 # 数据有效时长
环境变量也可覆盖配置,如 GW_FRONTEND_DIST_DIR 可指定前端静态文件目录。
项目结构
gw-dashboard/
├── gw/ # 后端源码
│ ├── __main__.py # 入口程序
│ ├── config.py # 配置加载
│ ├── startup.py # 启动初始化
│ ├── scraper/ # 数据爬取
│ ├── database/ # 数据库操作
│ ├── web/ # API 与静态资源
│ ├── daemon/ # 守护进程(定时更新)
│ ├── orbit/ # 轨道计算
│ └── utils/ # 工具函数
├── frontend/ # 前端源码
│ └── src/
│ ├── App.tsx # 主应用
│ ├── api.ts # API 调用
│ ├── orbit.ts # 轨道解算
│ └── types.ts # 类型定义
├── tests/ # 后端测试
├── database/ # 数据库存储目录
└── pyproject.toml # 项目配置
技术栈
| 层级 | 技术 |
|---|---|
| 前端 | React 19 · TypeScript · Vite 8 · Leaflet · satellite.js |
| 后端 | Python ≥3.12 · FastAPI · SQLAlchemy · SGP4 |
| 包管理 | uv (后端) / npm (前端) |
| 测试 | pytest / ESLint |
开发
后端
# 安装依赖
uv sync
# 运行测试
uv run pytest
# 代码检查
uv run ruff check .
前端
cd frontend
# 安装依赖
npm install
# 开发服务器
npm run dev
# 构建
npm run build
# 代码检查
npm run lint
构建发布包
# 先构建前端
cd frontend && npm run build && cd ..
# 再构建 Python wheel
uv build
数据来源
所有数据均来自公开信息(CelesTrak、卫星百科 等),仅供学习参考。
Code with Codex (GPT5.5) & Claude Code (GLM5.1 / DeepSeek-V4-Pro)
许可证
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gw_dashboard-0.1.2.tar.gz.
File metadata
- Download URL: gw_dashboard-0.1.2.tar.gz
- Upload date:
- Size: 237.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9cd02f2b36e74b80f75ac891860af2d79a435f5b56ee0cb73370bab08046b71
|
|
| MD5 |
a8c4c10d97f46cfb97d2c54a61a4d57f
|
|
| BLAKE2b-256 |
d43c7ab481c5b6941b5a9ee865a1b0decdc7b1165ec66a50458b0b7d61bd9353
|
Provenance
The following attestation bundles were made for gw_dashboard-0.1.2.tar.gz:
Publisher:
publish.yml on NearlyHeadlessJack/gw-dashboard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gw_dashboard-0.1.2.tar.gz -
Subject digest:
b9cd02f2b36e74b80f75ac891860af2d79a435f5b56ee0cb73370bab08046b71 - Sigstore transparency entry: 1392612150
- Sigstore integration time:
-
Permalink:
NearlyHeadlessJack/gw-dashboard@0da3d356f2a1435485a5afbe0497168440b48d36 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/NearlyHeadlessJack
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0da3d356f2a1435485a5afbe0497168440b48d36 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gw_dashboard-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gw_dashboard-0.1.2-py3-none-any.whl
- Upload date:
- Size: 217.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19f0f40f0575338aa74923b5193742173f803dd54eb22d6d739a13c03cdb3c07
|
|
| MD5 |
c6c19b89edb20cf93f59296cee17c847
|
|
| BLAKE2b-256 |
36fa78fd3d6487c559069293d00a20052f25772c7f3bd98c8072de65f99ddc54
|
Provenance
The following attestation bundles were made for gw_dashboard-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on NearlyHeadlessJack/gw-dashboard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gw_dashboard-0.1.2-py3-none-any.whl -
Subject digest:
19f0f40f0575338aa74923b5193742173f803dd54eb22d6d739a13c03cdb3c07 - Sigstore transparency entry: 1392612152
- Sigstore integration time:
-
Permalink:
NearlyHeadlessJack/gw-dashboard@0da3d356f2a1435485a5afbe0497168440b48d36 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/NearlyHeadlessJack
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0da3d356f2a1435485a5afbe0497168440b48d36 -
Trigger Event:
release
-
Statement type: