Scope
Surnex now ships a dedicated, SEO/LLM-first marketing site:- Repository:
apps/marketing - Public URL:
https://surnex.io - Runtime: Vercel
- API/runtime boundary: Marketing content is static/frontend only; API + Worker stay on Railway
Architecture
- Framework: Astro (with React islands for interactive components)
- Deployment: Vercel static hosting
- Content: Markdown content collections from
apps/marketing/src/content/blog - Distribution: Public routes for homepage, info pages, blog index, and blog details
- SEO artifacts:
sitemap.xmlrobots.txtrss.xmlllms.txt
Repository paths
- App:
apps/marketing - Pages:
apps/marketing/src/pages - Blog routes:
apps/marketing/src/pages/blog/* - Blog collection:
apps/marketing/src/content/blog/*.md - Vercel configs:
apps/marketing/vercel.json(app-root deploy mode)vercel.json(repo-root fallback/wrapper mode)
Content publishing flow
- A content platform sends
POST /v1/webhooks/marketing/blogto API. - API validates request, validates signature, and writes markdown to:
apps/marketing/src/content/blog/<slug>.md- branch:
marketing
- Vercel build/rebuild runs and publishes updated pages.
event_id(idempotency)slugtitle,description,excerptauthor,tags,statuspublished_at,updated_athero_image_urlcontent_markdown
Idempotency behavior
- Retries with the same
event_idshould be safe. - Same
event_id + contentis expected to be idempotent for publish operations.
Required environment in API
Set these for webhook handling:MARKETING_WEBHOOK_SECRETMARKETING_GITHUB_TOKENMARKETING_GITHUB_OWNERMARKETING_GITHUB_REPOMARKETING_BRANCH=marketing(default)MARKETING_PATH=apps/marketing/src/content/blog(default)
Vercel deployment settings
Use one of these configurations depending on project import mode:- App-root preferred (stable):
- Project root:
apps/marketing - Framework preset:
Astro - Build command:
pnpm --filter @surnex/marketing build - Output directory:
apps/marketing/dist
- Project root:
- Repo-root fallback:
- Project root: repo root
- Framework preset:
Astro - Build command:
pnpm --filter @surnex/marketing build - Output directory:
dist(rootvercel.jsonstages build artifacts fromapps/marketing/dist)
Local development
Verification checklist before publish
- Open
https://surnex.ioand confirm landing and core pages. - Open
https://surnex.io/blogand confirm latest published posts render. - Open
https://surnex.io/blog/<slug>for a recently updated post. - Verify SEO artifacts:
https://surnex.io/sitemap.xmlhttps://surnex.io/robots.txthttps://surnex.io/rss.xmlhttps://surnex.io/llms.txt
- Exercise webhook in staging with sample payload from API contract tests and confirm successful artifact update.
Links
README.md(marketing deployment section)docs/quickstart.md(marketing pipeline section)AGENTS.md(repo policy + documentation updates requirement)- OpenAPI:
https://api.surnex.io/.well-known/openapi.json