How dexctor/gitstats works
Main System Components
a) Client Layer:
• Next.js Frontend (App Router)
• React Components
• Client-side State Management (React Query indicated by QueryProvider)
b) Server Layer:
• Next.js API Routes
• Authentication System (NextAuth.js)
• GitHub API Integration
c) External Services:
• GitHub API
• Authentication Providers
Detailed Component Breakdown
a) Frontend Architecture:
• Pages (represented in the src/app directory)
• Components (organized by feature)
• UI Components (shadcn/ui components)
• Hooks and Utilities
b) Backend Architecture:
• API Routes
• Authentication Flow
• GitHub API Integration
• Middleware
Data Flow Representation
• Client-Server Communication
• API Calls to GitHub
• Authentication Flow
• State Management Flow
Specific Implementation Details
[Client Layer]
• Pages (src/app/*)
• Home (/)
• Profile (/profile)
• User Profile (/[username])
• About (/about)
• Components
• Analytics Components
• GitHubStats
• ImpactMetrics
• TechAnalysis
• UI Components
• Button
• Card
• Other UI Elements
• Feature Components
• UserSearch
• UserProfile
• TechStack
[Server Layer]
• API Routes
• Authentication (/api/auth/*)
• GitHub Data (/api/github/*)
• Middleware
• Authentication Check
[External Services]
• GitHub API
• Auth Providers
Important Elements to Highlight
• The Next.js App Router architecture
• Authentication flow with NextAuth.js
• GitHub API integration points
• Data fetching patterns (useGithubUser hook)
• Component hierarchy and relationships
• State management strategy
Technical Stack Callouts
Use of:
• Next.js 13+ (App Router)
• TypeScript
• Tailwind CSS
• shadcn/ui components
• NextAuth.js
• React Query
Remember to emphasize the modular nature of the components and how they interact with the GitHub API through the custom hooks and utility functions in the lib directory.