How rekib0023/collab-doc works
Project type and purpose
• This is a full-stack, real-time collaboration platform with a microservices architecture.
• Frontend: React + TypeScript client using WebSockets for live updates.
• Backend: FastAPI services exposing REST + WebSocket endpoints, backed by PostgreSQL, Redis, and Kafka for persistence, caching, and event streaming.
File structure
• Top-level
• docker-compose.yml orchestrates frontend, backend, Redis, Kafka, PostgreSQL, etc.
• README.md & docs/project-overview.md describe features and architecture.
• backend/
• main.py – FastAPI app entry point, config via app/core/config.py.
• app/api/api_v1/endpoints – REST (auth, documents, users, workspaces) & WebSocket endpoints.
• app/crud, app/models, app/schemas – ORM models, Pydantic schemas, CRUD operations.
• Alembic migrations for DB schema management.
• Dockerfile, start.sh, requirements.txt for containerized deployment.
• frontend/
• Vite‐powered React app (ts / tsx) with TailwindCSS and custom UI under src/components/ui.
• RTK Query in src/store for API calls; WebSocketService in src/services for real-time.
• Pages (AuthPage, DocumentPage, WorkspacePage, etc.) wire up components.
• nginx.conf for serving static assets, Dockerfile for container build.
Inspect README for architectural insights
• Microservices pattern: clear separation between frontend, backend, and external systems (DB, cache, message bus).
• Real-time collaboration via custom operational transformation (OT) engine and pub/sub (Redis & Kafka).
• High availability & scalability: horizontal scaling of backend, Docker orchestration, CDN for static assets.
Don’t overthink—capture every logical component
• Even if OT engine lives inside the backend, represent it as a sub-module.
• Migration tool (Alembic), CI/CD pipeline if relevant (can be a sidebar).
• Docker-Compose orchestrator or Kubernetes cluster as the outer boundary.