以 AI 建構 SayPay 與 Margin:讓用戶掌握主導權的兩種不同方式
Building SayPay and Margin with AI: Two Different Ways to Keep the User in Control
作者藉助 AI 建構 SayPay 和 Margin 兩個用途不同的項目,分別讓用戶在確認付款前審核方案,以及在寫作時保留研究脈絡。SayPay 在 Nimiq Pay 內運作,Gemini 支援其自然語言介面;用戶檢視付款方案後,再透過 Nimiq Pay 簽署。Margin 則把資料來源和先前的寫作內容放在項目脈絡中,讓用戶檢視及修改生成草稿。
In Margin, the user needs room to work on an idea. In SayPay, the user needs to understand a proposed payment before approving it. I built these two independent projects with AI assistance, but they serve different purposes.
This is a closer look at the applications and the decisions behind them.
SayPay: review the plan before confirming
I built SayPay for a Nimiq hackathon. It runs as a mini app inside Nimiq Pay, with Gemini supporting its natural-language interface.
Ask can help organize tasks, notes, and receipts. Work brings together jobs, stages, timers, and invoices. The payment flow has a separate review and confirmation step: the assistant can help prepare a plan, but the user signs through Nimiq Pay.
SayPay's desktop launch page. The wallet-connected app runs inside Nimiq Pay; this screenshot shows the entry point, not a completed transaction.
That boundary matters. Interpreting what someone typed and authorizing a payment are separate actions. A useful interface needs to make the proposed payment clear enough for the user to check it before signing.
The repository documents Next.js with vinext, Cloudflare Workers, and D1. The Nimiq mini-app SDK handles signing and sending through the host app, while Nimiq JSON-RPC is used for reads and transaction confirmation. Gemini supports Ask, with a local parser available when its API key is missing.
Those are the documented components. This article isn't a security audit or a claim that every payment path has been tested end to end.
SayPay source and README · Open SayPay
Margin: keep the context close to the writing
Margin is a writing and research workspace. I shaped the concept and used ChatGPT and Codex to help build and iterate on it.
The workspace brings together project briefs, sources, and writing. Quick Edit is for polishing an existing draft. The Library holds saved work. Hackathon Lab provides a separate place to research a brief and shape a build idea.
Margin's workspace home. Private project documents and draft contents aren't shown.
The product question here is different from SayPay's. How do you help someone return to an idea without rebuilding the context each time? Margin's approach is to keep sources and earlier writing around the project, then give the user ways to refine and save the next piece.
I want the writing to remain something the user can question and change. A generated draft is a starting point for review, rather than a finished piece the user has to accept.
Where I fit into the build
My work includes shaping the ideas, deciding which features belong, breaking requirements into tasks, directing AI-assisted development, and reviewing generated results. I use AI assistants and coding agents as part of that process.
These projects give me specific work to discuss beyond a list of tools: a mini app with a payment-confirmation boundary, and a workspace built around writing with context. The screenshots show the current entry screens. The links let readers explore further, with SayPay requiring its Nimiq Pay host for the full experience.
Disclosure: This article was written with AI assistance from my project descriptions, SayPay's README, and the visible app interfaces.
來源:DEV Community · dev.to

