How youngchingjui/issue-to-pr works
Main System Components
a) Frontend Layer:
• Next.js App Router (app/ directory structure)
• Client Components (components/ directory)
• UI Components (components/ui/)
b) API Layer:
• Authentication endpoints (app/api/auth)
• Issue management endpoints (app/api/issue)
• Repository testing endpoints (app/api/test)
c) Service Layer (lib/):
• GitHub Integration (lib/github.ts)
• Git Operations (lib/git.ts)
• File System Operations (lib/fs.ts)
• Action Handlers (lib/actions.ts)
Component Relationships
[Client Layer]
• Pages (app/*)
• Home (page.tsx)
• Repository View ([username]/[repo])
• Playground
• Components
• UI Components
• Feature Components
[API Layer]
• Authentication
• Issue Management
• Repository Testing
[Service Layer]
• GitHub API Integration
• Git Operations
• File System Operations
Flow Indicators
Interactions:
• Authentication flow with NextAuth
• API request/response paths
• GitHub API interactions
• File system operations
Key Architectural Patterns to Highlight
• Next.js App Router architecture
• API Routes structure
• Server Components vs Client Components
• Authentication middleware flow
Technical Stack Elements
• Next.js 13+ (App Router)
• NextAuth for authentication
• TailwindCSS for styling
• GitHub API integration
• File system interactions