AgentSkillsCN

progressive-centralization-starter

基于Bun的Bootstrap单文件前端开发框架,搭配Filebase/IPFS、ENS以及Arweave/ArNS部署工具。当您需要创建渐进式中心化启动项目、配置基于环境变量的部署流程,或当用户只需一句“直接帮我搞定IPFS/ENS/Arweave托管”时,此工具便是您的理想之选。

SKILL.md
--- frontmatter
name: progressive-centralization-starter
description: Bootstrap Bun-based single-file frontends with Filebase/IPFS, ENS, and Arweave/ArNS deploy tooling. Use when creating a progressive centralization starter project, setting up .env-driven deploys, or when the user asks to "just do it" for IPFS/ENS/Arweave hosting.

Progressive Centralization Starter

Scaffold a new project

  • bun run init -- --template page --dest ./my-page
  • bun run init -- --template web3 --dest ./my-web3

Quick start (inside a template project)

  1. bun install
  2. cp .env.example .env
  3. Fill .env
  4. bun run default <template> (optional)
  5. bun run build <template> (or bun run build if default set)
  6. bun run deploy <template> (or bun run deploy if default set)
  7. bun run preview <template> (optional)
  8. bun run dev (local Anvil + deploy + build)

Configuration essentials

  • Townsquare app: APP_CHAINS_JSON, APP_DEFAULT_CHAIN_ID, TOWNSQUARE_ADDRESSES_JSON
  • Filebase IPFS: FILEBASE_BUCKET, FILEBASE_ROOT_KEY, FILEBASE_ROOT_SECRET
  • ENS: ENS_NAME, PRIVATE_KEY, APP_CHAINS_JSON, ENS_CHAIN_ID (or ENS_RPC_URL), optional ENS_NAMEWRAPPER_ADDRESS
  • Optional Arweave/ArNS: ARWEAVE_KEY / ARWEAVE_KEYFILE, ARNS_NAME or ARNS_PROCESS_ID

Deploy flags

  • --dry-run (build + upload only)
  • --skip-ens (skip ENS update)
  • --cid <cid> (use an existing CID)
  • --name <ens> (override ENS name)
  • --no-resolver-switch (avoid auto-switching resolver)

Customize the frontend

  • templates/<template>/src/main.ts: UI logic
  • templates/<template>/src/styles.css: styles
  • templates/<template>/src/template.html: metadata + placeholders
  • templates/<template>/public/: optional static assets copied into dist/
  • contracts/Townsquare.sol: on-chain template contract

Guardrails

  • Use Bun for all commands; do not use npm or Node.
  • Never commit .env or wallet keys.