Skip to content

nluu05/AllergyPal

Repository files navigation

AllergyPal

AllergyPal is an application used to quickly identify the allergens of concern for the user on products. The user can either utilize a device's camera to scan a bar code or directly search via keyword to retrieve the nutrition facts and ingredients of a given product. Users have the ability to customize their allergens of concern on their profile.

Features

Implemented:

  • Users have numerous ways to access a product they want in a quick manner to look at the details/ingredients. They can either:
    • Search up a product from our database
    • Scan a bar code or label of a product
  • Users can register and sign into their accounts to save their allergens of concern.

Planned:

  • Users will be able to access the history of their scanned/searched products.
  • Allergens of concern will be saved to our server and linked to their profile.
  • Allergens of concern is what will be prioritized in being displayed when a user evaluates a product.
  • Users can view a product's details.

Installation / Setup

Video walkthrough: https://youtu.be/IRUftDE9PnM

1. Install MAMP

Navigate to in your browser:

https://www.mamp.info/en/downloads/

Scroll down to download for your respective OS (mac/Windows) and architecture (ARM/Intel CPU). The most recent version of MAMP will be on the top.

Check your architecture (for macOS only)

Open Terminal and run:

uname -m
Output Example Meaning
x86_64 Intel (64-bit)
i386 Older Intel (32-bit)
arm64 Apple Silicon ARM (M1/M2/M3)

2. Run the MAMP Setup Wizard and install

3. Open File Explorer and locate your htdocs folder

Navigate to your MAMP installation directory and open the htdocs folder.

Default location (Windows): C:\MAMP\htdocs

Default location (macOS): /Applications/MAMP/htdocs

If you installed MAMP somewhere else, simply open your custom MAMP installation folder and locate the htdocs directory inside it.

4. Delete the index file inside htdocs

loclahost

5. Open htdocs in your IDE and clone the repo

git clone https://github.com/nluu05/AllergyPal.git
cd AllergyPal

6. Open the file AllergyPal/Data/alldb.sql and copy its contents to your clipboard

7. Run and open MAMP as administrator

8. Configure Ports under MAMP -> Preferences -> Ports

MAMP Preferences

9. Select MAMP default and take note of your Apache Port

You will need this in step 16. Default ports might vary, so it may not match the sample image. MAMP Ports

10. Click Ok

11. Click Start Servers

Wait for it to finish starting. This will be indicated via the Apache Server and MySQL Server indicator nodes in the top right.

12. Open WebStart Page

13. Navigate to Tools -> PHPMYADMIN

PHPMYADMIN

14. Navigate to SQL

PHPMYSQL

15. Paste in contents from step 6 and click Go

PHPQuery Go

16. Navigate to Apache Port localhost in your browser

http://localhost:[APACHE_PORT]

Refer to step 9 if needed.

loclahost

17. Click into AllergyPal

18. Click into guestmain.html

Tech stack

Category Technologies
Frontend HTML, CSS, JavaScript
Backend PHP
Database MySQL

Folder Structure

AllergyPal/
├── css/
│   ├── login.css
│   ├── nav.css
│   ├── profile.css
│   ├── register.css
│   ├── shared.css
│   └── usermain.css
├── Data/
│   ├── alldb.sql
│   └── dbConnect.php
├── images/
├── includes/
│   ├── footer.html
│   ├── navbar-guest.html
│   └── navbar-user.html
├── js/
│   ├── main.js
│   ├── register.js
│   └── scanner.js
├── php/
│   ├── checksession.php
│   ├── loginprocess.php
│   └── registerprocess.php
├── cookies.html
├── guestmain.html
├── login.html
├── login.php
├── profile.html
├── profile.php
├── register.php
├── scanner.html
├── usermain.html
└── README.md

Developed and Tested by

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors