The Dog Matching App is designed to help you find your perfect furry companion. We understand the importance of finding the right dog for your lifestyle, and that's why we've created this intuitive, customizable app.
With the Dog Matching App, you can:
- Easily browse and search for available dogs.
- Filter dogs by breed, age, and more.
- Save your favorite dogs for future reference.
- Generate a match with a single dog using our advanced algorithm.
- Find dogs within a 25km radius of your current location.
We're committed to making dog adoption a seamless and enjoyable experience. Get started today and find the dog of your dreams!
Our user-friendly interface makes finding your perfect dog a breeze. With intuitive search and filter options, you can quickly discover dogs that match your criteria.
Each dog's profile is packed with valuable information, including breed, age, size, and more. We provide clear and detailed profiles to help you make the right choice.
Save your favorite dogs to a personalized list for easy access. Our app stores your favorites so that you can revisit them at any time.
Our advanced matching algorithm considers your preferred pups and finds the perfect dog for you.
Discover furry friends within a 25km radius of the current dog for potential playdates.
Getting started with the Dog Matching App is simple. Just follow these steps:
Make sure you have Node.js (v18.7+) installed on your machine. Then, proceed to install the project dependencies by running the following command:
npm install
Before running the app, you'll need to set up a few configuration files:
.env.local
: This file contains Next.js-specific environment variables..env
: Prisma relies on this file to access the database URL..env.template
(provided): Contains variables needed for both.env.local
and.env
.
Create duplicate copies of .env.template
and name them .env.local
and .env
. Fill in the required information in these files.
NEXT_PUBLIC_ORIGIN = "http://localhost:3000"
NEXT_PUBLIC_FETCH_COOKIE_NAME=<FOUND IN EXERCISE INSTRUCTIONS>
NEXT_PUBLIC_FETCH_API_URL=<FOUND IN EXERCISE INSTRUCTIONS>
DATABASE_URL=
You have two options for setting up the database:
-
Start by installing Docker Desktop (macOS/windows) or Docker Engine (Linux). Install Docker
-
Run the following command in a new terminal to initialize the Docker container with a MySQL database:
macOS/Linux
npm run db:init
Windows
npm run db:init-win
Now, you have a MySQL database running in a Docker container with the following credentials:
- Database name: fetch_take_home_db
- Database password: password
- Port exposed: 3306
Replace the DATABASE_URL
in .env
with the URL provided by Docker.
# the default URL is found in .env.template
DATABASE_URL=
To connect to the database with Prisma, run the following command in a new terminal:
macOS/Linux
npm run prisma:init
Windows
npm run prisma:init-win
You can also run the app locally with a MySQL database provided by a cloud service like PlanetScale or Railway.
Replace the DATABASE_URL
in .env
with the URL provided by the cloud provider.
DATABASE_URL=<mysql://{MYSQL_DB_USER}:{MYSQL_DB_PASSWORD}@{MY_SQL_DB_HOST}:{PORT}/{MYSQL_DB_NAME}>
You're now ready to run the app:
npm run dev
The app will be accessible at http://localhost:3000 in your web browser.
Troubleshooting tips for common issues can be found here: Troubleshooting
Let's explore the key features of the Dog Matching App:
- Start by signing up/logging in with your name and email to access the app.
- Explore and search for available dogs.
- Enjoy support for result pagination with infinite scrolling.
- Filter dogs by breed.
- Sort results alphabetically by breed, with options for ascending or descending.
- Save your favorite dogs for future reference and to generate matches. Favorites save across sessions.
- View detailed information about individual dogs.
- Access a comprehensive list of your favorited dogs.
- Save your favorite dogs for future reference.
- Generate a match with a single dog using the
match
button.
- Logout when you've finished using the app from the user menu in the top right corner.
Explore these advanced features:
- Find dogs within a 25km radius of the current dog.
- Utilize additional filters for age and multiple breeds.