Create an email client interface that allows users to manage their emails with a modern, responsive design. The application should feature email organization, composition, and interactive features.
-
Inbox Page (
/app/page.js
)- Three-column layout:
- Folders/Labels navigation
- Email list view
- Email preview pane
- Virtual scrolling for email list
- Real-time email counter
- Three-column layout:
-
Email Composition (
/app/compose/page.js
)- Rich text editor
- Recipient autocomplete
- File attachment interface
- Draft auto-save
- Send scheduling options
-
Email View (
/app/email/[emailId]/page.js
)- Thread view with expansion
- Inline reply interface
- Attachment previews
- Action toolbar (reply, forward, archive)
-
Search and Filters (
/app/components/EmailSearch.js
)- Advanced search options
- Filter by:
- Date range
- Has attachments
- From specific sender
- Label/folder
- Saved searches
// /app/data/emailData.js
export const emailData = {
folders: [
{
id: "inbox",
name: "Inbox",
unread: 3,
total: 120
},
{
id: "sent",
name: "Sent",
total: 50
},
{
id: "drafts",
name: "Drafts",
total: 2
}
],
labels: [
{
id: "work",
name: "Work",
color: "#FF4444"
},
{
id: "personal",
name: "Personal",
color: "#44FF44"
}
],
emails: [
{
id: "email1",
subject: "Project Update - Q4 Goals",
from: {
email: "[email protected]",
name: "Sarah Johnson"
},
to: [{
email: "[email protected]",
name: "Current User"
}],
timestamp: "2024-10-30T14:30:00Z",
folder: "inbox",
labels: ["work"],
isRead: false,
hasAttachments: true,
attachments: [
{
id: "att1",
name: "Q4-Goals.pdf",
size: 2048576,
type: "application/pdf"
}
],
content: {
text: "Hi team,\nHere are the Q4 goals...",
html: "<div>Hi team,<br/>Here are the Q4 goals...</div>"
},
thread: ["email1", "email2"]
}
],
contacts: [
{
id: "contact1",
name: "Sarah Johnson",
email: "[email protected]",
avatar: "/avatars/sarah.jpg",
frequently_contacted: true
}
]
}
- Use Next.js 14 with App Router
- Implement virtual scrolling for email lists
- Use Tailwind CSS for styling
- Implement client-side state management
- Use TypeScript
- Add keyboard shortcuts for navigation
- Implement proper error handling and loading states
-
EmailList (
/app/components/EmailList.js
)- Virtual scrolling implementation
- Selection handling
- Drag and drop support
- Context menu actions
-
RichTextEditor (
/app/components/RichTextEditor.js
)- Text formatting toolbar
- Paste handling
- Image embedding
- Signature support
-
AttachmentHandler (
/app/components/AttachmentHandler.js
)- Drag and drop upload
- Progress indication
- Preview generation
- Size validation
-
ThreadView (
/app/components/ThreadView.js
)- Collapsible conversations
- Inline replies
- Quote handling
- Forward options
-
SearchSystem (
/app/components/SearchSystem.js
)- Full-text search
- Advanced filters
- Search suggestions
- Recent searches
-
Interface Design
- Responsive layout
- Intuitive navigation
- Smooth transitions
- Loading states
-
Performance
- Virtual scrolling
- Lazy loading
- Optimistic updates
- Caching
-
Functionality
- Email operations
- Search capabilities
- Attachment handling
- Thread management
-
Code Quality
- TypeScript implementation
- Component structure
- State management
- Error handling
- Set up basic layout and navigation
- Implement email list with virtual scrolling
- Create email composition interface
- Add search and filtering
- Implement thread view
- Add advanced features and polish
- Working email client interface
- Email composition system
- Search and filter functionality
- Thread view implementation
- Complete type definitions
- Error handling system
-
Productivity Tools
- Quick replies
- Templates
- Scheduled sending
- Follow-up reminders
-
Organization
- Custom folders
- Smart filters
- Auto-categorization
- Priority inbox
-
Keyboard Navigation
- Shortcut keys
- Focus management
- Navigation patterns
- Selection handling
-
Screen Reader Support
- ARIA labels
- Meaningful descriptions
- Status announcements
- Live regions