Skip to main content
A freshly created Copper project, using the default inertia:react frontend and a database, looks like this:

cmd/

Each subdirectory is a binary. cmd/app runs the HTTP server, while cmd/migrate applies database migrations. Both are thin main.go files plus a wire.go describing their dependencies; all real logic lives in pkg/. copper build compiles every cmd/* target into build/.

config/

TOML configuration, layered with extends. Both dev.toml and prod.toml extend base.toml. See Configuration for more.

migrations/

Sequentially numbered SQL files, embedded into the migrate binary so that production deploys are self-contained. See Migrations.

pkg/

Your application code. Each feature gets its own package, and copper scaffold:pkg rockets creates one and registers it in pkg/app/wire.go. The app package is the composition root, collecting every package’s routers into the HTTP handler and every package’s wire module into the application.

web/

The frontend. Everything under src/ (templates and React code) and public/ is embedded into the application binary at build time, so you ship a single executable. During development, use_local_html = true in dev.toml serves these files from disk instead, giving you live reload.
After copper build, you’ll also see build/ (compiled binaries) and web/build/ (compiled frontend assets plus a generated embed.go). Both are gitignored.