Objective
Build a small mobile chat module aligned with the provided Figma.
The app use Pusher for real-time events. No backend API integration is required.
We want to evaluate:
Test coverage and testing mindset Use mock/local data where needed, but the architecture must allow backend APIs to be plugged in later.
Must-have Screens
1) Inbox Screen (Conversation List)
List of conversations (1–1 + group) Each conversation item shows: Title (username or group name) Notes:
Local filtering only (no backend search) Unread count is optional (bonus) 2) New Chat Screen
One user → open User Chat Multiple users → open Group Chat Show selected users visually No backend creation logic (UI + state only) 3) User Chat Screen
Optimistic UI (message appears immediately) Typing indicator (single user) Message status simulated locally: 4) Group Chat Screen
Same as User Chat, plus:
Sender name shown above messages Typing indicator supports multiple users Real-time Requirements (Pusher)
Use Pusher Channels for only these events:
message:newndw
→ Add message to active chat typing:start
→ Show typing indicator typing:stop
→ Hide typing indicator Message status (Sent / Delivered / Seen) can be handled locally without Pusher events.
Pusher logic must live in a dedicated service layer, not inside UI components.
No Backend
It is acceptable to use:
A mock service inside the app A debug button or panel to trigger events What matters is that the design clearly allows replacing mocks with real APIs later.
Data Layer Expectations
Preferred structure:
ui/ → Screens and UI components domain/ → Models and state logic data/ → Repositories / mock data sources realtime/ → Pusher setup and event mapping storage/ → In-memory or local cache We want to see:
Clear ownership of state: Pusher events → state updates Business logic testable without UI Testing Requirements
Required
A Test Plan in the README (what you tested and why) At least 1 UI / widget test Suggested Unit Tests
Message is added on message:new Typing indicator start/stop logic Group chat shows sender name Suggested UI Test
Chat screen updates when a mock real-time event is received Submission
Setup steps + Pusher key configuration Short architecture explanation State management choice and reasoning Test plan + covered cases Tradeoffs and assumptions