Getting Started

Quickstart

This guide will help you set up quickly and explain what to do next to fully utilize Bosca's features.

Choose How to Run Bosca

To get set up fast, use Docker Compose. Here's how:

# for linux
git clone git@github.com:sowers-io/bosca.git
cd bosca
docker compose up -d
# for macos
git clone git@github.com:sowers-io/bosca.git
cd bosca
docker compose -f docker-compose-macos.yaml up -d

Admin Endpoint: http://127.0.0.1:3001/

GraphQL Endpoint: http://127.0.0.1:8000/

Username: admin Password: password

or, for development flows, make sure you have rust installed and graalvm installed, then you can do the following:

git clone git@github.com:sowers-io/bosca.git
cd bosca
./scripts/start-services
./scripts/run-release

Login to Bosca via API

Bosca supports persisted queries, this enables highly cachable calls at the CDN and less bandwidth overhead during large requests.

The Query Definition:

query Login($identifier: String!, $password: String!) {
    security {
      login {
        password(identifier: $identifier, password: $password) {
          principal {
            id
            groups {
              id
              name
            }
          }
          token {
            token
          }
        }
      }
    }
}

An example using the Apollo Kotlin client:

suspend fun login(identifier: String, password: String): String {
    val response = client.query(LoginQuery(identifier, password)).execute()
    return response.data?.security?.login?.password?.token?.token
}

Login to Bosca via GraphiQL

Or, if you want to run the query in GraphiQL:

query {
  security {
    login {
      password (identifier: "admin", password: "password") {
        token {
          token
        }
      }
    }
  }
}

You'll get a response that looks like this:

{
  "data": {
    "security": {
      "login": {
        "password": {
          "token": {
            "token": "...."
          }
        }
      }
    }
  }
}

You can then use the returned token to authenticate to Bosca via an Authorization Header.

Bosca also supports Basic Authentication.

From here you can read up on Collections and Metadata.

Or, you can read the full Bosca GraphQL Schema.


If you'd like other setup options or further details, see the Deployment.