SalesSheet.ai — Architecture: After

After: 6 Extracted Services

Clean Architecture

Components are thin UI shells. Services own data access and business logic.

ContactDetail.tsx
340
lines (was 1,200)
DealDetail.tsx
280
lines (was 890)
ActivityFeed.tsx
190
lines (was 540)
calls
activitiesService
Timeline events, call logs, meetings
fetchcreatedeletestats
commentsService
Threaded comments, @mentions
fetchcreateupdatedelete
deletedContactsService
Trash, restore, permanent delete
fetchrestorebulkRestoreempty
changeHistoryService
Audit trail, field-level history
fetchrecordrevertfieldHistory
emailsDatabaseService
Email threads, search, sync state
fetchThreadssearchlinksync
reportService
Pipeline, activity, revenue reports
pipelineactivityconversionrevenue
0
duplicated queries
89%
test coverage
-40%
time to add features
6 → 14
services and growing