# Setting Up the Project

In this step, you start **EventSourcingDB**, create a **Go module** for the library, and add **ArchitectureKit** to it.

## Starting EventSourcingDB

ArchitectureKit stores its events in EventSourcingDB. Start it with the following command. On the first start, Docker downloads the image:

```shell
docker run -it -p 3000:3000 \
  thenativeweb/eventsourcingdb run \
  --api-token=secret \
  --data-directory-temporary \
  --http-enabled \
  --https-enabled=false
```

This starts EventSourcingDB on port `3000`, with the API token `secret`, a **temporary data directory** that is cleaned up on shutdown, and unencrypted HTTP.

Keep EventSourcingDB running for the whole tutorial. Every step builds on the events that the previous steps have written, and since the data directory is temporary, stopping EventSourcingDB removes all of them.

> **For Development and Testing Only**
>
> These settings simplify the setup but are not secure for production. For production-ready configurations, see **[Running EventSourcingDB](/docs/eventsourcingdb/running-eventsourcingdb)**.

To check that EventSourcingDB is ready, open a second terminal and send a ping:

```shell
curl http://localhost:3000/api/v1/ping
```

The response looks like this, with the exception of the `time` field:

```json
{"specversion":"1.0","type":"io.eventsourcingdb.api.ping-received","source":"https://www.eventsourcingdb.io","id":"0","time":"2026-09-29T21:57:18.723703254Z","subject":"/api/v1/ping","datacontenttype":"application/json","data":{"message":"My God, it's full of stars."}}
```

## Creating a Module

In the second terminal, create a directory for the library and a Go module in it. Then add ArchitectureKit and the **[client SDK for Go](/docs/eventsourcingdb/sdks/go)**, which ArchitectureKit uses to connect to EventSourcingDB:

```shell
mkdir library
cd library
go mod init library
go get github.com/thenativeweb/architecturekit-golang/architecturekit github.com/thenativeweb/eventsourcingdb-client-golang/eventsourcingdb
```

## Planning the Files

The library consists of a few files in the package `main`, all in the `library` directory:

- **`events.go`** and **`book.go`** hold the events and the state of a book.
- **`store.go`** connects to EventSourcingDB.
- **`commands.go`** and **`deciders.go`** hold the commands and the decisions on them.
- **`catalog.go`** and **`queries.go`** hold the view and the query that reads it.
- **`requests.go`** maps HTTP requests to commands and queries.
- **`deciders_test.go`** tests the decisions.

The following steps add these files one by one. The file **`main.go`** runs what the current step is about, so every step replaces it.
