Design
Pastebin / Code Snippet Sharing
Design a text/code snippet sharing service like Pastebin — create, share, and expire pastes with syntax highlighting.
01 - Why interviewers ask this
Short-URL-style generation and expiry logic come up constantly in interviews — this version tests it in a friendlier, content-storage context before you meet the "real" URL shortener.
02 - Where this system exists in the real world
You interact with this design every day.
Pastebin / GitHub Gist-style snippet sharing
Temporary file/link sharing services
Code-snippet sharing inside developer tools
03 - What you'll master
Solve this once. Know it forever.
Generate unique, collision-resistant short IDs
Model expiry and visibility settings
Separate metadata storage from content storage
04 - What you'll design
7 functional · 4 non-functional requirements.
Create a paste with title, content, language, and optional expiry
6 more requirements inside
Sign in to unlock the full brief and start designing
05 - Companies that ask this
You may face this exact question in your next interview.
Ready?
Open the canvas.
Design it yourself.
See all requirements, use staged hints, run your code, and compare with community discussions - all on the same canvas.
Start Solving