We're a team of recent University of Waterloo graduates who found a passion for helping others who may be struggling with mental health. With cove, users can build their personalized, digital safety plan and access it anytime, anywhere, on any platform and uner any network conditions.
To learn more about our venture, reach out to us at trycove.ca.
First and foremost, we recognize mental health affects us all in different ways. We encourage anyone who feels like they are struggling or have a friend who is struggling to reach out, seek help and support others whenever possible.
Cove is an Angular app built using Ionic UI components and tooling. The app's serverless backend is built using AWS Amplify including storage, auth, api, offline(datastore) and database(dynamo) resources. The app was originally meant to be a hybrid app for ios/android but was eventually converted to a PWA.
git clone https://github.com/jonathanloos/cove.git
cd cove
yarn install
- Create an AWS Account
- Configure the Amplify Cli as outlined here.
- Deploy the project
Setup Amplify
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
Create the api
We already have the GraphQL code generated for this project, so generating it here is not necessary.
amplify add api
? Please select from one of the below mentioned services: GraphQL
? Provide API name: $API_NAME
? Choose the default authorization type for the API API key
? Enter a description for the API key: $API_KEY_DESCRIPTION
? After how many days from now the API key should expire (1-365): $CUSTOM_DAYS_HERE
? Do you want to configure advanced settings for the GraphQL API Yes, I want to make some additional changes.
? Configure additional auth types? No
? Configure conflict detection? No
? Do you have an annotated GraphQL schema? Yes
? Provide your schema file path: schema.graphql
amplify add codegen
Add Auth
amplify add auth
Using service: Cognito, provided by: awscloudformation
The current configured provider is Amazon Cognito.
Do you want to use the default authentication and security configuration? Default configuration
Warning: you will not be able to edit these selections.
How do you want users to be able to sign in? $SELECT_METHOD (we use email)
Do you want to configure advanced settings? No, I am done.
Successfully added auth resource locally
Add Storage
amplify add storage
? Please select from one of the below mentioned services: Content (Images, audio, video, etc.)
? Please provide a friendly name for your resource that will be used to label this category in the project: $FRIENDLY_NAME
? Please provide bucket name: $BUCKET_NAME
? Who should have access: $CUSTOM
? What kind of access do you want for Authenticated users? $CUSTOM
? Do you want to add a Lambda Trigger for your S3 Bucket? $CUSTOM
Successfully added resource locally
Status Check: Running amplify status
should return the following table
amplify status
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| -------- | --------------- | --------- | ----------------- |
| Api | $API_NAME | Create | awscloudformation |
| Auth | $AUTH_NAME | Create | awscloudformation |
| Storage | $STORAGE_NAME | Create | awscloudformation |
Add hosting
amplify add hosting
? Select the plugin module to execute Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
? Choose a type Manual deployment
π Deploy!
amplify publish
β Successfully pulled backend environment dev from the cloud.
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| -------- | --------------- | --------- | ----------------- |
| Api | coveapp | Create | awscloudformation |
| Auth | coveapp70e2d7ed | Create | awscloudformation |
| Storage | coveAppStorage | Create | awscloudformation |
| Hosting | amplifyhosting | Create | awscloudformation |
? Are you sure you want to continue? Yes
Cove uses Google Maps to search and display location data. To enable it, follow these steps:
- Create a GCP API Key as seen here
- Ensure the following APIs are enabled for the API key: Geocoding API, Maps Javascript API, Maps Static API and Places API.
- Create a
.env
file in the root directory with:GCP_MAPS_API_KEY=INSERT_GCP_KEY_HERE
and replaceINSERT_GCP_KEY_HERE
with the newly generated key. - Create the
GCP_MAPS_API_KEY
environment variable in the AWS Amplify Console
ng start
Note: npm start will first set the environment vairables in
.env
then start the app.
-
Sign up in the app after following the previous steps
-
Open the AppSync console:
amplify console api
-
Click on Queries to open the GraphiQL Editor. Login with your username and use the
aws_user_pools_web_client_id
located in aws-exports.js for the ClientId. -
Create help resources manually to be able to select them within the app. This list is universal and will be accessible to all users. Make sure to provide resources that you or others using the app have access to.
mutation createHelpResource {
createHelpResource(input: {
description: "",
live_chat: false,
phone: {
hoursOfOperation: "",
number: ""
},
sms: {
hoursOfOperation: "",
number: ""
},
title: "",
url: ""
}) {
id title description live_chat phone { number hoursOfOperation } sms { number hoursOfOperation } url
}
}
Cove is looking for contributors / maintainers! Think you could support the platform? Maybe contribute something awesome and meaningful to the mental health community? This is your chance! Drop us a lin on our website trycove.ca or create an issue/PR.