> ## 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.

# Introduction

Copper is a batteries-included web toolkit for Go. It provides everything you need to build a complete web application, including an HTTP server, routing, dependency injection, configuration, logging, structured errors, and SQL queries with migrations, along with a CLI that scaffolds your project, rebuilds it as you work, and compiles the entire application into a single binary.

At the same time, Copper stays out of your way. It relies on the standard library as much as possible, so handlers are plain `http.HandlerFunc`s and models are plain structs. There is no ORM and no reflection magic, and your business logic is never locked in. You own `main.go`, and every scaffolded file lands in your repo as code you are free to edit.

### The GRIP Stack

Copper is opinionated about one thing: the stack. It's built and optimized for **GRIP**:

* **G**olang for your server, services, and data layer
* **R**eact for your pages
* **I**nertia to connect the two with server-side routing
* **P**ostgres for your data

GRIP is a stack rather than a product, and you could assemble it by hand. Copper is the fastest way to build it: a single `copper create` gives you all four pieces, wired together and ready to build on. Of course, every piece is swappable. You may build [JSON APIs](/http/json) with no frontend at all, render classic [Go templates](/http/html-views), or use SQLite or MySQL instead of Postgres.

### Why Copper?

#### A Complete Toolkit

Routing, dependency injection, configuration, logging, structured errors, SQL migrations, and a Vite-powered React frontend with hot module replacement are all included, so you can start building features instead of assembling libraries.

#### No API Layer to Maintain

With [Inertia](/frontend/inertia), your Go routers render React pages directly and pass props the same way you would pass template data. You get a modern React frontend without writing an API client, a REST layer, or a client-side router.

#### Idiomatic Go

You write regular handlers, structs, and interfaces, and Copper wires them together with [google/wire](https://github.com/google/wire). Dependency injection happens at compile time, so there is no runtime container to configure or debug.

#### A Single Binary

Frontend assets, templates, and migrations are all compiled into one executable, so deploying is copying one file.

### A Taste of Copper

A page in a Copper application is a Go handler and a React component. The handler loads data and renders the component with props:

```go pkg/rockets/router.go theme={null}
func (ro *Router) HandleFleetPage(w http.ResponseWriter, r *http.Request) {
	rockets, err := ro.queries.ListRockets(r.Context())
	if err != nil {
		ro.logger.Error("Failed to list rockets", err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	ro.inertia.Render(w, r, inertia.RenderParams{
		Component: "fleet",
		Props: map[string]any{
			"rockets": rockets,
		},
	})
}
```

```tsx web/src/pages/fleet.tsx theme={null}
type Rocket = { id: number; name: string; status: string };

export default function Fleet({ rockets }: { rockets: Rocket[] }) {
  return (
    <ul>
      {rockets.map((rocket) => (
        <li key={rocket.id}>
          {rocket.name} — {rocket.status}
        </li>
      ))}
    </ul>
  );
}
```

There is no fetch call, serialization layer, or duplicated routing to maintain, since the server decides what to render and which data it receives.

### Next Steps

To get started, [install the Copper CLI](/getting-started/installation) and [create your first project](/getting-started/create-project). If you would like to see everything working together, the [tutorial](/getting-started/tutorial) walks through building your first application end to end. We can't wait to see what you build.
