Lightweight Vercel project that powers two widgets on
https://www.cleanstart.com/community:
- Community Images — proxies the CleanStart images API and returns the 4 latest community images.
- Community Discussions — a Webflow CMS-backed list, plus a simple admin page so team members can publish a LinkedIn discussion to the page in under a minute (no Designer access required).
Production domain: https://community-api.cleanstart.com
community-images/
├── api/
│ ├── community-images.js # GET — 4 latest community images (public)
│ ├── community-discussions.js # GET — 2 latest discussions from Webflow (public)
│ └── create-discussion.js # POST — admin creates a CMS item (auth required)
├── public/
│ └── admin/
│ └── index.html # Admin form at /admin
├── webflow-embed-discussions.html # Paste into the Webflow page embed
├── package.json
├── vercel.json
└── README.md
| # | Value | Where to get it |
|---|---|---|
| 1 | Webflow API token | Webflow dashboard → Workspace settings → Integrations / API Access → Generate token. Scope required: CMS: read and write. |
| 2 | Community Discussions Collection ID | Create the CMS collection first (see below). Then curl -H "Authorization: Bearer <TOKEN>" https://api.webflow.com/v2/sites/<SITE_ID>/collections — copy the id of the new collection. |
| 3 | Admin access key | Generate with openssl rand -hex 24. Used as ?key=... in the admin URL. |
In Webflow Designer → CMS panel → Create New Collection.
- Name:
Community Discussions - Slug:
community-discussions(auto) - Fields:
| Display name | Field type | Required | Slug (auto) |
|---|---|---|---|
| Name | Plain text | ✓ (default) | name |
| Author Name | Plain text | ✓ | author-name |
| Author Initials | Plain text | author-initials |
|
| Author Pic | Image | author-pic |
|
| Excerpt | Plain text (multi-line) | ✓ | excerpt |
| LinkedIn URL | Link | ✓ | linkedin-url |
| Published Date | Date/Time | ✓ | published-date |
Important: the slugs must match exactly. If Webflow generates different
slugs, edit them inline or update the field keys in
api/create-discussion.js and api/community-discussions.js.
| Name | Value |
|---|---|
WEBFLOW_API_TOKEN |
Webflow API token |
WEBFLOW_COLLECTION_ID |
Community Discussions collection ID |
ADMIN_ACCESS_KEY |
Random hex string (e.g. openssl rand -hex 24) |
Apply to Production + Preview + Development → Save → Redeploy.
Legacy note: if you previously set
ADMIN_PASSWORD, it still works as a fallback, but preferADMIN_ACCESS_KEY.
# Public (no auth):
curl https://community-api.cleanstart.com/api/community-images
curl https://community-api.cleanstart.com/api/community-discussions
# Admin create (auth required — key via query param OR Bearer header):
curl -X POST "https://community-api.cleanstart.com/api/create-discussion?key=$ADMIN_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{
"authorName":"Test User",
"excerpt":"Testing the new admin flow.",
"linkedinUrl":"https://www.linkedin.com/posts/test-user-abc123/"
}'Expected: { "ok": true, "item": { … } }. Then check Webflow CMS — the new
item should be live.
- URL:
https://community-api.cleanstart.com/admin?key=YOUR_ADMIN_ACCESS_KEY - Bookmark this URL once — no login prompt after that.
- If you open
/adminwithout?key=, you'll be prompted once and the key is written into the URL (so the bookmark remembers it). - To rotate: change
ADMIN_ACCESS_KEYin Vercel → redeploy. Old links stop working immediately.
- Paste the LinkedIn URL first → the form auto-derives Author Name and
Initials from the profile slug (e.g.
/in/john-smith-abc123/→ "John Smith", "JS"). Both fields stay editable. - Initials auto-update as you type the name, until you manually edit them (then they stop auto-updating).
- Excerpt has a 280-char recommended counter (400 hard max) and a "Paste & clean from clipboard" button that strips emoji, hashtags, line breaks, and smart quotes, then trims to 280 chars.
On https://www.cleanstart.com/community, drop an Embed block in place of
the existing "Community Discussions" cards and paste the contents of
webflow-embed-discussions.html. It already points at
https://community-api.cleanstart.com.
cp .env.example .env.local # fill in the three values
npm i -g vercel # once
vercel dev # serves on http://localhost:3000Open http://localhost:3000/admin?key=<ADMIN_ACCESS_KEY> to test locally.
- Create the Webflow CMS collection (one-time, ~3 min).
- Generate a Webflow API token and fetch the Collection ID.
- Generate
ADMIN_ACCESS_KEYwithopenssl rand -hex 24. - Add the three env vars in Vercel and redeploy.
- Bookmark
https://community-api.cleanstart.com/admin?key=<KEY>. - Paste
webflow-embed-discussions.htmlon the Webflow community page and publish.