Skip to content

Commit ca011f8

Browse files
authored
Merge pull request #16 from hothsys/playwright-fixes
Short refactor and Playwright fixes
2 parents 748cb3f + 62826c2 commit ca011f8

11 files changed

Lines changed: 684 additions & 607 deletions

File tree

CLAUDE.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: matrix-project
3+
description: CLAUDE.md for the Matrix project - local-first travel photo mapping app
4+
metadata:
5+
project_type: travel-photo-mapping
6+
test_framework: playwright
7+
---
8+
9+
# Matrix Project
10+
11+
A local-first travel photo mapping app. Runs entirely in the browser with no account needed.
12+
13+
## Running the App
14+
15+
```bash
16+
# Start server (default port 8765)
17+
python3 serve.py
18+
19+
# Start on custom port
20+
python3 serve.py 8080
21+
```
22+
23+
## Running Tests
24+
25+
```bash
26+
python3 serve.py --run-tests
27+
```
28+
29+
## Project Structure
30+
31+
```
32+
matrix/
33+
├── assets/ # Images/gifs for README
34+
├── css/ # Stylesheets
35+
├── js/ # JavaScript modules
36+
├── tests/
37+
│ └── fixtures/ # Test images (tokyo.jpg, paris.jpg, nyc.jpg, etc.)
38+
├── vendor/ # Downloaded dependencies (maplibre-gl, fonts, etc.)
39+
├── serve.py # Local server with auto-save
40+
├── index.html # Main app
41+
├── sw.js # Service worker for tile caching
42+
├── dependencies.json # Vendor dependency manifest
43+
└── matrix-data.json # Auto-save backup (runtime)
44+
```
45+
46+
## Runtime Directories
47+
48+
- `matrix-photos/` - Full-size images and thumbnails
49+
- `matrix-tiles/` - Cached map tiles
50+
51+
## Dependencies
52+
53+
Vendor dependencies defined in `dependencies.json`:
54+
- `maplibre-gl` - Map visualization library
55+
- `supercluster` - Clustering library
56+
- `exif-js` - EXIF metadata extraction
57+
58+
## Testing
59+
60+
Test images are stored in `tests/fixtures/`:
61+
- `tokyo.jpg`
62+
- `paris.jpg`
63+
- `nyc.jpg`
64+
- `noexif.jpg`
65+
- `nogps.jpg`

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,15 @@ The satellite and 3D Terrain views use separate raster tile sources unrelated to
204204

205205
Everything stays **100% local**. No data is sent anywhere except OpenStreetMap/Nominatim for place lookups. No login required.
206206

207+
## Demo Mode
208+
209+
The app includes two automated demos you can trigger with keyboard shortcuts:
210+
211+
| Shortcut | Description |
212+
|---|---|
213+
| **Ctrl+Shift+D** | App walkthrough — automated demo with fake cursor that flies around the map, pins locations, switches tabs, and opens photos in lightbox. Demo pins are automatically cleaned up when the demo ends. |
214+
| **Ctrl+Shift+G** | Globe rotation — switches to globe view and spins it 3 times along the equator. Uses GPU-rendered dots instead of DOM markers for smooth animation without jitter. Press again to stop early. |
215+
207216
---
208217

209218
Built with [Claude Code](https://claude.ai/claude-code) using Claude Opus 4.6

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@
200200
<script src="js/albums.js"></script>
201201
<script src="js/modals.js"></script>
202202
<script src="js/search.js"></script>
203+
<script src="js/lightbox.js"></script>
204+
<script src="js/playback.js"></script>
205+
<script src="js/export.js"></script>
203206
<script src="js/media.js"></script>
204207
<script src="js/data.js"></script>
205208
<script src="js/demo.js"></script>

0 commit comments

Comments
 (0)