This is app is built with Expo. It is heavily inspired by Waking Up. Shout out to Sam Harris and MetaLab for building a great app. Also shout out to Nader Dabit for the idea of creating an Amplify "App in a box."
💻 Ready to deploy Serverless backend.
💡 Light and Dark Mode
🎧 Audio Player
🔐 Authentication
📈 GraphQL
📦 Storage
-
Clone the repo, install dependencies.
~ git clone https://github.com/jackburrus/MeditationApp.git ~ cd MeditationApp ~ yarn
-
Initialize and deploy Amplify Project.
~ amplify init ? Enter a name for the environment: dev (or whatever you would like to call this env) ? Choose your default editor: <YOUR_EDITOR_OF_CHOICE> ? Do you want to use an AWS profile? Y ~ amplify push ? Are you sure you want to continue? Y ? Do you want to generate code for your newly created GraphQL API? Y
-
Start the app.
~ expo start
-
Follow the authentication steps to create an AWS Cognito user, and login to the app.
-
Open the AppSync console.
~ amplify console api
-
Click on Queries to open the GraphiQL Editor. When prompted to "Login with User Pools", you can login with your new username and use the
aws_user_pools_web_client_id
located in aws-exports.js for the ClientId. -
Create a new meditation with the following GraphQL mutation:
mutation createMeditation { createMeditation(input: { title: "Monkey Mind", description: "A 20 minute meditation that aims to tame all these monkeys looking to steal your attention.", imageSource: "https://images.unsplash.com/photo-1528715471579-d1bcf0ba5e83?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2870&q=80", tag: "Philosophy" }) { id imageSource tag title } }
-
In the AWS console, navigate to the S3 Storage bucket for your app.
-
Create a folder for your audio files under
public/audiofiles/
. Upload your .mp3 files to this bucket, and rename them with the AWS_ID associated to the API data, ie294547d4-461d-4dc7-abea-4c6757d4231f.mp3
This app uses Restyle for many of its styles and light/dark mode. You can find the file under src/theme/Theme
Change the schema under amplify/backend/api/{YOUR_APP_NAME}/schema.graphql
Redeploy to Amplify
~ amplify push