Auto-indexing service and GraphQL API for AT Protocol Records quickslice.slices.network/
atproto gleam graphql
Gleam 91.5%
JavaScript 2.6%
TypeScript 1.4%
Erlang 1.4%
HTML 1.0%
CSS 0.6%
Shell 0.4%
Makefile 0.2%
Dockerfile 0.1%
Other 0.8%
216 1 28

Clone this repository

https://tangled.org/slices.network/quickslice
git@tangled.org:slices.network/quickslice

For self-hosted knots, clone URLs may differ based on your setup.

README.md
Slices and Lucy

quickslice#

Quickslice is a quick way to spin up an AppView for AT Protocol applications. Import your Lexicon schemas and you get a GraphQL API with OAuth authentication, real-time sync from the network, and joins across record types without setting up a database or writing any backend code.

Warning This project is in early development. APIs may change without notice.

What Quickslice Does#

  • Connects to Jetstream and tracks the record types defined in your Lexicons
  • Indexes relevant records into a database (SQLite or Postgres)
  • Generates GraphQL queries, mutations, and subscriptions from your Lexicon definitions
  • Handles OAuth and writes records back to the user's PDS
  • Enables joins by DID, URI, or strong reference, so you can query a status and its author's profile in one request

Example#

The status lexicon (xyz.statusphere.status):

{
  "lexicon": 1,
  "id": "xyz.statusphere.status",
  "defs": {
    "main": {
      "type": "record",
      "key": "tid",
      "record": {
        "type": "object",
        "required": ["status", "createdAt"],
        "properties": {
          "status": {
            "type": "string",
            "minLength": 1,
            "maxGraphemes": 1,
            "maxLength": 32
          },
          "createdAt": { "type": "string", "format": "datetime" }
        }
      }
    }
  }
}

Querying the status records:

query {
  xyzStatusphereStatus(
    first: 50
    sortBy: [
      { field: createdAt, direction: DESC }
    ]
    where: {
      status: { contains: "👍" }
    }
  ) {
    edges {
      node {
        uri
        did
        status
        createdAt
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Quick Start#

Docker#

Run Quickslice locally with Docker:

docker compose up --build

Open http://localhost:8080 and login with your Bluesky handle.

For PostgreSQL instead of SQLite:

docker compose -f docker-compose.postgres.yml up --build

Native Development#

For development without Docker:

Prerequisites:

  • Gleam v1.13+
  • dbmate for migrations
  • Node.js 18+ (for client build)

Setup:

# Server
cd server
cp .env.example .env
make db-setup-sqlite
gleam run

# Client (rebuild after changes)
cd client
npm install
gleam run -m lustre/dev build

See server/README.md for detailed configuration.

Documentation#

Structure#

  • server/ - Main server with database layer, GraphQL API, and Jetstream ingestion
  • lexicon_graphql/ - GraphQL schema generation from AT Protocol Lexicons
  • atproto_car/ - CAR (Content Addressable aRchive) file parsing for backfills
  • client/ - Web-based GraphQL playground and admin UI
  • quickslice-client-js/ - JavaScript client library
  • www/ - Documentation website

License#

Apache License 2.0