← Projects

Glyph

Edit and publish Markdown & mathematical notes.

Next.js / TypeScript / Clerk / Convex
Glyph

Markdown, maths
and a link to share.

Write a private draft Edit & preview Publish at your own URL

Unpublish to withdraw public access.

Editing & preview

Create a note in the BlockNote editor or import a Markdown or LaTeX file. Notes support headings, lists, code and mathematical notation, with a preview of the rendered document before publishing.

The reader includes heading navigation, code copying and print styles. LaTeX imports convert supported text and equations into Markdown; unsupported commands remain as source with a conversion notice.

Implementation

Next.js renders notes using remark, rehype and KaTeX. Clerk handles sign-in, and Convex stores note metadata and source files. Private drafts are retrieved for the signed-in owner.

const ownerId = await requireOwner(ctx);
const noteId = ctx.db.normalizeId('notes', id);
const note = noteId ? await ctx.db.get('notes', noteId) : null;
return note?.ownerId === ownerId ? note : null;
Read the ownership check ↗

Publishing

Choose a custom URL when publishing a note. Published notes must be unpublished before editing, so saving a draft does not change the live document. Unpublishing also removes public access to the note.

The test suite covers note access, file uploads, rendering and publication, including unpublishing and deleting notes.

View tests ↗
Next project Markup