Note Keeper is a shared note-taking app for writing and editing notes together in real time. Invite another registered user to a note, work in the same document, and let Automerge reconcile concurrent changes across connected browsers.
| Service | URL |
|---|---|
| Web app | tappz-gamma.vercel.app |
| HTTP API | tappz-api |
| WebSocket sync server | wss://tappz-ws-fl3vm4p4lq-uc.a.run.app |
| Architecture documentation | Eraser workspace |
Hosted endpoints are listed for convenience and may not always be available.
- Invite by username. Note owners can add registered users from the note itself.
- Edit together. Invited contributors can open and update the same shared document.
- Merge concurrent changes. Automerge synchronizes document updates without relying on last-write-wins behavior.
- Keep access scoped to collaborators. The sync server checks that each sender owns or contributes to the requested note.
- See who has access. Contributor avatars identify the note owner and invited collaborators.
- Continue from the browser. IndexedDB stores local Automerge data, while the WebSocket service synchronizes it with other clients.
flowchart LR
A["Next.js client<br/>ProseMirror + Automerge"]
B["Cloud Functions<br/>users, notes, invitations"]
C["Cloud Run WebSocket server<br/>real-time document sync"]
D["Firestore<br/>notes and Automerge data"]
E["Redis<br/>collaboration and access cache"]
A -->|"HTTP"| B
A <-->|"Automerge changes over WebSocket"| C
B <--> D
B <--> E
C <--> D
C <--> E
- A note owner creates a note and receives an Automerge document ID.
- The owner invites registered users by username through the HTTP API.
- Each collaborator opens the same note and connects to the WebSocket sync server.
- Automerge and ProseMirror reconcile edits, while the server validates document access before relaying changes.
- Firestore persists application and document data; Redis caches collaboration and note-access information.
The repository contains two applications:
web/— a Next.js client with a ProseMirror editor, Automerge React hooks, WebSocket and broadcast-channel networking, and IndexedDB persistence.backend/— an Express API deployed through Google Cloud Functions plus an Automerge WebSocket sync service deployed on Cloud Run. Firestore provides persistence and Redis supports caching and access checks.
| Area | Technologies |
|---|---|
| Frontend | Next.js 14, React 18, TypeScript, Tailwind CSS, Radix UI |
| Collaborative editor | ProseMirror, Automerge Repo, WebSockets, IndexedDB |
| API | Express, Firebase Functions, Zod |
| Persistence | Google Cloud Firestore |
| Cache and access data | Redis / Google Cloud Memorystore |
| Infrastructure | Google Cloud Run, Cloud Functions, Cloud Build, Firebase |
- Node.js 18 or newer
- pnpm for the web app
- Yarn for the backend
- A running Redis instance
- Google Application Default Credentials with access to a Firestore project
- An OpenAI API key for the backend formatting endpoint
Create backend/.env:
NODE_ENV=development
REDIS_URL=redis://localhost:6379
OPENAI_API_KEY=your_openai_api_key
GOOGLE_APPLICATION_CREDENTIALS=/absolute/path/to/service-account.jsonInstall dependencies:
cd backend
yarn installStart the HTTP API on port 8181:
yarn watch:functionsIn another terminal, start the WebSocket sync server on port 3030:
cd backend
yarn watch:wsCreate web/.env.local:
NEXT_PUBLIC_BACKEND_BASE_URL=http://localhost:8181
NEXT_PUBLIC_WS_URL=ws://localhost:3030Install dependencies and start Next.js:
cd web
pnpm install
pnpm devOpen http://localhost:3000.
The backend deployment expects Google Cloud resources for Firestore, Cloud Run, Cloud Functions, Secret Manager, Memorystore for Redis, and a Serverless VPC Access connector. Review the substitutions in backend/cloudbuild.yaml before deploying.
From backend/, deploy the Firestore indexes and submit the Cloud Build configuration with:
chmod +x ./bin/deploy.sh
./bin/deploy.shThe deployment script requires authenticated firebase and gcloud CLIs. Store OPENAI_API_KEY in Secret Manager for the production API.
.
├── backend/ # HTTP API, collaboration access control, sync server, and cloud deployment
├── web/ # Next.js application and collaborative editor
└── README.md # Project overview and setup guide
This repository does not currently include a project-wide root license. Review backend/LICENSE before reusing backend code.