Minimal first vertical slice for a token-authenticated gateway, now extended with a Grist integration framework.
- HTTP endpoint:
POST /api/v1/request - API point:
idea - Actions:
create,delete,move - Required data fields: loaded from env (
IDEA_REQUIRED_FIELDS) - Auth: Bearer token or
x-api-token - Continuation:
interactionId - Downstream calls:
- Grist integration framework added
- Planka integration framework added
idea.createsupports real live Grist and real live Planka card creation when enabled/configureddeleteandmovecurrently use the new framework but remain stubbed pending row/card-identification config
cp .env.example .env
npm startDefault host/port:
127.0.0.1:8787
Default development token:
dev-token- override with
GATEWAY_DEV_TOKEN
- Open:
http://127.0.0.1:8787/admin/tokens - List tokens:
GET /admin/api/tokens - Generate token:
POST /admin/api/tokenswith JSON body like{ "label": "Zapier" } - Newly generated tokens are stored immediately and can be used against
/api/v1/requestright away.
Important deploy-time values live in .env / Docker env:
IDEA_REQUIRED_FIELDSGRIST_ENABLEDGRIST_MODEGRIST_BASE_URLGRIST_API_KEYGRIST_DOC_IDGRIST_TABLE_IDGRIST_TITLE_FIELDGRIST_DATE_FIELDGRIST_MOVE_FIELDPLANKA_ENABLEDPLANKA_MODEPLANKA_BASE_URLPLANKA_ACCESS_TOKENPLANKA_BOARD_IDPLANKA_LIST_IDPLANKA_CARD_TYPEPLANKA_DUE_DATE_SOURCEPLANKA_POSITION
Set:
GRIST_ENABLED=trueGRIST_MODE=liveGRIST_API_KEY,GRIST_DOC_ID, andGRIST_TABLE_ID
When live mode is enabled and configured, idea.create will POST a record to Grist using the configured title/date field mapping.
Set:
PLANKA_ENABLED=truePLANKA_MODE=livePLANKA_BASE_URL,PLANKA_ACCESS_TOKEN, andPLANKA_LIST_ID
When live mode is enabled and configured, idea.create will also POST a card to Planka using the configured list id, card type, and position.
cp .env.example .env
cd docker
docker compose up --buildcurl -s http://127.0.0.1:8787/api/v1/request \
-H 'content-type: application/json' \
-H 'authorization: Bearer dev-token' \
-d '{
"apiPoint": "idea",
"action": "create",
"data": { "title": "Test idea" }
}'curl -s http://127.0.0.1:8787/api/v1/request \
-H 'content-type: application/json' \
-H 'authorization: Bearer dev-token' \
-d '{
"apiPoint": "idea",
"action": "create",
"interactionId": "<from prior response>",
"data": { "date": "2026-04-03" }
}'curl -s http://127.0.0.1:8787/api/v1/request \
-H 'content-type: application/json' \
-H 'authorization: Bearer dev-token' \
-d '{
"apiPoint": "idea",
"action": "create",
"data": { "title": "Live Grist idea", "date": "2026-04-03" }
}'npm test