Adds "✨ Auto Pairs erstellen" button to the PairsPanel. On click, sends the image and all object coordinates to Claude Haiku, which returns 30 structured pairs (10× text, 10× yes_no, 10× question, each split easy/medium difficulty) as JSON. Pairs are then created and linked via the API with a live progress indicator. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
snakkimo-CMT — Development Rules
Stack
- React + Vite + Tailwind v4
- API: snakkimo-API (Express/Node.js, PostgreSQL) at the URL in
src/lib/api.js - Deployed at cmt.snakkimo.com via Coolify (UUID:
wa3esdrwh7ib5i7vfhwrknb4)
Key Rules
Pairs müssen immer mit object_pairs verknüpft sein
Jedes neu erstellte Pair muss direkt nach dem POST /pairs auch in object_pairs eingetragen werden:
const pair = await apiPost('/pairs', { ... });
await apiLink(`/objects/${objectId}/pairs/${pair.id}`);
object_pairs ist die definitive Verknüpfung zwischen einem Pair und dem Bild/Objekt das angezeigt werden soll. Ohne diesen Eintrag ist das Pair für die App unsichtbar.
Placeholder-Format
Sätze in questions/statements speichern Wörter und Objekte als {{uuid}}:
{{wordId}}— Verweis auf ein Wort aus derwordsTabelle{{objectId}}— Verweis auf ein Objekt aus derobjectsTabelle (wird mitwithPlaceholders()gesetzt wenn der User ein Objekt zuweist)
answer_type Werte
Pairs haben einen einzigen answer_type TEXT:
yes_no— Frage + Ja/Nein Antworttext— nur positives Statementquestion— Frage + Positiv + Negativword— Frage + positive/negative Wörter (überstatement_positive_words/statement_negative_words)
Deployment
Push auf main → Coolify baut automatisch.
Manueller Deploy via MCP: mcp__coolify__deployments mit operation: deploy, query: {"uuid":"wa3esdrwh7ib5i7vfhwrknb4"}.