How yorkie-team/codepair works
Main System Components
The system architecture should be divided into these primary components:
a. Frontend Layer (React Application)
• User Interface Components
• State Management (Redux)
• Real-time Collaboration Client
• Authentication Flow
• Document Editor
• AI Intelligence Interface
b. Backend Layer (NestJS Application)
• API Gateway
• Authentication Service
• Document Management
• Workspace Management
• AI Intelligence Service
• File Storage Service
• User Management
c. External Services & Dependencies
• GitHub OAuth
• MongoDB Database
• Yorkie Real-time Backend
• LangChain Integration
• File Storage System
Key Relationships to Highlight
Critical interactions:
[Frontend Client] ←→ [API Gateway]
• ←→ [Yorkie Real-time]
[API Gateway] ←→ [Auth Service] ←→ [GitHub OAuth]
• ←→ [Document Service] ←→ [MongoDB]
• ←→ [Workspace Service] ←→ [MongoDB]
• ←→ [Intelligence Service] ←→ [LangChain]
Detailed Component Breakdown
Frontend Components:
• Main modules: Editor, Workspace, Authentication, Settings
• Real-time collaboration integration
• State management flow
Backend Services:
• Auth Module: JWT, GitHub strategy
• Document Module: CRUD operations
• Workspace Module: User management, sharing
• Intelligence Module: AI features
• File Module: Storage operations
Technical Stack Callouts
• Frontend: React, Redux, TypeScript
• Backend: NestJS, Prisma
• Database: MongoDB
• Real-time: Yorkie
• AI: LangChain
• Authentication: JWT, GitHub OAuth