A portfolio-focused realtime notes app built with:
- Next.js (App Router) + TypeScript
- Convex (backend + realtime)
- Clerk (hosted authentication) wired to Convex via
ConvexProviderWithClerk - Tailwind CSS v4
src/- frontend routes and UI.convex/- schema and backend functions.docs/- product, architecture, and runbook documentation.
- Migrated authentication from Better Auth to Clerk (fresh-start, no user
migration). Sign-up and sign-in now use Clerk-hosted routes at
/sign-upand/sign-into fix intermittent signup failures. - Note lifecycle: archive, unarchive, and delete notes.
- Comment threads with resolve/reopen state.
@emailmention parsing in comments with backend notifications.- Notifications inbox in the nav (read/unread, mark all read, deep links to notes and comments).
- Note revision history with restore flow.
- Workspace note search and template-based note creation.
- Workspace Templates tab: create, edit, and delete workspace-scoped templates.
- Shareable invite links (
/join/[token]) with optionalredirect_urlon sign-in/sign-up; seedocs/RUNBOOK/INVITES.md. - Transfer workspace ownership to an existing editor (former owner becomes editor).
- Markdown preview in the note editor (Write / Preview).
- Hardened admin reset guardrails (
ADMIN_EMAILSallowlist + whiteboard reset coverage).
- Case study: docs/PRODUCT/CASE_STUDY.md
- Architecture diagram: docs/ARCH/ARCHITECTURE_DIAGRAM.md
- Demo checklist: docs/PRODUCT/DEMO.md
- Production URL: https://pulse-notes.vercel.app/
- Product
docs/PRODUCT/PRD.mddocs/PRODUCT/ROADMAP.mddocs/PRODUCT/IMPLEMENTATION_STATUS.mddocs/PRODUCT/CASE_STUDY.mddocs/PRODUCT/DEMO.md
- Architecture
docs/ARCH/ARCHITECTURE.mddocs/ARCH/ARCHITECTURE_DIAGRAM.mddocs/ARCH/DATA_MODEL.mddocs/ARCH/API_EVENTS.mddocs/ARCH/DECISIONS.md
- Runbooks
docs/RUNBOOK/LOCAL_DEV.mddocs/RUNBOOK/INVITES.mddocs/RUNBOOK/TROUBLESHOOTING.mddocs/RUNBOOK/COLLABORATION_TEST_PLAN.md
- Install dependencies:
npm install-
Configure Clerk:
- Create a Clerk application at dashboard.clerk.com.
- Activate the Convex integration at
https://dashboard.clerk.com/apps/setup/convex(this creates a JWT template namedconvexand returns a Frontend API URL). - Copy the publishable key, secret key, and Frontend API URL.
-
Set Next.js env in
.env.local(dev) or your host (production):
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CONVEX_URL=https://<your-convex-deployment>.convex.cloud
# Optional but recommended in production: canonical site URL for copied invite links
# NEXT_PUBLIC_APP_URL=https://your-deployment.example- Set Convex env so it validates Clerk JWTs:
npx convex env set CLERK_JWT_ISSUER_DOMAIN "https://<your-clerk-frontend-api>"- Run Convex:
npx convex dev- Run Next.js in another terminal:
npm run dev- Open
http://localhost:3000and click "Create account" or "Sign in".
- Create a separate Clerk production instance; its publishable key, secret key, and Frontend API URL differ from development.
- Set the production
CLERK_JWT_ISSUER_DOMAINon the production Convex deployment (npx convex env set --prod ...) and the production Clerk keys on the host. - Existing Better Auth users are intentionally not migrated; users will need to sign up again in Clerk.
- Unit/integration tests:
npm run testnpm run test:coverage
- E2E smoke tests (Playwright):
- Install browser once:
npx playwright install chromium - Run:
npm run test:e2e
- Install browser once:
Optional authenticated smoke paths:
- Set
PLAYWRIGHT_SMOKE_WORKSPACE_PATH(example:/workspace/<id>) - Set
PLAYWRIGHT_SMOKE_NOTE_PATH(example:/note/<id>)
These two tests are skipped when env vars are not set.