Skip to content
Ivan Guan edited this page Mar 16, 2024 · 10 revisions

Table of Contents

  1. How to Use
  2. How to Deploy

How to Deploy

Frontend

  1. Go to the frontend folder
  2. Run npm install
  3. Run npm build
  4. Upload the build folder to the s3 bucket https://s3.console.aws.amazon.com/s3/buckets/cs130-app-frontend?region=us-west-1&bucketType=general&tab=objects

Backend

  1. Go to the backend folder
  2. Run pip install -r requirements.txt
  3. Need a .env file with the following keys- MONGO_URI, OPEN_API_KEY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
  4. python run.py

Alternatively, the backend is still being hosted at the following link https://snap-backend.fly.dev/api/

Individual endpoints can be accessed via running the frontend pointing the base_url to the fly.io link above. Depending on when this is read, the fly.io deployment above may/may not be working anymore since servers are being funded out of pocket as of now.

Below is a walk through of how the app works and how it can be useful for our target audience.

How to Use

Login

Here is the first page you will see, the login page. Please log in or sign up.

Food Upload

Once you have logged in you are taken to the upload image section. From here you can view your profile or upload an image to generate a recipe of a food that you really want to know how to make.

To upload an image, simply press the gray button to navigate through your directories to find a food image you want to find the recipe of.

After clicking the generate recipe button your recipe will be generated.

User Profile

To view your profile click in the top right corner. If we go ahead and visit your user page we can see that your newly generated recipe stored under your user profile.

Clicked on the stored recipe will bring up its information.

Searching For A Recipe

Now let's search for a recipe. If we click onto the search bar in the top right and search for example "burrito" we get someone else's recipe for a burrito!

Clicking in we can see the recipe for the burrito.

We can go back to the search page and click the "+" button to add it to our list. Now checking our list we see.

Deleting A Recipe

If we hover over the "x" button we can delete our recipe.

Notice it does not delete right aways just in case you change your mind! If you do change your mind you can add it back with the "+" button. Else, after a refresh, it will be gone.

Searching Users

We can also search for users. For example, we search for the user ztest.

We can then click on them and look at their recipes.

The fettucine alfredo looks good! We can add that recipe to our own profile.