Blogs
Rich-text posts with TipTap and public API.
Blogs are rich-text posts inside a project. Content is stored as TipTap JSON and can be exported as MDX for SEO and server-side rendering.
Data model
Stored in Convex table blogs. Key fields:
- projectId, userId — Project and owner.
- title, slug — Title and URL-friendly slug (unique per project).
- content — TipTap JSON.
- contentMdx — Optional markdown/MDX for SEO/SSR.
- status —
draftorpublished. - thumbnail, author, tags, excerpt — Optional metadata.
- metaTitle, metaDescription, ogImage, canonicalUrl, keywords, robots — SEO fields.
Convex API (convex/blogs.ts)
- listBlogs — All blogs for a project (owner only).
- getBlog — Single blog by ID (ownership checked).
- getBlogBySlug — By project + slug.
- createBlog, updateBlog, deleteBlog — CRUD with slug uniqueness and ownership.
- getBlogByApiKey — Fetch blog by ID when called with a valid project-scoped API key (for public/API access).
Public API
GET /api/v1/blogs?blogId=<blog-id> — Returns blog data when X-API-Key or Authorization: Bearer <key> is a valid API key for the blog's project. Used by external apps and templates.
App usage
Under Blog → select project → Blog you create and edit posts with the TipTap editor, set slug, status, and SEO fields.