HLD Photo Sharing App Instagram

By Ashutosh Anand TiwariPublished Jan 3, 2025 · 4 min read

Functional vs. Non-Functional Requirements
Functional Requirements
- Feeds
- Create Post
- List Post
- Reels, Create Reels
- Story, Create Story
- Browse, Filter
- Messaging
- Like, Comments
- Edit Features
- Profile & Followers
Non-Functional Requirements
- Security & Privacy Features
- Desktop vs. Mobile: Device Support
- Authentication
- SEO
- Optimization
- Accessibility
- Offline Support
- Testing
- i18n / l10n (Internationalization & Localization)
- Deployment
Architecture Design
Architecture is not about folder or component structure. Start with a high-level server and client design and overall system architecture.
🚫 Avoid framework or language-specific discussions.
✅ Focus on concepts like MVC, client-server interactions, and data flow


Component Architecture
- Feed List: Comment Section, Add Comments
- Feed Creation: Comment, Caption, User Details, Post Body
- Media: Image or Video Component
Data Models
- Post Data:
id,caption,createdAt,updatedAt,userId,mediaIds[] - Feed List:
postIds[],totalPosts - User Data:
id,name,profilePhotoUrl - Media:
id,type(image/video)
API Endpoints
/feedList:pageNo,size(GET) → Response structure & frontend data usage discussion/create-post: Create post, upload media
Optimization
Asset Optimization
- Image formats: WebP/SVGs
srcset,userAgent,DPR(Device Pixel Ratio)- Device connectivity, prefetch images
Feed Optimization
- SSR (Above-the-fold strategies)
- Lazy Loading
- Infinite Scroll (Virtualization, Intersection Observer)
- Code Splitting
- Loading Shimmers
- Preserving Feed State
- Web Workers
- Optimistic Updates
Implementation
Image Editing
- Crop, Resizing, Filters using Canvas API or CSS Filters
- Try online CSS filter tools for testing and familiarity
File Upload
-
HTTPS POST
multipart/form-data- Base64 encoding
- Multi-selection
- File Chunking
Continue Exploring
Request a Topic
Want me to write notes on a course?
Tell me the course, book, or research topic you want covered. If it helps learners, I'll consider adding structured digital notes for it in the garden.
Collaborate
Have a notes collection to feature here?
Do you have open notes you want featured in this digital garden? Let me know — we can collaborate and publish them for learners worldwide.
Reach out on Topmate: topmate.io/aat
Contact to Collaborate