blob: 3f14ab6844d6d3fc81ecaffc412ae0c6241c767f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<div align="center">
# galleryd



A fast, lightweight photo gallery backend written in Go.
galleryd scans one or more image directories, extracts EXIF metadata, generates cached WebP thumbnails, and exposes a simple HTTP API for powering web, desktop, or mobile gallery applications.
</div>
## Features
- Scan multiple gallery directories
- Extract EXIF metadata
- Stable photo IDs
- WebP thumbnail generation
- Disk-backed thumbnail cache
- In-memory gallery index
- HTTP API
- Configurable via command-line flags
## Installation
```bash
git clone ...
cd galleryd
go build ./cmd/galleryd
```
## Usage
```bash
galleryd \
--dir ~/Pictures \
--dir ~/Phone \
--cache-dir ~/.cache/galleryd \
--addr :8082
```
## API
| Method | Endpoint | Description |
| ------ | ----------- | --------------- |
| GET | /health | Health check |
| GET | /api/photos | List all photos |
| GET | /photo/{id} | Original image |
| GET | /thumb/{id} | Thumbnail |
## Architecture
```
Scanner
↓
Metadata Reader
↓
Gallery Builder
↓
Gallery Service
↓
HTTP API
```
## Roadmap
- Gallery reload
- Filesystem watching
- Search
- Frontend
## License
MIT
|