🖼️Backend ArchitectureComing Soon
Image Pipeline
S3 uploads, CloudFront CDN delivery, and Next.js image optimization.
Video coming soon
Add a YouTube video ID to the topics config
Documentation
Overview
Images flow through a three-stage pipeline: upload to S3, serve via CloudFront CDN, and optimize with Next.js Image component.
Upload Flow
- Client sends image to
/api/uploadroute - Server validates: auth, file type (JPEG/PNG/WebP/GIF), max 5MB
- Image uploaded to S3 bucket at
profiles/{userId}/{type}-{timestamp}.{ext} - CloudFront URL returned to client
Image Types
- Profile images — user avatars
- Banner images — profile page banners
- Player headshots — NBA player photos (CDN-hosted)
Optimization
next/imagecomponent withfillmode andsizesattribute- Remote patterns configured for CDN domains
- SVG data URL fallbacks rendered with
unoptimizedflag
Technical Details
<!-- Add details about S3 bucket policy, CloudFront distribution setup, etc. -->Content coming soon — add your video and detailed writeup here.