Pager is a web app that wraps Pagem. Users can send pages via Pagem, without needing to pay for additional seats/API access.
It also exposes an MCP server for AI assistants.
| Pager | History | Admin | MCP API Settings |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
To get the values required to send a page, log in to Pagem and invite a second user with another email you control. Use another device (Android or iOS) to onboard that account. Then, from the web dashboard while logged in as the second user, open Developer Tools (Ctrl+Shift+I) and go to the Network tab. Send a page and look for the request to https://www.pagem.com/secure/pagees/sendPage. The request payload will contain the values you need (pageeDirectoryEntryId and groupPageType).
- Copy
.env.exampleto.env.local. - Fill in the required environment variables.
- Install dependencies with
pnpm install. - Start the app with
pnpm dev.
The app runs Next.js locally and connects to Convex for backend functions.
For local development, the root .env.local should contain:
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
NEXT_PUBLIC_CONVEX_SITE_URL=https://your-project.convex.site
AUTH_JWT_ISSUER=https://your-project.convex.site
AUTH_JWT_AUDIENCE=pageme-web
AUTH_JWT_KID=pageme-rs256-1 # this should match the kid in the public JWK
AUTH_JWT_PUBLIC_JWK_JSON={"kty":"RSA","n":"...","e":"AQAB","alg":"RS256","kid":"pageme-rs256-1","use":"sig"}
AUTH_JWT_PRIVATE_KEY_PEM="-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----"
PAGEM_USERNAME=
PAGEM_PASSWORD=
PAGEM_BASE_URL=
PAGEM_GROUP_PAGE_TYPE=
PAGEM_PAGE_DIRECTORY_ENTRY_ID=Notes:
NEXT_PUBLIC_CONVEX_URLandNEXT_PUBLIC_CONVEX_SITE_URLare the Convex URLs given to you by ConvexAUTH_JWT_ISSUERshould be the same asNEXT_PUBLIC_CONVEX_SITE_URL.AUTH_JWT_AUDIENCEmust matchconvex/auth.config.ts. The app currently expectspageme-web.AUTH_JWT_PUBLIC_JWK_JSONmust be the public JWK matching the private key used by Convex to sign JWTs.- For local development, keep
AUTH_JWT_PRIVATE_KEY_PEMin.env.localtoo
Set these values in the Vercel project:
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
NEXT_PUBLIC_CONVEX_SITE_URL=https://your-project.convex.site
AUTH_JWT_ISSUER=https://your-project.convex.site
AUTH_JWT_AUDIENCE=pageme-web
AUTH_JWT_KID=pageme-rs256-1 # this should match the kid in the public JWK
AUTH_JWT_PUBLIC_JWK_JSON={"kty":"RSA","n":"...","e":"AQAB","alg":"RS256","kid":"pageme-rs256-1","use":"sig"}These variables must be configured on the Convex deployment:
AUTH_JWT_ISSUER=https://your-project.convex.site
AUTH_JWT_AUDIENCE=pageme-web
AUTH_JWT_KID=pageme-rs256-1 # this should match the kid in the public JWK
AUTH_JWT_PUBLIC_JWK_JSON={"kty":"RSA","n":"...","e":"AQAB","alg":"RS256","kid":"pageme-rs256-1","use":"sig"}
AUTH_JWT_PRIVATE_KEY_PEM="-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----"
PAGEM_USERNAME=
PAGEM_PASSWORD=
PAGEM_BASE_URL=
PAGEM_GROUP_PAGE_TYPE=
PAGEM_PAGE_DIRECTORY_ENTRY_ID=Notes:
AUTH_JWT_PUBLIC_JWK_JSONmust match that private key exactly.AUTH_JWT_KIDshould be a stable identifier for the active signing key (don't change it)
This app uses Convex custom JWT auth with RS256.
issmust equalAUTH_JWT_ISSUER.audmust equalAUTH_JWT_AUDIENCE.- The JWT header must include
alg,kid, andtyp. - The JWT payload must include
sub,iss,iat, andexp. - Convex verifies the JWT against
https://your-project.convex.site/.well-known/jwks.json.
Generate a RSA private key and public JWK with:
pnpm auth:generate-jwt-keysOn the Convex dashboard, under the environment dropdown, click on "Production" and follow the instructions to create a new production deployment.
Set the Next.js variables in Vercel project settings.
In the Convex dashboard, under Settings > Environment Variables, set the following variables (get the values from the output of of pnpm auth:generate-jwt-keys):
AUTH_JWT_AUDIENCE=pageme-web
AUTH_JWT_KID=pageme-rs256-1 # this should match the kid in the public JWK
AUTH_JWT_PUBLIC_JWK_JSON={"kty":"RSA","n":"...","e":"AQAB","alg":"RS256","kid":"pageme-rs256-1","use":"sig"}
AUTH_JWT_PRIVATE_KEY_PEM="-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----"
PAGEM_GROUP_PAGE_TYPE="get this from pagem"
PAGEM_PAGE_DIRECTORY_ENTRY_ID="get this from pagem"
PAGEM_USERNAME="your credentials"
PAGEM_PASSWORD="your credentials"Deploy backend functions:
npx convex deployAfter Convex is deployed and its env vars are set, deploy the frontend on Vercel.
Make sure to the Vercel project has the required environment variables.
pnpm install
pnpm auth:generate-jwt-keys
pnpm dev
pnpm lint
pnpm npm exec tsc --noEmit
npx convex env list
npx convex deployoy


