Codown is a real-time collaborative Markdown editor inspired by HackMD and Notion.
It’s a personal project to explore real-time synchronization using WebSockets and rich-text editing in the browser.
- Real-time collaborative editing (Yjs + Hocuspocus)
- Markdown syntax highlighting and preview
- React-based frontend with clean architecture
- PostgreSQL + Prisma for structured persistence
| Layer | Technology |
|---|---|
| Frontend | React + Vite |
| Editor | CodeMirror + React Markdown |
| Backend | Express |
| Database | PostgreSQL + Prisma |
| Realtime | Yjs + Hocuspocus |
| Package Manager | pnpm |
Full stack with hot reload: Postgres + API (esbuild watch + nodemon) + Vite HMR, kept in sync by compose watch — source edits sync into the containers live.
# first run (builds images)
pnpm docker:dev
# later runs (skip --build)
docker compose -f docker-compose.dev.yml up --watch
# stop
pnpm docker:down- Client → http://localhost:5173
- API → http://localhost:5000 (
/health,/api/docs) - Prisma Studio (opt-in):
docker compose -f docker-compose.dev.yml --profile tools up studio→ http://localhost:5555
Dependency/lockfile/config changes trigger an automatic rebuild+restart via watch. After editing server/prisma/schema.prisma, run:
docker compose -f docker-compose.dev.yml exec server pnpm exec prisma migrate devPostgres in Docker, app on the host:
docker compose -f docker-compose.dev.yml up -d db # DB only
cp server/.env.example server/.env # point DATABASE_URL creds at root .env values
cp client/.env.example client/.env
pnpm install
pnpm dev # client + server (esbuild watch + nodemon) in paralleldocker compose up --build # requires POSTGRES_PASSWORD + JWT secrets (see .env.example)Env vars: per-package .env.example files for local dev; root .env.example feeds docker-compose.
Polish The UI(Done \(^▽^)/)Document Sharing with User authorizationヽ(*≧ω≦)ノ- Export documents to PDF
- Version history and timeline
- Testing and Improving CI setup
Maybe Deploymentd=(´▽`)=b
To be added cuz im lazy (* ^ ω ^)