Skip to content

kochcj1/comidapassion

Repository files navigation

comidapassion

During an interview with Compassion International, the recruiter shared with me that one of the apps that's developed at Compassion is an app that allows workers on the field to upload pictures of sponsored/to-be-sponsored children into the system. He also mentioned React Native and AWS as technologies they were looking for in prospective hires.

Given that I didn't have any React Native or AWS experience at the time, the recruiter felt that the job wasn't a good fit for me. As a result, I took it upon myself to learn enough React Native and AWS to create a lighthearted parody of the app he described to me. I call it "comidapassion"!

This app features a national dish from each of the 25 countries where Compassion is located and includes a way to view the recipe for each national dish within the app. It's a silly concept, but the idea is that someone could make a particular national dish on the field, take a picture of it using the app, and then upload the picture into the system.

In total, I spent approximately 35 hours developing this app, including the time it took to learn React Native and AWS S3.

Demo 1: Choosing A Photo And Viewing A Recipe

comidapassion-demo.mp4

Demo 2: Images Are Still Present On App Reload

comidapassion-demo2.mp4

Setup

  1. git clone this repository.
  2. cd into the directory that was created.
  3. Pull in dependencies using npm install.
  4. Set up an S3 bucket on AWS called "comidapassion" with a directory called "recipes". Each recipe should be specified in this directory as a JSON file (see below).
  5. Add a file to the project called aws_s3_config.json and specify the credentials for accessing your AWS S3 bucket (see below).
  6. Run the app using expo start.

The policy for your bucket should look something like this:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::comidapassion",
                "arn:aws:s3:::comidapassion/*"
            ]
        }
    ]
}

Each recipe's JSON file should look something like this:

{
  "name": "Nasi Goreng",
  "origin": "Indonesia",
  "url": "https://www.recipetineats.com/nasi-goreng-indonesian-fried-rice"
}

The aws_s3_config.json for your project should look something like this:

{
  "accessKeyId": <your access key ID here>,
  "secretAccessKey": <your secret access key here>
}

Tasks

  • Familiarize myself with React Native.
  • Familiarize myself with AWS S3.
  • Create an S3 bucket for storing recipes.
  • Create a config file in the project for storing AWS credentials (make sure that file is in .gitignore!).
  • Create a splash screen.
  • Create a screen that presents each recipe as a card.
  • Add the ability to open a recipe's associated URL within the app itself.
  • Add an activity indicator to show that a recipe's associated web page is loading.
  • Provide a way for the user to select a photo for a recipe.
  • Upload selected photos to AWS.
  • Re-display each recipe's image on app reload.
  • Warn the user if they're missing aws_s3_config.json.
  • Handle internet connection errors.
  • Handle AWS upload errors.
  • Try things out on an Android device.
  • Add icons8 licensing.
  • Publish the app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published