Building from Source

Set up your development environment and build Yap

Prerequisites

Before building, ensure you have the following installed:

Required

ToolVersionInstallation
Go1.21+golang.org
Node.js18+nodejs.org
Wails CLIv2go install github.com/wailsapp/wails/v2/cmd/wails@latest
PortAudioLatestSee below

Optional (for local transcription)

ToolPurposeInstallation
whisper-cppLocal transcriptionbrew install whisper-cpp

Installing PortAudio

macOS

brew install portaudio

Ubuntu/Debian

sudo apt-get install portaudio19-dev

Fedora

sudo dnf install portaudio-devel

Windows

PortAudio is included via CGO bindings. Ensure you have a working C compiler (MinGW or MSVC).

Clone the Repository

git clone https://github.com/ApplauseLab/yap.git
cd yap

Install Dependencies

Go Dependencies

go mod download

Frontend Dependencies

cd frontend
npm install
cd ..

Development Mode

Run with hot reload for both Go and React:

wails dev

This starts:

  • Go backend with live reload
  • Vite dev server for React frontend
  • Opens the app window

Changes to Go code trigger a rebuild. Changes to React code hot-reload instantly.

Production Build

Build a distributable application:

wails build

Output location:

  • macOS: build/bin/Yap.app
  • Windows: build/bin/Yap.exe
  • Linux: build/bin/Yap

Platform-Specific Builds

# macOS (Universal binary)
wails build -platform darwin/universal

# Windows
wails build -platform windows/amd64

# Linux
wails build -platform linux/amd64

Troubleshooting

CGO Errors

PortAudio requires CGO. Ensure:

export CGO_ENABLED=1

Missing whisper-cpp

If you see whisper.cpp errors:

# macOS
brew install whisper-cpp

# Or build from source
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp && make
sudo cp main /usr/local/bin/whisper-cli

Node.js Version

If npm install fails, check your Node.js version:

node --version  # Should be 18+

Wails Not Found

Ensure your Go bin is in PATH:

export PATH=$PATH:$(go env GOPATH)/bin

Next Steps