Giter Site home page Giter Site logo

passit-backend's Introduction

Release

PassIt! backend

PassIt! is a platform for helping tutors to post ads and for students to search a tutor.

Infrastructure architecture

PassIt Architecture

Configuration

In order to build and deploy the backend on your AWS account you have to:

  1. 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 (.gitignored) .env file in the root folder of the project instead.

  2. Setup a new Google Project on Google developer console.

  3. Select the project created on previous step.

  4. Configure on Google developer console the OAuth consent screen:

    1. On the left navigation bar, choose OAuth Consent Screen.
    2. For Authorized Domains enter amazoncognito.com.
  5. Setup on Google developer console an android client:

    1. On the left navigation bar, choose Credentials.
    2. Create your OAuth2.0 credentials by choosing OAuth client ID from the Create credentials drop-down list.
    3. Choose Android application.
    4. On package name insert the android frontend application package.
    5. On the SHA-1 digital certificate fingerprint insert your keystore SHA-1 (info).
  6. Setup on Google developer console a web client:

    1. On the left navigation bar, choose Credentials.
    2. Create your OAuth2.0 credentials by choosing OAuth client ID from the Create credentials drop-down list.
    3. Choose Web application.
    4. On Authorized JavaScript origins put your user pool domain, i.e. https://<user-pool-domain-prefix>.auth.<aws-region>.amazoncognito.com (any choosen value for user-pool-domain-prefix must be globally unique).
    5. 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.
  7. 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>

Build

Install dependencies with:

yarn install
yarn run lerna bootstrap

Build the project with:

yarn run build

Test

yarn run test

Deploy

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.

Services

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.

passit-backend's People

Contributors

jotaro-sama avatar matteoarella avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

passit-backend's Issues

Migrate to aws sdk v3

As of now, we are using the AWS SDK v2 which packages all services dependencies also if they are not required.

We should instead migrate to AWS SDK for Javascript v3 which provides services into modular packages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.