Resources & downloads
Resources are downloadable files listed on /resources. Downloads go through /api/dl/[id], which enforces access rules before redirecting to the file URL.
Admin path
/admin/resources → New resource → /admin/resources/new
Fields
| Field | Purpose |
|---|---|
| Title | Display name |
| Slug | URL key (listing only — downloads use ID) |
| Description | Card text and default teaser |
| Visibility / Teaser | See Access & gating |
| File URL | Direct link to the asset (HTTPS) — required |
| Thumbnail URL | Optional preview image |
| Type | Template, Framework, Assessment, Guide, Playbook, Prompt pack, Report |
| Category | Pillar category (optional) |
| Tags | Comma-separated labels |
| Published | Live on public site |
Resource types
| Type | Typical use |
|---|---|
TEMPLATE |
Fill-in templates |
FRAMEWORK |
Framework PDFs or worksheets |
ASSESSMENT |
Assessment worksheets |
GUIDE |
How-to guides |
PLAYBOOK |
Process playbooks |
PROMPT_PACK |
AI prompt collections |
REPORT |
Reports and whitepapers |
File hosting
The CMS stores a URL, not the file itself. Upload assets to your storage provider (e.g. Cloudflare R2, S3) and paste the public HTTPS URL into File URL.
Requirements:
- URL must be reachable over HTTPS
- Use stable URLs — changing the file URL requires a CMS edit
- For gated resources, the file URL should not be guessable if security matters (access is still enforced at
/api/dl/[id])
Download flow
- User clicks Download on
/resources - Browser hits
/api/dl/[resource-id] - Server checks published status and visibility
- If allowed → redirect to
fileUrland increment download count - If blocked → redirect to signup, login, or
/pricing
Download counts appear in admin analytics.
Step-by-step: publish a resource
- Upload file to storage; copy the public URL
/admin/resources/new- Title, description, file URL, type
- Assign Category for pillar filtering on
/resources - Set Visibility (Public / Free member / Premium)
- Check Published
- Save → find the resource on
/resources→ test download in a private window
Learning path items
Resources can be included in learning paths. Use content type RESOURCE and paste the resource ID from /admin/resources/[id].
Common mistakes
- Missing or broken File URL — download redirects to a 404
- Forgetting Published — resource hidden from listing
- Premium resource without Stripe configured — users hit pricing gate with no upgrade path
- Using slug in download links — downloads always use the database ID via
/api/dl/[id]