- README.md: Project overview - requirements.md: Full feature specification - competitors.md: Market research (Wealthbox, Affinity, Clay, etc.) - feasibility.md: Technical assessment with Swift/Firebase/Claude architecture - blueprint.md: Architecture diagrams, screens, data models, API endpoints, dev phases Client: David DePoyster / NWM Tech: Swift/SwiftUI, Firebase, Claude AI
14 KiB
The Network App - Technical Feasibility Assessment
Date: 2025-06-26
Purpose: Evaluate technical approach, architecture, and development requirements
Executive Summary
The Network App is technically feasible with the proposed stack (Swift/SwiftUI, Firebase, Claude AI). The project is moderate complexity with well-understood patterns. Main challenges are AI integration quality and compliance implementation. Estimated timeline: 12-16 weeks for MVP.
1. Swift/SwiftUI Architecture Recommendations
Platform Choice: Native iOS ✅
Why Native:
- Best performance for data-heavy CRM
- Full access to iOS features (biometrics, contacts, notifications)
- SwiftUI is mature and production-ready (iOS 16+)
- Offline-first capabilities easier to implement
- Better for sensitive data handling
Why NOT Cross-Platform:
- Single platform requirement (iOS first)
- Native gives compliance advantages
- No need to compromise on UX
Recommended Architecture: MVVM + Clean Architecture
┌─────────────────────────────────────────────────────┐
│ Presentation │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Views │ │ ViewModels │ │ Router │ │
│ │ (SwiftUI) │ │ (ObsObj) │ │ (Coordinat) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────┤
│ Domain │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Use Cases │ │ Entities │ │ Repositories│ │
│ │ │ │ (Models) │ │ (Protocols) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────┤
│ Data │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Firebase │ │ Claude │ │ Local │ │
│ │ Service │ │ Service │ │ Cache │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────┘
Key SwiftUI Patterns
- State Management: Combine + ObservableObject
- Navigation: NavigationStack (iOS 16+)
- Data Flow: Single source of truth in ViewModels
- Dependency Injection: Protocol-based for testability
iOS Version Target
- Minimum: iOS 16.0
- Reason: NavigationStack, modern SwiftUI features
- Coverage: ~95% of active iPhones
2. Firebase Structure for Client Data
Why Firebase ✅
Advantages:
- Real-time sync built-in
- Offline persistence automatic
- Authentication included
- Cloud Functions for backend logic
- Good security rules system
- Scales automatically
Considerations:
- NoSQL requires careful data modeling
- Compliance certifications available (SOC 2, ISO 27001)
- Data residency options exist
Firestore Data Model
users/
{userId}/
profile: { name, email, settings }
subscription: { tier, expires }
clients/
{clientId}/
userId: string (owner reference)
basic: {
firstName, lastName, email, phone
address: { street, city, state, zip }
}
professional: {
company, role, industry
}
personal: {
birthday, anniversary
interests: []
family: { spouse, children: [] }
preferences: {}
}
notes: [] // Array of timestamped notes
tags: []
matchPreferences: {
excludeFromMatching: boolean
excludeClientIds: []
}
metadata: {
createdAt, updatedAt, lastContactedAt
}
communications/
{communicationId}/
userId: string
clientId: string
type: "email" | "newsletter" | "birthday"
status: "draft" | "approved" | "sent"
aiGenerated: {
content: string
generatedAt: timestamp
promptUsed: string
}
finalContent: string
sentAt: timestamp
matches/
{matchId}/
userId: string
client1Id: string
client2Id: string
aiReasoning: string
score: number
status: "suggested" | "approved" | "introduced" | "rejected"
introducedAt: timestamp
outcome: string
events/
{eventId}/
userId: string
clientId: string
type: "birthday" | "anniversary" | "followup" | "custom"
date: timestamp
recurring: boolean
reminderDays: number
lastTriggered: timestamp
Security Rules Strategy
// Firestore Security Rules (simplified)
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can only access their own data
match /clients/{clientId} {
allow read, write: if request.auth != null
&& resource.data.userId == request.auth.uid;
}
// Audit log - write only
match /auditLog/{logId} {
allow create: if request.auth != null;
allow read: if false; // Only via admin SDK
}
}
}
Offline Strategy
- Firestore Persistence: Enable by default
- Optimistic Updates: UI updates immediately
- Conflict Resolution: Last-write-wins for most fields
- Sync Indicator: Show pending changes to user
3. Claude AI Integration Approach
API Integration Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ iOS App │────▶│ Firebase │────▶│ Claude API │
│ │ │ Functions │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
│
API Key secured
in Cloud Functions
Why Cloud Functions Proxy:
- API key never on device
- Rate limiting and cost control
- Audit logging for compliance
- Can cache/optimize requests
Claude Use Cases & Prompts
1. Personalized Email Generation
System: You are a professional wealth advisor writing to a valued client.
Maintain a warm but professional tone. Incorporate personal details naturally.
Context:
- Advisor name: {advisorName}
- Client: {clientName}
- Their interests: {interests}
- Recent notes: {recentNotes}
- Purpose: {emailPurpose}
Generate a personalized email that feels genuine, not templated.
2. Client Match Suggestions
System: You are analyzing client profiles to identify valuable networking
opportunities. Only suggest matches that would genuinely benefit both parties.
Client A: {profileA}
Client B: {profileB}
Evaluate potential match:
1. What shared interests or complementary needs exist?
2. How might they benefit from knowing each other?
3. Confidence score (1-10) with reasoning
4. Suggested introduction approach
Output as JSON: { score, reasoning, introductionSuggestion }
3. Birthday/Event Messages
System: Generate a thoughtful birthday message from a wealth advisor to
their client. Should feel personal, not generic.
Client: {clientName}
Relationship tenure: {yearsSinceClient}
Interests: {interests}
Last interaction: {lastNote}
Keep it brief (2-3 sentences) and sincere.
Cost Estimation
| Use Case | Tokens/Request | Requests/Month | Monthly Cost |
|---|---|---|---|
| Email generation | ~800 | 200 | ~$2.40 |
| Match analysis | ~1200 | 100 | ~$1.80 |
| Birthday messages | ~300 | 50 | ~$0.45 |
| Total estimated | ~$5-10/user |
Based on Claude 3.5 Sonnet pricing ($3/M input, $15/M output)
Error Handling
- Timeout: 30-second limit, show "AI thinking..."
- Failure: Graceful fallback to templates
- Rate Limits: Queue and retry with exponential backoff
- Content Filtering: Review AI output before displaying
4. Security & Compliance Considerations
GDPR Compliance
| Requirement | Implementation |
|---|---|
| Right to Access | Export all client data as JSON/PDF |
| Right to Deletion | Hard delete with cascade (Firebase Admin SDK) |
| Data Portability | Standard export format |
| Consent Tracking | Store consent timestamps per client |
| Data Minimization | Only collect necessary fields |
HIPAA Considerations
If storing health-related notes (e.g., "client mentioned health concerns"):
- BAA with Firebase: Google offers BAA for Cloud/Firebase
- Encryption: AES-256 at rest (Firebase default)
- Access Logging: Audit trail for all data access
- Employee Training: Document handling procedures
Encryption Strategy
| Layer | Method |
|---|---|
| In Transit | TLS 1.3 (Firebase default) |
| At Rest | AES-256 (Firebase default) |
| Sensitive Fields | Additional client-side encryption (optional) |
| Local Cache | iOS Keychain for sensitive data |
Authentication Flow
┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ App Launch │───▶│ Biometric │───▶│ Firebase │
│ │ │ (FaceID) │ │ Auth │
└──────────────┘ └─────────────┘ └──────────────┘
│
Fallback to PIN
Audit Logging
Log these events to a write-only collection:
- User login/logout
- Client record created/modified/deleted
- AI generation requested
- Export performed
- Data deletion requested
5. Complexity Assessment
Feature Complexity Breakdown
| Feature | Complexity | Effort (days) | Risk |
|---|---|---|---|
| Client CRUD | Low | 5 | Low |
| Search & Filters | Medium | 4 | Low |
| Firebase Auth | Low | 2 | Low |
| Client Profile UI | Medium | 6 | Low |
| AI Email Generation | Medium | 5 | Medium |
| AI Matching | High | 8 | Medium |
| Birthday Tracking | Low | 3 | Low |
| Push Notifications | Medium | 3 | Low |
| Offline Support | Medium | 4 | Medium |
| Compliance Features | Medium | 5 | Medium |
| Settings & Preferences | Low | 2 | Low |
Technical Risks
| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| AI quality inconsistent | Medium | High | Prompt iteration, human review |
| Firebase scaling costs | Low | Medium | Monitor usage, set alerts |
| iOS approval delays | Low | Medium | Follow guidelines strictly |
| Offline sync conflicts | Medium | Medium | Clear conflict resolution UX |
6. Timeline Estimate
Phase 1: Foundation (Weeks 1-4)
- Project setup, architecture
- Firebase configuration
- Authentication flow
- Basic client CRUD
- Deliverable: App shell with auth and data persistence
Phase 2: Core Features (Weeks 5-8)
- Client profile UI (full)
- Search and filtering
- Notes and tags
- Event/birthday tracking
- Push notifications
- Deliverable: Functional CRM without AI
Phase 3: AI Integration (Weeks 9-12)
- Cloud Functions setup
- AI email generation
- AI matching algorithm
- Review/approval workflows
- Deliverable: Full AI features working
Phase 4: Polish & Compliance (Weeks 13-16)
- Compliance features (export, delete)
- Audit logging
- UI polish and edge cases
- Testing and bug fixes
- App Store preparation
- Deliverable: Production-ready app
Total Estimate: 12-16 weeks
With buffer for unknowns: 16-20 weeks
7. Technology Recommendations
Recommended Stack
| Component | Technology | Rationale |
|---|---|---|
| Language | Swift 5.9+ | Modern, safe, performant |
| UI | SwiftUI | Declarative, less code |
| Architecture | MVVM | SwiftUI natural fit |
| Backend | Firebase | Real-time, offline, scales |
| Database | Firestore | Flexible schema, good sync |
| Auth | Firebase Auth | Turnkey, secure |
| Functions | Cloud Functions | Secure AI proxy |
| AI | Claude API | Quality, context length |
| Analytics | Firebase Analytics | Integrated, free |
| Crash Reporting | Firebase Crashlytics | Integrated, free |
Development Tools
- Xcode 15+ - Latest SwiftUI features
- Swift Package Manager - Dependency management
- SwiftLint - Code quality
- Firebase Emulator - Local development
Third-Party Libraries
Keep minimal:
- Firebase iOS SDK
- (Optional) Kingfisher for image caching
- (Optional) SwiftUI introspect for edge cases
8. Conclusion
Feasibility: ✅ HIGH
The project is well within established technology patterns. No experimental tech required.
Key Success Factors
- AI Prompt Engineering - Invest time in quality prompts
- UX for AI Review - Make human approval frictionless
- Offline-First - Critical for mobile advisor use
- Compliance Documentation - Start early, not late
Recommended Next Steps
- Finalize scope and budget
- Set up Firebase project
- Create Figma designs for key screens
- Begin Phase 1 development
Cost Summary
| Item | One-Time | Monthly |
|---|---|---|
| Development (16 wks) | $15-40K* | - |
| Firebase (100 users) | - | $25-50 |
| Claude API (per user) | - | $5-10 |
| Apple Developer | $99/year | - |
| Total Year 1 | ~$15-40K | ~$75-150 |
*Development cost varies significantly based on who builds it