PassIt!
is a platform for helping tutors to post ads and for students to search a tutor.
In order to build and deploy the backend on your AWS account you have to:
-
Configure on your machine your aws credentials. You can check out on the Getting Started with CDK page how to do it. When it instructs you to set the environment variables, add them to a (
.gitignore
d).env
file in the root folder of the project instead. -
Setup a new Google Project on Google developer console.
-
Select the project created on previous step.
-
Configure on Google developer console the OAuth consent screen:
- On the left navigation bar, choose OAuth Consent Screen.
- For Authorized Domains enter
amazoncognito.com
.
-
Setup on Google developer console an android client:
- On the left navigation bar, choose Credentials.
- Create your OAuth2.0 credentials by choosing OAuth client ID from the Create credentials drop-down list.
- Choose Android application.
- On
package name
insert the android frontend applicationpackage
. - On the
SHA-1 digital certificate fingerprint
insert your keystore SHA-1 (info).
-
Setup on Google developer console a web client:
- On the left navigation bar, choose Credentials.
- Create your OAuth2.0 credentials by choosing OAuth client ID from the Create credentials drop-down list.
- Choose Web application.
- On Authorized JavaScript origins put your user pool domain, i.e.
https://<user-pool-domain-prefix>.auth.<aws-region>.amazoncognito.com
(any choosen value foruser-pool-domain-prefix
must be globally unique). - On Authorized Redirect URIs put your user pool domain with the
/oauth2/idpresponse
endpoint, i.e.https://<user-pool-domain-prefix>.auth.<aws-region>.amazoncognito.com/oauth2/idpresponse
.
-
Set the following environment variables (or put them inside an
.env
file on this project root folder) with values taken from previous steps:
USER_POOL_DOMAIN_PREFIX=<your-user-pool-domain-prefix>
GOOGLE_ANDROID_CLIENT_ID=<your-google-android-client-id>
GOOGLE_WEB_CLIENT_ID=<your-google-web-client-id>
GOOGLE_WEB_CLIENT_SECRET=<your-google-web-client-secret>
Install dependencies with:
yarn install
yarn run lerna bootstrap
Build the project with:
yarn run build
yarn run test
yarn run cdk bootstrap
yarn run cdk synth
yarn run deploy
Note: if you get an
Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
error when running yarn run cdk bootstrap
, try to remove the [profile default]
or [default]
line from the beginning of your ~/.aws/config
file and run it again.
Back-end services are the following:
Service | Description |
---|---|
Auth | Authentication service. |
API | API service. |
Users | Provides User search. |
Insertions | Provides CRUD operations on Insertions. |
Search | Search service. |
Conversations | Provides communication services between users. |
Storage | Storage service. |