NoteBugsDocs

Start

Quickstart

From a running container to the first authenticated call, in five steps.

  1. 1

    Bring the application up

    Compose publishes the application on port 3000 and brings PostgreSQL up alongside. Migrations run in the entrypoint, and there is no seed step.

    docker compose up -d --build
    
    # the container's health, with no credential at all
    curl -s http://localhost:3000/api/health
  2. 2

    Create the first account

    With no account in the database, /login is the first-access screen, and the account created there is born an admin. Through the API it is a single call, and it answers 409 forever after that.

    curl -s -X POST http://localhost:3000/api/auth/setup \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Ana",
        "email": "[email protected]",
        "password": "a long password"
      }'
  3. 3

    Generate the API token

    In My account → Security, or over HTTP with the session cookie. The plain value comes out ONCE: keep it right away.

    curl -s -c cookies.txt -X POST http://localhost:3000/api/auth/login \
      -H "Content-Type: application/json" \
      -d '{ "email": "[email protected]", "password": "a long password" }'
    
    curl -s -b cookies.txt -X POST http://localhost:3000/api/profile/token
  4. 4

    Find the workspace

    Every creation asks for tenantId, and it comes from here. The session also lists the workspaces the account reaches.

    export TOKEN="the value from the previous step"
    
    curl -s http://localhost:3000/api/tenants \
      -H "Authorization: Bearer $TOKEN"
  5. 5

    Create the first card

    The column must belong to the set in effect for the card. With no project, that is the workspace's own set.

    curl -s "http://localhost:3000/api/columns?tenant=$TENANT" \
      -H "Authorization: Bearer $TOKEN"
    
    curl -s -X POST http://localhost:3000/api/cards \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d "{
        \"tenantId\": \"$TENANT\",
        \"title\": \"First card through the API\",
        \"columnId\": \"$COLUMN\"
      }"

The card is born at the top of the first column

And gets a sequential number that is never reused: today's #42 never becomes anyone else's #42 tomorrow, even if the card is deleted.

After this