Files
streba/README.md
T

60 lines
2.0 KiB
Markdown

# Streba
The GPX analyser, reborn. A self-hosted web app for analysing GPX tracks -
with Alpine peak collecting on the side.
- **Accounts** - anyone can sign up; activities and climbed peaks are per user.
The home page is a public community overview: every member's tracks on one
worldmap plus a recent-activity feed. Uploading and peak tracking need an
account.
- **Upload** GPX files (drag & drop, multiple at once) - distance, ascent,
moving time and an elevation profile are computed on the spot.
- **Activities** - every track on a map with stats and an interactive
elevation chart.
- **Worldmap** - all your tracks together on the dashboard.
- **Peaks** - the OSM peaks of the whole Alpine region on a map. Zooming out
shows only the most notable summits (elevation, Wikipedia/Wikidata
presence and tagged prominence decide); zooming in reveals the rest. Cross
them off by hand, or let an uploaded track bag them automatically when it
passes within 150 m of a summit.
## Stack
- [SvelteKit](https://svelte.dev/docs/kit) (Svelte 5, TypeScript) with the Node adapter
- SQLite via `better-sqlite3` - the database lives in `data/streba.db`, no
server setup needed
- [MapLibre GL](https://maplibre.org) for maps
- Hand-rolled SVG elevation charts
## Development
```sh
npm install
npm run dev
```
## Production
```sh
npm run build
node build
```
Set `STREBA_DATA_DIR` to move the SQLite database somewhere else (defaults to
`./data`).
## Peaks data
A fresh database is seeded with ~80 curated famous peaks so the app works out
of the box. To load **all named OSM peaks of the Alps** (tens of thousands),
run the importer once (and re-run whenever you want fresh OSM data):
```sh
node scripts/import-peaks.js
```
It fetches `natural=peak` nodes from the Overpass API for the Alpine bounding
box, scores each peak for notability, precomputes the zoom level from which
it appears on the map, and merges the curated seed peaks into their OSM
counterparts without losing anyone's recorded ascents.