Skip to content

Flask and Javascript web-app that through a quiz recommends a dog breed that best fits in with your lifestyle.

License

Notifications You must be signed in to change notification settings

berta-rf/FetchMate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FetchMate

Code style: black Python JS SQLite SQLAlchemy Playwright Unittest Bootstrap

Table of Contents

About

Welcome to FetchMate, your go-to platform for finding your perfect canine companion! Our mission at FetchMate is to help connect people with their ideal dog breeds, making the journey of welcoming a new furry friend into your home an exciting and tailored experience.

Meet the Developers

FetchMate is the brainchild of a passionate team of developers who share a love for dogs and a commitment to helping potential dog owners find the best match for their lifestyle. With a blend of expertise in web development and a shared enthusiasm for canine companionship, we've come together to create a tool that simplifies the process of selecting the right dog breed.

Contributors

Why FetchMate?

At FetchMate, we understand that choosing the perfect dog is about more than just appearance – it's about finding a companion that will thrive in your home based on your unique lifestyle and preferences. Our inspiration for creating FetchMate comes from the desire to offer a solution that goes beyond aesthetics. We believe that every dog owner deserves a four-legged friend that aligns with their needs, whether it's energy levels, size, grooming requirements, or temperament.

What is FetchMate All About?

FetchMate offers an enjoyable and convenient online quiz that guides you in discovering the ideal dog breeds that match your individual lifestyle. Our user-friendly 5-minute quiz takes into consideration various aspects of your routine and preferences. Based on your responses, we analyze and recommend dog breeds that align with your requirements. From temperaments to energy levels, size, grooming needs, and more, we've got you covered.

The beauty of FetchMate is its flexibility – you can even retake the quiz if you wish to modify your responses and explore different breed options. Our goal is to provide the most comprehensive and intuitive dog breed finder tool on the web, ensuring that your journey to finding your new best friend is as seamless as possible.

We invite you to enjoy the FetchMate experience and embark on the journey of discovering the perfect furry companion that's tailored just for you. Your feedback is important to us, so feel free to reach out with any suggestions or ideas to enhance the FetchMate experience.

Woof-tastic regards,

The FetchMate Team 💚

Installation

Follow these steps to set up and run the FetchMate Flask app:

1. Clone the Repository

Clone the FetchMate repository to your local machine:

git clone git@github.com:berta-rf/FetchMate.git
cd FetchMate

2. Create and Activate a Virtual Environment (Optional):

You can create and activate a virtual environment if you want an isolated environment for your project. If you skip this step, the packages will be installed globally.

cd /path/to/your/FetchMate/src
python3 -m venv venv

Activate the virtual environment:

On macOS or Linux:

source venv/bin/activate

On Windows (Command Prompt):

venv\Scripts\activate

On Windows (PowerShell):

.\venv\Scripts\Activate.ps1

3. Install Dependencies using requirements.txt:

pip install -r requirements.txt

4. Initialize the Database

Run the Python interpreter and create the necessary database tables:

python3

then

from app import db
db.create_all()
exit()

5. Obtain an API Key:

To use the features of this project, you need to obtain an API key from https://api-ninjas.com/api/dogs. Here's how:

  • Sign up or log in to https://api-ninjas.com/api/dogs.
  • Navigate to the API key generation section in your account dashboard.
  • Generate a new API key and copy it.
  • Open the config.py file in the src folder of your project. Add the API key you obtained in the previous step:
API_KEY = "your_generated_api_key_here"

6. Run the App

Run the Flask app using the following command:

python3 app.py

or

python app.py

The app will be served at http://localhost:5001.

Test

We take testing seriously at FetchMate to ensure the reliability and functionality of our application. We have a comprehensive suite of tests that cover different aspects of the system, including unit tests for core functionality and end-to-end tests to validate the user experience.

Unit testing

To run unit tests for the utility functions in utils.py, follow these steps:

1. Navigate to the Test Directory:

Open a terminal and navigate to the root of the project, specifically the src folder where the tests are located.

cd path/to/src

2. Run Unit Tests:

Execute the following command to run the unit tests for the utility functions.

python -m unittest testing/test_utils_match_breeds.py

End-to-End testing

We also perform end-to-end tests to validate the behavior of our Flask application in a real-world browser scenario. Here's how to run these tests:

1. Install Playwright:

In the terminal, run the following command to install Playwright.

playwright install

2. Run End-to-End Tests:

From the src folder, execute the following command to run the browser tests.

python -m pytest testing/test_web.py

Please note that the Flask app must be running for the end-to-end tests to work as expected.

About

Flask and Javascript web-app that through a quiz recommends a dog breed that best fits in with your lifestyle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published