markdown.link is now a real app scaffold built with Next.js, Prisma, Stripe,
and Resend.
- minimal homepage with rendered/raw markdown toggle
- email-code auth flow
- anonymous publish + claim flow
- direct markdown publish flow and manifest upload/finalize flow
- CLI publish command and installer scripts
- dashboard routes for sites, api keys, plan, domains, handle, and support
- public markdown viewer routes
- password-protected publish flow
- storage adapter with local
.data/dev mode and S3-compatible production mode - cleanup script for expired anonymous publishes
- live plan usage metering with free-tier enforcement
- Resend delivery webhook route
- Stripe Checkout + Customer Portal route handlers
- Stripe webhook route
- Prisma schema for users, sessions, api keys, sites, versions, claims, billing, and support
- Install dependencies:
npm install- Copy envs:
cp .env.example .env- Create the local database:
npx prisma db push- Start the app:
npm run devThis repo now includes a Paperclip-friendly company package rooted at COMPANY.md.
Paperclip package contents:
- company root in COMPANY.md
- teams under /Users/jackzerby/Sites/markdown-link/teams
- agents under /Users/jackzerby/Sites/markdown-link/agents
- starter tasks under /Users/jackzerby/Sites/markdown-link/projects/markdown-link/tasks
- reusable skills under /Users/jackzerby/Sites/markdown-link/skills
Quickstart from Paperclip's docs:
npx paperclipai onboard --yes
npx paperclipai runTo import this repo as a company package into Paperclip:
pnpm paperclipai company import \
--from /Users/jackzerby/Sites/markdown-link \
--target new \
--new-company-name "markdown.link" \
--include company,agents,projectsPaperclip uses an embedded PostgreSQL instance by default and runs locally at
http://localhost:3100 in dev mode.
Publish a markdown file directly:
./scripts/publish.sh README.md --title "README" --description "project notes" --base-url http://localhost:3000Or install the command into ~/.local/bin:
./scripts/install.shThen run:
markdown.link README.mdYou can also pipe content in:
cat README.md | markdown.link -The public URL that the CLI prints comes from the service response, so make
sure APP_URL matches the host where the app is actually reachable.
When you pass a file path, the CLI uses the manifest create -> upload -> finalize flow. When you pipe markdown through stdin, it uses the direct markdown publish path.
API keys can be supplied with --api-key, MARKDOWN_LINK_API_KEY, or a
~/.markdown-link/credentials file containing the key.
Credential lookup order:
--api-keyMARKDOWN_LINK_API_KEY~/.markdown-link/credentials
The credentials file should contain the raw API key on a single line.
The service now supports two publish modes:
- simple markdown body posts to
/api/publishes - manifest-based create/upload/finalize flow via
/api/publishes,/api/publishes/[slug]/files, and/api/publishes/[slug]/finalize
DATABASE_URLSESSION_SECRETAPI_KEY_PEPPERSTORAGE_BACKENDSTORAGE_LOCAL_ROOTSTORAGE_S3_BUCKETSTORAGE_S3_REGIONSTORAGE_S3_ENDPOINTSTORAGE_S3_ACCESS_KEY_IDSTORAGE_S3_SECRET_ACCESS_KEYSTORAGE_S3_PREFIXRESEND_API_KEYRESEND_FROM_EMAILRESEND_WEBHOOK_SECRETSTRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRETSTRIPE_PRICE_HOBBY_MONTHLY
- free publishes expire after
FREE_PUBLISH_TTL_SECONDS - anonymous publishes can be claimed after email verification
- hobby users get permanent publishes
- Stripe webhooks are the source of truth for billing state
- move upload traffic from server relay to presigned direct-to-blob uploads
- add richer site management actions like duplicate/delete/password audit history
- add background jobs for cleanup, billing retries, and domain revalidation