Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
cache: gradle
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Fetch Offware's shared data (stations, cities, sites, countries, moments)
# A file that can't be fetched or checked keeps its committed copy. Fails only when
# there is no worldwide stations file at all.
run: pnpm --filter postcards data
- name: Build the web app
run: pnpm --filter postcards build
- name: Sync the Android project
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
push:
branches:
- main
# Weekly, after the shared data's Monday build, so the reference data stays current.
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:

permissions:
Expand All @@ -35,6 +38,10 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Fetch Offware's shared data (stations, cities, sites, countries, moments)
# A file that can't be fetched or checked keeps its committed copy. Fails only when
# there is no worldwide stations file at all.
run: pnpm --filter postcards data
- name: Build (GitHub Pages subpath)
run: pnpm --filter postcards build
env:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ Thumbs.db
.env
.env.*
!.env.example

# Fetched at build time from the Offware places dataset (scripts/fetch-places.mjs)
apps/postcards/public/reference/railways-wikidata.json
9 changes: 2 additions & 7 deletions apps/postcards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"schema": "UPDATE_SCHEMA=1 vitest run tests/unit/schemaArtifact.spec.ts",
"test:e2e": "playwright test",
"format": "prettier --write .",
"reference": "node scripts/build-reference.mjs",
"railways": "node scripts/build-railways.mjs",
"data": "node scripts/fetch-data.mjs",
"cap:sync": "cap sync",
"cap:copy": "cap copy",
"cap:add:android": "cap add android",
Expand Down Expand Up @@ -58,15 +57,11 @@
"@types/react-dom": "^19.2.3",
"@types/topojson-client": "^3.1.5",
"@vitejs/plugin-react": "^6.0.3",
"airport-data": "^1.0.1",
"all-the-cities": "^3.1.0",
"country-state-city": "^3.2.1",
"jsdom": "^29.1.1",
"prettier": "^3.9.4",
"typescript": "^6.0.3",
"vite": "^8.1.3",
"vite-plugin-pwa": "^1.3.0",
"vitest": "^4.1.10",
"world-countries": "^5.1.0"
"vitest": "^4.1.10"
}
}
10 changes: 9 additions & 1 deletion apps/postcards/public/reference/PROVENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ machine-readable provenance list ships inside the app at
`src/lib/reference/data/provenance.json` and is displayed in Settings; this file
mirrors it for people browsing the repository.

Every file is built in Offware's shared data, <https://github.com/offware-apps/data>, which
lists each dataset with its licence in `v1/catalog.json`. `scripts/fetch-data.mjs` fetches
them at build time, and takes a file only while its dataset still carries the licence named
below. The files committed here are what a build keeps when the shared data can't be
reached.

| File | Dataset | License | Version / retrieved |
|------|---------|---------|---------------------|
| `cities.json` | GeoNames city gazetteer (population ≥ 15,000, via all-the-cities) — <https://www.geonames.org> | CC BY 4.0 | all-the-cities 3.1.0 |
| `cities-all.json` | GeoNames full world gazetteer (via all-the-cities) — <https://www.geonames.org> | CC BY 4.0 | all-the-cities 3.1.0 |
| `subdivisions.json` | First-level regions: each city's GeoNames admin-1 code (<https://download.geonames.org/export/dump/cities500.zip>) and each code's GeoNames name (<https://download.geonames.org/export/dump/admin1CodesASCII.txt>), both retrieved 2026-09-30; France's 13 regions by their French names; a code GeoNames does not name keeps one from dr5hn countries-states-cities — <https://github.com/dr5hn/countries-states-cities-database> | CC BY 4.0 (GeoNames) / ODbL (dr5hn) | all-the-cities 3.1.0 + GeoNames 2026-09-30 + country-state-city |
| `airports.json` | OpenFlights (IATA-coded, aggregated from OurAirports) — <https://openflights.org/data.html> | ODbL 1.0 / OurAirports public domain | airport-data 1.0.1 |
| `heritage.json` | UNESCO World Heritage List — all 1,248 sites incl. 47th session (2025) — <https://whc.unesco.org/en/list/> | CC BY-SA 3.0 IGO — © UNESCO World Heritage Centre | 2025 list, retrieved 2026-07-11 |
| `landmarks.json` | Famous landmarks seed (full set via Wikidata build script) — <https://www.wikidata.org> | CC0 (facts) | seed |
| `landmarks.json` | Landmarks (museums, monuments, castles, palaces, parks; UNESCO sites excluded), the 10,000 best known, from Wikidata via Offware's shared data — <https://github.com/offware-apps/data>. Written at build time by `scripts/fetch-data.mjs`; the committed file is a small seed used when the dataset can't be reached. Each id is `wd-<Wikidata QID>`. | CC0 1.0 | fetched at build time |
| `railways-wikidata.json` | Railway stations worldwide from Wikidata (open mainline stations, instance of Q55488) via Offware's shared data — <https://github.com/offware-apps/data>. Written at build time by `scripts/fetch-data.mjs`, not committed. Each id is the station's Wikidata QID. | CC0 1.0 | fetched at build time |
| `railways.json` | Railway stations in Europe from the Trainline EU open stations database — <https://github.com/trainline-eu/stations> | ODbL 1.0 | `scripts/build-railways.mjs` |
| `languages.json` | Per-country spoken languages (via world-countries) — <https://github.com/mledoze/countries> | ODbL 1.0 | 5.1.0 |
| `article-names.json` | Common country names (Wikivoyage/Wikipedia article titles, via world-countries) — <https://github.com/mledoze/countries> | ODbL 1.0 | 5.1.0 |
| `experiences.json` | Postcards "Moments" — app-authored name/hint/emoji only; anchor coordinates aggregated from Wikidata (<https://www.wikidata.org>) / GeoNames (<https://www.geonames.org>); experience concepts attributed to UNESCO World Heritage (<https://whc.unesco.org/en/list/>), UNESCO Intangible Cultural Heritage (<https://ich.unesco.org/en/lists>) & Wikivoyage travel topics (<https://en.wikivoyage.org>). Per-item `sources` cite the specific record. | Mixed — name/hint/emoji CC0; Wikidata CC0; GeoNames CC BY 4.0; UNESCO CC BY-SA 3.0 IGO; Wikivoyage CC BY-SA 3.0 | V1 |
Expand Down
36 changes: 0 additions & 36 deletions apps/postcards/scripts/build-city-admin1.mjs

This file was deleted.

161 changes: 0 additions & 161 deletions apps/postcards/scripts/build-heritage-full.mjs

This file was deleted.

41 changes: 0 additions & 41 deletions apps/postcards/scripts/build-languages.mjs

This file was deleted.

Loading
Loading