FixYourSleep is an iOS application designed to help users establish healthy sleep habits by setting ideal bedtime and wake-up routines. The app integrates notifications, Firebase services, and intuitive navigation to provide a seamless user experience. It encourages better sleep practices through reminders and actionable insights.
- Onboarding Process: A guided step-by-step introduction to help users define their sleep routines.
- Sleep Goals: Set and track bedtime and wake-up goals to improve sleep quality.
- Notification Integration: Smart notifications to remind users of their sleep schedules.
- Firebase Integration:
- User authentication (Sign In, Sign Up) with Apple Sign-In and Google Sign-In.
- Firestore for storing user data.
- Analytics for tracking user interactions.
- Dynamic Navigation: Navigate through different app flows using a
RouterManager
. - Motion Manager: Tracks and analyzes device motion to enhance sleep insights and user interaction.
- Dark Mode Support: Clean and optimized dark mode UI.
The app follows a MVVM (Model-View-ViewModel) architecture, ensuring modularity and scalability. Dependency injection is used via ViewModelFactory
to streamline the creation of view models. The app also incorporates Protocol-Oriented Abstraction to enhance code modularity and testing by abstracting core functionalities through protocols.
RouterManager
: Handles dynamic navigation between views.FirebaseService
: Abstracts Firestore database interactions.NotificationManager
: Manages notifications and permission requests.MotionManager
: Provides motion tracking capabilities for user engagement.ViewModelFactory
: Provides centralized creation of view models.- Protocol-Oriented Abstractions:
- Abstracts services (e.g.,
NotificationServiceProtocol
,FirebaseServiceProtocol
) for better testability and flexibility.
- Abstracts services (e.g.,
- SwiftUI: For building the user interface.
- Firebase: For backend services (Authentication, Firestore, Analytics).
- Apple Sign-In and Google Sign-In: For seamless and secure user authentication.
- MVVM Architecture: For separating business logic and UI.
- Dependency Injection: For managing dependencies in a clean, testable manner.
- Core Motion: For motion data tracking.
- Protocol-Oriented Abstraction: For ensuring modular and testable service interactions.
- Xcode 15.0 or later
- iOS 16.0 or later
- A Firebase project configured with Firestore and Authentication enabled
- Clone the repository:
git clone https://github.com/yourusername/FixYourSleep.git
- Open the project in Xcode:
cd FixYourSleep open FixYourSleep.xcodeproj
- Add your
GoogleService-Info.plist
file to the project root. - Build and run the app on a simulator or device:
Cmd + R
- Launch the app.
- Follow the onboarding process to set your sleep goals.
- Use the home screen to view and adjust your sleep routines.
- Enable notifications to receive reminders for your bedtime and wake-up schedules.