A simple mindfulness app where users can:
- Select meditation music.
- Set a meditation timer.
- Start the meditation session.
media_20241228_183853_2929732500613432430.1.mp4
- Set reminders with push notifications to stay consistent.
-
Meditation Music
- Choose from a curated list of meditation tracks to enhance your mindfulness sessions.
-
Meditation Timer
- Set the desired duration for your meditation session.
- Automatically stop the music when the timer ends.
-
Push Notifications
-
Schedule daily reminders for meditation.
-
Notifications include customizable times to fit your routine.
-
-
Clone the repository:
bash git clone https://github.com/your-username/mindfulness-app.git cd mindfulness-app
-
Install dependencies:
bash npm install
-
Start the development server:
bash npm start
-
Scan the QR code with Expo Go (on Android/iOS) to run the app on your device.
- React Native: Core framework for building mobile applications.
- Expo: Platform for faster React Native development.
- react-native-modal-datetime-picker: For selecting meditation times.
- expo-notifications: For scheduling and managing push notifications.
- Launch the app on your mobile device.
- Select a meditation track from the home screen.
- Set the desired meditation duration using the time picker.
- Press play to start the meditation.
- Optionally, schedule reminders to meditate at your preferred time.
. ├── components/ │ └── MusicPlayer.js # Component for playing meditation music ├── screens/ │ ├── HomeScreen.js # Main screen with meditation options │ ├── TimerScreen.js # Timer setup and management │ └── ReminderScreen.js # Push notification scheduling ├── styles/ │ └── layout.styles.js # Shared styles for the app ├── App.js # Entry point of the application └── package.json # Project dependencies and scripts
To enable push notifications:
-
Install
expo-notifications:bash expo install expo-notifications
-
Request permissions in your app:
javascript import * as Notifications from 'expo-notifications';
useEffect(() => { const requestPermissions = async () => { const { status } = await Notifications.requestPermissionsAsync(); if (status !== 'granted') { alert('Permission for notifications not granted!'); } };
requestPermissions(); }, []);
-
Schedule a notification:
javascript await Notifications.scheduleNotificationAsync({ content: { title: "Meditation Reminder", body: "It's time for your daily meditation!", }, trigger: { hour: 8, minute: 0, repeats: true, }, });
Enjoy your journey to mindfulness and tranquility! 🌿