How ditinagrawal/opensource-contributions works
Main System Components
a) Client Layer
• Next.js Frontend (Browser)
• UI Components
• Theme System
b) Server Layer
• Next.js Server Runtime
• Server-Side Rendering Logic
• API Routes
c) External Services
• GitHub API
• Vercel Platform (deployment)
Detailed Component Breakdown
Frontend Components:
• PRCard
• GithubPR
• PaginationControls
• ModeSwitcher
• LoadingSkeleton
• To a "UI Library" container showing:
• Shadcn UI Components (avatar, badge, button, card, dialog, etc.)
Server Components:
• Server-Side Rendering
• API Route Handlers
• Cache Management
Data Flow:
• GitHub API Integration
• Client-Server Communication
• State Management
Architectural Patterns to Highlight
Key architectural aspects:
a) Next.js App Router Architecture:
• app/ directory structure
• layout.jsx as the root template
• page.jsx as the main entry point
b) Component Architecture:
• Reusable UI components
• Theme provider system
• Server/Client components separation
Key Relationships
• Client → Server: SSR requests
• Server → GitHub API: Pull request data fetching
• Theme Provider → Components: Theme context flow
• Components → UI Library: Component inheritance
Additional Elements
Supporting details:
• Caching layer between GitHub API and server
• Authentication flow with GitHub token
• Light/Dark mode state management
• Pagination data flow
Technical Stack Callouts
Technologies:
• Next.js
• Tailwind CSS
• GitHub API
• Shadcn UI
• Server-Side Rendering