Development
Prerequisites
Core
Recommended
- watchexec - auto-reloads the API server during development for faster iteration (required for
task watch
) - ExifTool - better metadata extraction, goexif is used otherwise
- FFmpeg - for video thumbnail creation and extended image format support
- djpeg (libjpeg-turbo) - optimized JPEG decoding for better performance
Installation
Core
- Install Go: https://go.dev/doc/install
- Install Node.js: https://nodejs.org/en/download/
- Install Task:
go install github.com/go-task/task/v3/cmd/task@latest
or https://taskfile.dev/installation/
Recommended
- Windows (scoop):
scoop install watchexec exiftool ffmpeg libjpeg-turbo
- macOS (brew):
brew install watchexec exiftool ffmpeg libjpeg-turbo
- Ubuntu/Debian:
sudo apt install watchexec-cli exiftool ffmpeg libjpeg-turbo-progs
- CentOS/RHEL/Fedora:
sudo dnf install exiftool ffmpeg libjpeg-turbo-utils
and watchexec install
Project Setup
Clone the repository
shgit clone https://github.com/smilyorg/photofield.git cd photofield
Install dependencies (geo data, ui, docs)
shtask deps
Running
Run both the API server and the UI server in separate terminals. They are set up to work with each other by default with the API server running at port 8080
and the UI server on port 5173
.
Using Task (Recommended)
Start the API server with auto-reload
shtask watch
In a separate terminal, start the UI server
shtask ui
Manual Commands
Start the API server
shgo run .
In a separate terminal, start the UI server
shcd ui npm run dev
Migration from just
If you were previously using just
, replace:
just watch
→task watch
just build
→task build
just ui
→task ui
Run task
to see all available commands.