Pain Meds Buddy has been designed to help people in pain manage their medication. It allows the user to add their medication and track their doses. The app is focused on making it easy to manage pain around the person not a schedule.
The app is written with SwiftUI and uses Core Data / Combine.
- The project was written using
Xcode 13
andiOS 14.5
- For best experience please use
iPhone 8 or later
- You will also need SwiftLint
- The project uses several swift packages :-
Expand
- https://github.com/MartinP7r/AckGen.git
- https://github.com/microsoft/appcenter-sdk-apple.git
- https://github.com/ArnavMotwani/CircularProgressSwiftUI
- https://github.com/devicekit/DeviceKit.git
- https://github.com/sanzaru/SimpleToast.git
- https://github.com/globulus/swiftui-mail-view.git
- https://github.com/ShabanKamell/SwiftUIFormValidator.git
- To automate test coverage across multiple devices and produce framed screenshots Fastlane integration has been added, please see these Setup Instructions
The project uses an MVVM architecture approach. However, ViewModels have only been employed where Core Data fetch requests and more complex code has cluttered the SwiftUI Views. Unit Tests cover most of the code where it is difficult to visual test functionality, please see coverage here. There is also some UI Testing which covers the main functionality of the app e.g. adding / editing. The project also has good accessibility coverage.
HomeView.swift / HomeViewModel.swift
The main screen in the app has been designed to summarise medication and current doses. Here the user can quickly take the next medication and see which medication is running out.
When designing the app it was important to consider the key functions a user would need and how these could be performed quickly.
The progress circles show how long is left until the the user can take their next dose or whether medication has recently become available to take.
MedsView.swift / MedsViewModel.swift
Here in the medications screen the user can see all the drugs they have setup.
They can also see an icon for which will make it easier to identify the medication at a glance.
A simple sort feature has been provided to make it easier to find medications if the list grows over time.
The add medication screen allows the user to setup details about their medication, the dose and how long the medication should last.
A gap time can also be used to space out medication taken through-out the day so coverage of the medication can stretched across the day within the maximum dose range for the day.
The user can also pick from a range of medical related icons and colours.
DosesView.swift / DosesViewModel.swift
The In Progress
/ History
screens are very similar and either show available or taken medication.
The list of doses is grouped by day.
The add dose screen is quite powerful, it uses the medications the user has setup and makes it easy and quick to add a new dose / take medication.
You can also download the latest version of the app from the app store.
You can also use this QR code to download the app from the app store.
Contributions for bug fixing or improvements are welcomed. Feel free to submit a pull request. Please ensure that all current unit tests and UI tests pass before submitting. Also if you find this code useful, feel free to buy a copy of my app, see the app store button above.
Usage is provided under the MIT License. See LICENSE for the full details.
I'd like to thank Paul Hudson from Hacking with Swift for his 100 days courses.
You may Contact me with any questions or concerns.