Hand-Off Plan

Code Access

  • Source code will be shared via transfer of ownership of the organization on GitHub. From there our repository can be cloned and environments can be set up according to information in the README.md file.
  • Cloning can be done using the command line with the command “git clone” followed by the URL of the repository, or using instructions provided by your chosen IDE.
  • Repository URL: https://github.com/CollectiveGood/collective-good-team-a
  • Instructions for setting up and using the application are also detailed below.

Development Environment Setup

Hardware/Software Requirements

Database Setup

This application uses the Supabase platform for PostgreSQL relational database. After creating a Supabase account and creating a project, follow the instructions below to set it up for development use.

  1. In the backend directory of the cloned repository, run npm install to install dependencies, then create two files named .env and .key.
  2. In Supabase, find the Database URL in Project Settings > Database > Connection String > URI.
    • In the URL, “YOUR-PASSWORD” should be replaced with the database password for your PostgreSQL database.
  3. In the .env file, copy the following contents: DATABASE_URL="{database_url}", where {database_url} is replaced by the URL of your database.

Google Cloud Services

Google Cloud Services stores the case data files. Follow the instructions below to set it up for development use.

  1. Create Google Cloud account at cloud.google.com.
  2. Make a Google Cloud Storage Bucket
  3. In the Google Cloud Console:
    • Once you create a service account, go to the IAM dashboard and edit Service Account to have the role “Storage Object User” and save.
    • For key creation, go back to the Service Accounts tab on the sidebar, click on email, navigate to the Key tab, hit “Add Key”, create a new key with type JSON. A .json file should download. Copy the contents of this .json file to the .key file.
  4. Run npx prisma migrate dev followed by npx prisma db seed. This will seed the database with the basic data.

Backend Setup

Once the database configuration is set up, you can host the backend server locally using the steps below.

  1. Run npm run onboard to generate the Prisma client and types
  2. Run npm start. This will load the backend server and the terminal should say something like “Server is running on port 3000”.

Frontend Setup

  1. Open a new terminal in the frontend directory
  2. Run npm install to install necessary dependencies
  3. Run ng serve to load the Angular application in a dev server
  4. Navigate to http://localhost:4200 to interact with the frontend.

Optional Testing

  • Make a separate database for testing and put the connection string in a new file named .env.test located in the backend folder.

AWS Deployment

Backend URL: https://collectivegood-backend.eba-e4sxwmsc.us-east-1.elasticbeanstalk.com:8443/

Frontend URL: http://collectivegoodfrontend-env-1.eba-afpspzke.us-east-1.elasticbeanstalk.com/

  • Users should be able to access the hosted application at the URL provided.
  • Launch the backend URL first. If your browser prompts a potential security risk after clicking the URL, just click Advanced → Accept This Risk and Continue
  • For AWS Deployment help, consult the information listed on the Amazon Web Services website3

Admin Access

  • The credentials for a default admin account will be sent to the client
  • A standard user must be elevated to admin access via an existing admin account by navigating to the Admin > Users page in the application.

Video Tutorials

Installation
Features
Use AWS Hosted App

Definitions and Links

  1. Google Cloud Create Service Account
    1. https://cloud.google.com/iam/docs/service-accounts-create
  2. Instructions for obtaining Google Cloud Service Account Key
    1. https://console.cloud.google.com/iam-admin/serviceaccounts?walkthrough_id=iam–get-service-account-keys&start_index=1#step_index=1
  3. AWS Deployment Information
    1. https://docs.aws.amazon.com/whitepapers/latest/overview-deployment-options/introduction.html