Design a File Explorer / Google Drive UI
Problem statement
Design a Drive-style file explorer with tree navigation, breadcrumbs, virtualized folders, permission-aware file actions, conflict recovery, and uploads.
Asked In
Key Challenges
- ·Tree and breadcrumb navigation over a large hierarchy
- ·Optimistic rename, move, copy, delete, and bulk selection
- ·Permission-aware actions and shared file states
- ·Search, sorting, virtualization, and thumbnail loading
- ·Conflict recovery for uploads and cross-folder changes
2-Minute Answer — High-Level TL;DR
Read this before your interview
HLD Interview Focus
I would design a route-addressable explorer with a folder tree, breadcrumb bar, virtualized grid or list, selection command bar, and details panel. File and folder nodes are normalized by id; directory pages are cached by parent id, sort, filter, and cursor. Reads are paginated and thumbnails lazy-load. Rename, move, trash, restore, and bulk actions update optimistically with idempotency keys, while the server remains authoritative for permissions and name conflicts. Upload progress integrates as pending nodes in the target folder. The difficult parts are keeping breadcrumbs stable through moves, drag-drop and keyboard parity, shared permissions, search results that are not a tree, and conflict recovery when another client changes the same folder.
My Approach: Building the Solution
How to think about this problem
I'll start from moving 200 files into a folder that already has name collisions — then design normalized nodes, optimistic move + rollback, and breadcrumb navigation.
Why This Approach?
Most candidates recurse a file tree into the DOM. Strong answers normalize nodes by id, virtualize folder pages, and run moves through an permission-aware action queue with conflict recovery.
Treat folders like routes through a warehouse: the item id is stable even when its aisle and label change.
Requirements: What Makes a Great Solution?
Clarify scope before designing anything
Requirements Exploration Questions
Ask your interviewer these questions to refine requirements
Which views exist?
- ·My drive, shared with me, recent, trash, search
- ·Grid, list, details panel
- ·Desktop and mobile navigation
Which operations are core?
- ·Create folder, rename, move, copy, trash, restore
- ·Bulk actions and drag-drop
- ·Upload/download and preview
How large is a folder?
- ·Pagination and virtualization
- ·Thumbnail volume
- ·Deep hierarchy and shortcuts
What collaboration rules matter?
- ·Permissions
- ·Shared folders
- ·Live updates from other clients
What conflicts should be exposed?
- ·Duplicate file name
- ·Move into invalid parent
- ·Deleted or permission-lost node
Functional Requirements
Must Have — MVP
- ✓Folder tree and breadcrumbs
- ✓List/grid with sort, filter, pagination, and virtualization
- ✓Selection, bulk actions, keyboard navigation, and drag-drop
- ✓Create folder, rename, move, trash, restore, upload, and download
- ✓Permission-aware action states and error explanations
- ✓Empty, loading, stale, and conflict states
Advanced (If Time Permits)
- +Shared link and permission dialog
- +Search and recent views
- +Offline metadata cache
- +Background upload and virus-scan pending state
Non-Functional Requirements
Performance Targets
- ·Large folders render with bounded rows
- ·Thumbnails do not block metadata paint
- ·Folder transitions use cached pages when fresh
- ·Drag selection stays responsive
Reliability & Consistency
- ·Move/rename operations are idempotent
- ·Folder pages revalidate after cross-tab delta
- ·Breadcrumb resolves canonical parent after a move
- ·Uploads resume or fail visibly
Accessibility & Input Support
- ·Keyboard-first flows with visible focus and predictable tab order
- ·Screen-reader announcements for async changes using aria-live where appropriate
- ·Reduced-motion alternatives for animated transitions
- ·Pointer, touch, and keyboard parity for every core action
Security & Privacy
- ·Server validates permissions for every command
- ·Do not trust file extension for preview safety
- ·Avoid exposing private thumbnail URLs outside auth policy
Observability
- ·Track Core Web Vitals plus domain-specific interaction latency
- ·Measure API error rate, retry rate, stale-cache usage, and client exceptions
- ·Emit structured events for critical user journeys and abandoned flows
The full solution is part of HelloFrontend Pro
The question above is free to read in full. Upgrade to unlock the interactive workspace and the senior-level walkthrough that go with it.
- Full RADIO-framework walkthrough with architecture diagrams
- Data model, API design, and rendering strategy trade-offs
- Performance, accessibility, and offline sections plus a model answer
Already a member? Log in to open the workspace.