> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gocopper.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Directory Structure

A freshly created Copper project, using the default `inertia:react` frontend and a database, looks like this:

```
rocketlog/
├── cmd/
│   ├── app/            # HTTP server binary
│   └── migrate/        # database migration binary
├── config/
│   ├── base.toml       # shared config
│   ├── dev.toml        # development overrides
│   └── prod.toml       # production overrides
├── migrations/
│   ├── 0001_initial.sql
│   └── wire.go         # embeds *.sql into the migrate binary
├── pkg/
│   └── app/
│       ├── handler.go  # assembles routers & global middleware
│       ├── logger.go   # logger hooks
│       ├── metrics.go  # metrics registry
│       ├── router.go   # root router (renders the index page)
│       └── wire.go     # composes your packages' wire modules
├── web/
│   ├── public/         # static files served at /static
│   ├── src/
│   │   ├── layouts/    # HTML layout templates
│   │   ├── pages/      # React pages (Inertia components)
│   │   └── main.tsx    # frontend entrypoint
│   ├── package.json
│   ├── vite.config.ts
│   └── wire.go         # embeds templates into the app binary
├── go.mod
├── .gitignore
└── .golangci.yaml
```

### 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](/the-basics/configuration) for more.

### migrations/

Sequentially numbered SQL files, embedded into the `migrate` binary so that production deploys are self-contained. See [Migrations](/database/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.

<Note>
  After `copper build`, you'll also see `build/` (compiled binaries) and `web/build/` (compiled frontend assets plus a generated `embed.go`). Both are gitignored.
</Note>
