How soaer01/popdoc works
PopDoc is a collaborative writing app where members edit private drafts and changes reach the shared document through reviewed pull requests. The workflow spans authentication, drafting with paragraph provenance, save-point history, review and conflict resolution, then contribution-ledger and process-record inspection. The frontend uses Redux-backed features and a selectable API transport; the Express backend exposes corresponding resource routes and shared state/helpers. The README documents AI-assisted change review and real-time presence. Some frontend and backend modules were not excerpted, so their relationships are included only where the README or source index supports them.
Main entry points: App.jsx App routing · app.js HTTP application · index.js API transport · store.js Runtime store
Components 25
Writing client
- App routing
src/App.jsx - Authentication
src/features/auth/authSlice.js - API transport
src/api/index.js - Private drafting
src/features/branches/Draft.jsx - Provenance editor
src/features/editor/Editor.jsx - Live presence
src/features/branches/usePresence.js
Review and record
- Commit history
src/features/history/History.jsx - Diff engine
src/lib/diff.js - Pull requests
src/features/pulls/pullsSlice.js - Pull review
src/features/pulls/PullRequest.jsx - AI change review
src/features/ai/AiReview.jsx - Contribution ledger
src/features/ledger/Ledger.jsx - Process record
src/features/record/Record.jsx
Backend API
- HTTP application
backend/src/app.js - Auth routes
backend/src/routes/auth.js - Branch routes
backend/src/routes/branches.js - History routes
backend/src/routes/history.js - Pull routes
backend/src/routes/pulls.js - AI job routes
backend/src/routes/ai.js - Ledger routes
backend/src/routes/ledger.js
Domain services
- Runtime store
backend/src/utils/store.js - Merge logic
backend/src/utils/merge.js - Commit hashing
backend/src/utils/hash.js - LLM integration
backend/src/utils/llm.js
Other components
- Collaborator
Connections 39
- Collaborator → App routing: uses
README.md - App routing → Authentication: routes to
src/App.jsx - App routing → Private drafting: routes to
src/App.jsx - App routing → Commit history: routes to
src/App.jsx - App routing → Pull requests: routes to
src/App.jsx - App routing → Contribution ledger: routes to
src/App.jsx - App routing → Process record: routes to
src/App.jsx - Authentication → API transport: calls
src/features/auth/authSlice.js - Private drafting → Provenance editor: uses
- Private drafting → Live presence: uses
- Commit history → Diff engine: uses
src/features/history/History.jsx - Pull review → Diff engine: uses
src/features/pulls/PullRequest.jsx - Pull review → AI change review: renders
src/features/pulls/PullRequest.jsx - AI change review → Pull requests: dispatches
src/features/ai/AiReview.jsx - Pull requests → API transport: calls
src/features/pulls/pullsSlice.js - Commit history → API transport: calls
src/features/history/History.jsx - Contribution ledger → API transport: calls
src/features/ledger/Ledger.jsx - Process record → API transport: calls
src/features/record/Record.jsx - Live presence → Collaborator: signals presence
README.md - API transport → HTTP application: sends API requests
README.md - HTTP application → Auth routes: mounts
backend/src/app.js - HTTP application → Branch routes: mounts
backend/src/app.js - HTTP application → History routes: mounts
backend/src/app.js - HTTP application → Pull routes: mounts
backend/src/app.js - HTTP application → AI job routes: mounts
backend/src/app.js - HTTP application → Ledger routes: mounts
backend/src/app.js - Auth routes → Runtime store: reads
backend/src/routes/auth.js - Branch routes → Runtime store: reads and writes
backend/src/routes/branches.js - Branch routes → Merge logic: calls
backend/src/routes/branches.js - Branch routes → Commit hashing: calls
backend/src/routes/branches.js - History routes → Runtime store: reads
backend/src/routes/history.js - History routes → Commit hashing: calls
backend/src/routes/history.js - Pull routes → Runtime store: reads and writes
backend/src/routes/pulls.js - Pull routes → Merge logic: calls
backend/src/routes/pulls.js - Pull routes → Commit hashing: calls
backend/src/routes/pulls.js - AI job routes → Runtime store: reads and writes
backend/src/routes/ai.js - AI job routes → LLM integration: calls
backend/src/routes/ai.js - AI job routes → Commit hashing: calls
backend/src/routes/ai.js - Ledger routes → Runtime store: reads