Basics

Requirements

How to define scope, constraints, and success criteria before writing a single line of code

Requirements: Getting Aligned Before You Build

Before sketching architectures or debating React versus Vue, pause and define what you are actually building. This phase is about alignment—getting a shared understanding of the problem space, user needs, and business constraints.

Timebox this to roughly 10% of your interview. You are not writing a specification; you are proving you ask the right questions and think systematically about scope.


Step 1: Functional Scope Definition

Break the feature set into two buckets: Core (without these, the product is broken) and Future (valuable but deferrable).

Sample: Social Content Platform

PriorityFeature Set
CoreUser authentication and profiles
Create, edit, delete posts (text + media)
Infinite-scroll feed with real-time updates
Basic engagement: likes, comments, shares
Mobile-responsive interface
FutureAdvanced privacy controls
Content moderation dashboard
Multi-language support
In-app messaging
Analytics for creators

This separation helps you design for today's needs while keeping tomorrow's extensions feasible.


Step 2: Non-Functional Requirements

These are the qualities that separate a working prototype from production-ready software.

Performance Budgets

  • Time to Interactive: < 3 seconds on 3G
  • Core Web Vitals: LCP < 2.5s, FID < 100ms, CLS < 0.1
  • API Response: < 500ms for feed loads, < 200ms for interactions

Scale Expectations

  • Concurrent Users: 50,000 peak
  • Data Volume: 1M posts/day, 10M interactions/day
  • Geographic Distribution: Global, with primary markets in US and EU

Compliance and Security

  • Data Privacy: GDPR-compliant data handling
  • Content Policy: Automated and human moderation workflows
  • Authentication: OAuth 2.0, MFA support
  • Accessibility: WCAG 2.1 AA compliance

Step 3: Capacity Planning (Envelope Math)

Use rough estimates to reason about infrastructure needs. This demonstrates you think beyond code to operational realities.

Sample Calculation: Microblogging Platform

Assumptions:

  • 2M Daily Active Users
  • Each user creates 1.5 posts/day on average
  • Each user views feed 8 times/day
  • Peak traffic is 3x average

Write Load:

  • Daily posts: 2M × 1.5 = 3M posts/day
  • Average writes: 3M ÷ 86,400 ≈ 35 posts/second
  • Peak writes: 35 × 3 = 105 posts/second

Read Load:

  • Daily feed views: 2M × 8 = 16M requests/day
  • Average reads: 16M ÷ 86,400 ≈ 185 requests/second
  • Peak reads: 185 × 3 = 555 requests/second
MetricAveragePeak
Posts created35/sec105/sec
Feed requests185/sec555/sec
Comment/like actions~400/sec~1,200/sec

This informs decisions about caching layers, database sharding, CDN requirements, and monitoring thresholds.


Step 4: User Journey Mapping

Identify the key flows users will experience and their success criteria.

Primary Journeys

  1. New User Onboarding

    • Sign up → profile setup → follow suggestions → first post
    • Success: User publishes content within 5 minutes
  2. Content Discovery

    • Open app → browse feed → engage with posts → discover new accounts
    • Success: 60% of sessions include at least one engagement
  3. Content Creation

    • Compose post → add media → publish → monitor engagement
    • Success: Post appears in followers' feeds within 30 seconds
  4. Social Interaction

    • Comment on post → reply to comments → react to responses
    • Success: Real-time updates without page refresh

Step 5: Technical Constraints and Context

Understand the environment your solution will operate within.

Platform Requirements

  • Primary: Mobile web (70% of traffic)
  • Secondary: Desktop web (25% of traffic)
  • Future: Native iOS/Android apps (5% of traffic)

Integration Points

  • Authentication: Existing OAuth provider (Auth0, Firebase)
  • Media Storage: AWS S3 or similar object store
  • Push Notifications: FCM for web, APNs for future native apps
  • Analytics: Integration with existing data warehouse

Team and Timeline

  • Development Team: 4 frontend engineers, 2 backend engineers
  • Timeline: MVP in 12 weeks, full feature set in 20 weeks
  • Existing Stack: Node.js backend, PostgreSQL, Redis

Step 6: Data Entity Overview

Sketch the core information your system will manage—this anchors API design and state management decisions.

Primary Entities

User

  • Profile information: username, display name, avatar, bio
  • Social graph: followers, following counts
  • Preferences: privacy settings, notification preferences

Post

  • Content: text, media URLs, creation timestamp
  • Metadata: author, engagement counts, visibility settings
  • Relationships: comments, reposts, reactions

Engagement

  • Actions: likes, comments, shares, bookmarks
  • Actors: user performing action, target post/comment
  • Temporal: timestamp, context (e.g., from which feed)

Effective Requirements Questions

Scope Clarification

  • "What's the minimum feature set for a successful launch?"
  • "Who are the primary user personas, and how do their needs differ?"
  • "Are there any features explicitly out of scope for this design?"

Constraints Discovery

  • "What performance benchmarks must we hit?"
  • "Are there regulatory requirements that constrain our data handling?"
  • "Do we need to integrate with existing systems?"

Scale Assumptions

  • "How many users do we expect in the first year?"
  • "What's the anticipated growth rate?"
  • "Are there seasonal or event-driven traffic spikes we should plan for?"

With requirements clarified, you are ready to move into Architecture—where you will map these needs to technical components, data flows, and system boundaries.

Next: Architecture Design - Learn how to structure frontend applications that deliver on these requirements while remaining maintainable and extensible.