Skip to content

Commit 5397a77

Browse files
committed
fase 7 completata
1 parent aa9c468 commit 5397a77

File tree

22 files changed

+511
-519
lines changed

22 files changed

+511
-519
lines changed

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, refactoring]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
cache: npm
19+
- run: npm ci
20+
- run: npm run lint
21+
22+
test:
23+
name: Test (Node ${{ matrix.node-version }})
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
node-version: [18, 20, 22]
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
cache: npm
34+
- run: npm ci
35+
- run: npm run build --workspace=packages/core
36+
- run: npm run test --workspace=packages/core
37+
38+
typecheck:
39+
name: Type Check
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: 20
46+
cache: npm
47+
- run: npm ci
48+
- run: npm run typecheck --workspace=packages/core
49+
- run: npm run typecheck --workspace=packages/app
50+
51+
build-app:
52+
name: Build Electron App (${{ matrix.os }})
53+
runs-on: ${{ matrix.os }}
54+
needs: [lint, test, typecheck]
55+
strategy:
56+
matrix:
57+
os: [ubuntu-latest, windows-latest, macos-latest]
58+
steps:
59+
- uses: actions/checkout@v4
60+
- uses: actions/setup-node@v4
61+
with:
62+
node-version: 20
63+
cache: npm
64+
- run: npm ci
65+
- run: npm run build --workspace=packages/core
66+
- run: npm run build --workspace=packages/app
67+
- name: Package with electron-builder
68+
run: npm run dist --workspace=packages/app
69+
env:
70+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
- name: Upload artifacts
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: mappit-app-${{ matrix.os }}
75+
path: packages/app/release/*.*
76+
if-no-files-found: ignore

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish mappit-core to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Publish to npm
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: npm
20+
registry-url: https://registry.npmjs.org
21+
- run: npm ci
22+
- run: npm run build --workspace=packages/core
23+
- run: npm run test --workspace=packages/core
24+
- name: Publish
25+
run: npm publish --workspace=packages/core --provenance --access public
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ node_modules
33
packages/*/node_modules
44
packages/*/dist
55
packages/*/coverage
6+
packages/*/docs
7+
packages/app/release
68
*.tsbuildinfo

README.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
1-
# MappIt
1+
# MappIt — Google Location History Viewer & Toolkit
2+
3+
> **Open-source desktop app and CLI to load, filter, and visualize your Google Location History data exported from Google Takeout.**
4+
> Supports all export formats (Records.json, Timeline.json, Semantic Location History), handles files > 500 MB, and keeps your data 100 % local.
5+
6+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7+
[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org/)
8+
9+
**Keywords:** google location history viewer, google takeout visualization, google maps timeline viewer, google location history map, location history export tool, GPS data visualization, google timeline data explorer
10+
11+
---
12+
13+
<details>
14+
<summary><strong>🇬🇧 English summary</strong></summary>
15+
16+
MappIt is a privacy-first toolkit for exploring your Google Location History locally:
17+
18+
- **Electron desktop app** with interactive map (deck.gl + MapLibre), timeline sidebar, activity filters, area search, and KML/JSON export
19+
- **Node.js CLI** for headless processing, filtering, and exporting
20+
- **Core library** (`mappit-core`) usable in your own scripts
21+
- Auto-detects all Google Takeout location formats (Records.json, Timeline.json standard/semantic/iOS, monthly Semantic Location History files)
22+
- Filters by date range, bounding box, or activity type
23+
- Computes stats: distance per activity, monthly summaries, yearly breakdowns
24+
- Exports to JSON and KML
25+
26+
</details>
27+
28+
---
229

330
Strumenti per caricare, filtrare e visualizzare i dati di Google Location History scaricati da Google Takeout.
431

@@ -207,7 +234,23 @@ dist/
207234
- **Vite** v7 come bundler per il renderer
208235
- **Vanilla TypeScript** per la UI (nessun framework)
209236

210-
> La UI mappa e timeline (deck.gl, sidebar, filtri interattivi) è pianificata per la Fase 5. Vedi [ROADMAP.md](ROADMAP.md).
237+
> L'app include mappa interattiva (deck.gl + MapLibre), sidebar timeline, filtri attività, ricerca luoghi, area search, summary con grafici, e export KML/JSON.
238+
239+
### Distribuzione
240+
241+
L'app può essere pacchettizzata per Windows, macOS e Linux tramite electron-builder:
242+
243+
```bash
244+
# Build + package per la piattaforma corrente
245+
npm run dist --workspace=packages/app
246+
247+
# Oppure per piattaforme specifiche
248+
npm run dist:win --workspace=packages/app
249+
npm run dist:mac --workspace=packages/app
250+
npm run dist:linux --workspace=packages/app
251+
```
252+
253+
Gli artefatti vengono generati in `packages/app/release/`.
211254

212255
---
213256

@@ -218,11 +261,23 @@ npm run build # build di tutti i package
218261
npm run test # test di tutti i package
219262
npm run lint # ESLint su tutti i sorgenti TypeScript
220263
npm run format # Prettier su tutti i sorgenti TypeScript
221-
npm run legacy:start # avvia la vecchia app Electron+Plotly (pre-ristrutturazione)
222264
```
223265

224266
---
225267

268+
## Documentazione API
269+
270+
La documentazione API di `mappit-core` è generata con [TypeDoc](https://typedoc.org/) a partire dai commenti JSDoc nel codice sorgente.
271+
272+
```bash
273+
# Genera la documentazione HTML in packages/core/docs/
274+
npm run docs --workspace=packages/core
275+
```
276+
277+
Apri `packages/core/docs/index.html` nel browser per consultarla.
278+
279+
---
280+
226281
## Fixtures di test
227282

228283
La cartella `fixtures/` contiene file di esempio per ogni formato, usati dai test unitari:
@@ -246,8 +301,11 @@ mappit-core/
246301
│ ├── core/ ← mappit-core (libreria + CLI)
247302
│ │ ├── src/
248303
│ │ ├── dist/ ← output build (gitignored)
304+
│ │ ├── docs/ ← documentazione API TypeDoc (gitignored)
305+
│ │ ├── tests/
249306
│ │ ├── package.json
250307
│ │ ├── tsconfig.json
308+
│ │ ├── typedoc.json
251309
│ │ └── vitest.config.ts
252310
│ └── app/ ← mappit-app (Electron)
253311
│ ├── src/
@@ -260,11 +318,9 @@ mappit-core/
260318
│ ├── package.json
261319
│ └── tsconfig.json
262320
├── fixtures/ ← dati di test per tutti i formati
263-
├── src/ ← codice legacy (pre-ristrutturazione)
264-
├── timeline.html ← viewer HTML standalone (pre-ristrutturazione)
321+
├── .github/workflows/ ← CI/CD (lint, test, build)
265322
├── tsconfig.base.json ← tsconfig condiviso
266323
├── eslint.config.js
267-
├── .prettierrc
268324
├── package.json ← workspace root
269325
├── ROADMAP.md ← piano di sviluppo dettagliato
270326
└── DECISIONS.md ← registro decisioni implementative

ROADMAP.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,16 @@ interface MappitDataset {
307307

308308
---
309309

310-
### Fase 7 — Pulizia e rilascio
310+
### Fase 7 — Pulizia e rilascio
311311

312312
> **Obiettivo**: codice production-ready.
313313
314-
- [ ] **7.1** Rimuovere i file legacy (`src/main.js`, `src/data.js`, `src/plot.js`, `src/utils.js`, `src/defaults.js`, `index.html`, `test_data.js`, `timeline.html`)
315-
- [ ] **7.2** Documentazione API per `mappit-core` (JSDoc o TypeDoc)
316-
- [ ] **7.3** README aggiornato con istruzioni per entrambi i package
317-
- [ ] **7.4** CI/CD: GitHub Actions per lint, test, build
318-
- [ ] **7.5** Pubblicazione npm del core (opzionale, può restare privato)
319-
- [ ] **7.6** Build dell'app Electron per distribuzione con electron-builder
314+
- [x] **7.1** Rimuovere i file legacy (`src/main.js`, `src/data.js`, `src/plot.js`, `src/utils.js`, `src/defaults.js`, `index.html`, `test_data.js`, `timeline.html`)
315+
- [x] **7.2** Documentazione API per `mappit-core` (JSDoc + TypeDoc)
316+
- [x] **7.3** README aggiornato con istruzioni per entrambi i package
317+
- [x] **7.4** CI/CD: GitHub Actions per lint, test, build
318+
- [x] **7.5** Pubblicazione npm del core (preparata con `prepublishOnly`, workflow publish.yml)
319+
- [x] **7.6** Build dell'app Electron per distribuzione con electron-builder
320320

321321
---
322322

index.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)