arkavo-org / arkavo-org/app

Extract SwiftData models to shared ArkavoDataModels package

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
enhancement tech debt
Dominant language
Swift
Stars
0
Forks
0
Avg merge
1h 41m
Merged PRs (30d)
1

Description

### Problem
SwiftData models (`Account`, `Profile`, `Stream`, `Thought`, `BlockedProfile`) are currently duplicated/copied between:
- **Arkavo** (iOS app) - located in `Arkavo/Arkavo/`
- **ArkavoCreator** (macOS app) - needs same models
- This violates DRY principle and makes maintenance difficult

### Proposed Solution
Create a new Swift Package: **ArkavoDataModels**

### Package Structure
```
ArkavoDataModels/
├── Package.swift
├── Sources/
│ └── ArkavoDataModels/
│ ├── Models/
│ │ ├── Account.swift
│ │ ├── Profile.swift
│ │ ├── Stream.swift
│ │ ├── Thought.swift
│ │ └── BlockedProfile.swift
│ ├── DTOs/
│ │ ├── ThoughtServiceModel.swift
│ │ └── ProfileDTO.swift
│ ├── Enums/
│ │ ├── MediaType.swift
│ │ ├── Policies.swift
│ │ └── VerificationTypes.swift
│ └── Extensions/
│ └── ModelExtensions.swift
```

### Benefits
- ✅ Single source of truth for data models
- ✅ Shared between iOS and macOS apps
- ✅ Easier testing (isolated package)
- ✅ Better modularity
- ✅ Consistent data layer across platforms

### Migration Steps
1. Create `ArkavoDataModels` package in `app/ArkavoDataModels/`
2. Move model files from `Arkavo/Arkavo/` to package
3. Update `Arkavo.xcodeproj` to depend on package
4. Update `ArkavoCreator.xcodeproj` to depend on package
5. Update imports across both apps
6. Run tests to verify

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in app/Arkavo/Arkavo/ and inventory the listed model files, then review both Arkavo.xcodeproj and ArkavoCreator.xcodeproj to understand their current model references. Create the package under app/ArkavoDataModels/ with the proposed structure, update both project dependencies and imports, and run the existing tests to verify both apps use the shared models.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
desktop-dev, mobile-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.