Skip to content

Repository files navigation

Article Prop

A Vite app for writing, previewing, and publishing proposal snapshots. Published proposals are stored in Vercel Blob and shared as public ?blob=... links.

Local development.

Prerequisites:

  • Node.js
  • A Vercel Blob store with a read/write token

Setup:

  1. Install dependencies with npm install
  2. Copy .env.example to .env.local
  3. Set BLOB_READ_WRITE_TOKEN and PUBLISH_API_TOKEN in .env.local
  4. Run npm run dev

vite dev also serves the local /api/publish, /api/publish-bot, and /api/proposal endpoints, so the full publish flow works locally.

Deploy on Vercel

  1. Import the repo into Vercel as a Vite project
  2. Add BLOB_READ_WRITE_TOKEN and PUBLISH_API_TOKEN to the project environment variables
  3. Deploy

The production app uses:

  • POST /api/publish to create immutable proposal snapshots
  • direct Blob-backed share links so the public viewer can load proposal JSON without a second server lookup
  • POST /api/publish-bot as a private bearer-token endpoint for bots / CLI publishing

Bot / CLI publishing

Private endpoint:

  • POST /api/publish-bot
  • header: Authorization: Bearer <PUBLISH_API_TOKEN>
  • body: { title, slug, markdownContent, coverImage }

Local CLI:

npm run publish:md -- ./proposal.md --title "Base Proposal" --slug based

Optional arguments:

  • --cover ./cover.png
  • --cover https://...
  • --origin https://proposal.nerdconf.com

About

Copy of article-prop-direct-blob

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages