caffeine-app

Scaffold and build Caffeine apps with caffeine.toml manifests, Motoko backend, and React frontend.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/phukrit7171/Relationship-Smart-Contract-ICP --skill caffeine-app-phukrit7171
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caffeine-app
Source: https://github.com/phukrit7171/Relationship-Smart-Contract-ICP/tree/main/.agents/skills/caffeine-app
Command: npx skills add https://github.com/phukrit7171/Relationship-Smart-Contract-ICP --skill caffeine-app-phukrit7171

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @caffeineai/cli, and includes references (resource) components.

What problem does it solve? Building a Caffeine (caffeine.ai) app from scratch requires knowing an exact project layout — workspace and canister manifests, a single Motoko backend canister, a pnpm workspace, and a specific CLI build loop — with no caffeine init command to generate it for you. This Skill provides the verified file tree, manifest contents, and build workflow so the app compiles on the first attempt. ## Core Features & Use Cases - Complete project scaffolding: Provides the exact directory tree and contents for caffeine.toml (workspace + canister manifests), mops.toml, package.json, pnpm-workspace.yaml, and the React/Vite frontend template. - CLI build loop guidance: Covers the ordered workflow of caffeine auth login, doctor, install, build, check --fix, and preview --build, including cloud project id setup for drafts. - Pitfall prevention: Documents twelve common failures such as missing [workspace], editing generated bindings, lockfile errors in non-interactive shells, and stable-signature check failures. - Use Case: A developer wants to create a new full-stack Internet Computer app on caffeine.ai. The Skill produces every config file by hand, runs the build loop, and uploads a draft preview without ever touching dfx. ## Quick Start Ask the AI to scaffold a new Caffeine app from scratch with a Motoko backend and React frontend, then run the caffeine CLI build loop until it compiles.

Frequently Asked Questions about caffeine-app

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Caffeine app from scratch?

There is no caffeine init command, so you create the project files by hand: a root caffeine.toml with a [workspace] section, mops.toml, canister manifests under src/backend and src/frontend, and the frontend template. Then run pnpm install, caffeine install, and caffeine build.

How do I deploy a Caffeine app to a live URL?

The CLI only produces a built draft via caffeine preview --build, which requires a cloud project id from caffeine projects create. Promoting a draft to a live URL happens in the caffeine.ai web app; there is no caffeine deploy or publish command.

Can I use dfx to deploy a Caffeine app?

No, dfx is not part of the Caffeine workflow. Caffeine apps are built through the caffeine CLI and deployed through the caffeine.ai web app. For raw Internet Computer or dfx projects, use the icp-cli skill instead.

Why does caffeine install fail with ERR_PNPM_NO_LOCKFILE?

In non-interactive shells the CLI runs pnpm install --frozen-lockfile, which requires a pnpm-lock.yaml that a brand-new project lacks. Run pnpm install once first to generate the lockfile, then the normal build loop works.

Why does caffeine check fail with backend.most not found?

The stable-signature check compares against a previous build's snapshot under .old/, which a never-built project does not have. Set skipIfMissing = true under [canisters.backend.check-stable] in mops.toml, or run caffeine build first to create a baseline.

Can I edit the generated backend.ts or declarations files?

No, src/frontend/src/backend.ts and src/frontend/src/declarations/ are generated by caffeine-bindgen on every build and any edits are overwritten. Add methods to main.mo, rebuild, and the typed client regenerates automatically.