Static Email Application
Problem Statement
Design a Static Email Application that allows users to compose, send, receive, view, and manage emails within a controlled environment (e.g., internal company app or offline prototype).
The system should model the core components of an email system — users, messages, inboxes, and folders — while focusing on clean object-oriented design and extensibility.
🔹 Problem Context
Unlike a full-fledged live email system (like Gmail), a static email application focuses on modeling the structure and flow of emails without actual network communication (SMTP/IMAP).
It should simulate:
This is a common LLD question to assess your object-oriented modeling, relationships, and use of design patterns.
✅ Functional Requirements
User Management
Email Composition
Email Actions
Email Status & Metadata
⚙️ Non-Functional Requirements
Aspect with Description
Simplicity
Should be easy to understand and extend for new features.
Extensibility
Support adding features like archiving, tagging, or spam filtering later.
Maintainability
Clean separation of classes for users, emails, and folders.
Performance
Efficient lookup and search of emails for a user.
Persistence (Optional)
Can simulate database with in-memory storage.
🧩 Core Classes and Responsibilities
Class and Responsibility
User
Represents an email user with a name, email ID, and folders (Inbox, Sent, etc.).
Represents a single email with sender, recipients, subject, body, timestamp, and status.
Folder
Stores and manages a collection of emails (Inbox, Sent, Drafts, Trash).
EmailService
Handles core operations like sending, receiving, deleting, and searching emails.
Attachment (optional)
Represents an attachment in an email.
EmailStatus (enum)
Defines states like READ, UNREAD, DELETED, ARCHIVED.
SearchService (optional)
Provides search and filtering functionality.
🧠 Key Design Considerations
💻 Example Scenario
🧾 Extension Ideas
💬 Interview Prompt Summary
Design a Static Email Application that allows users to compose, send, receive, and organize emails into folders.
Focus on object-oriented modeling, class design, and relationships (User–Email–Folder).
You should handle operations like sending, deleting, marking read/unread, and searching emails.