Question Paper_ Creating a Pet Listing Website Using React
Question Paper_ Creating a Pet Listing Website Using React
js
Objective: Create a Pet Listing website using React.js that incorporates error handling and
state management while following best coding practices, including the use of ESLint and
Webpack/Vite.
Project Setup
2. Project Structure:
○ Organize the project into meaningful directories (e.g., components, pages,
services, utils).
○ Create a .env file for managing environment variables.
APIs:
1. List of Pets:
○ URL: http://pets-v2.dev-apis.com/pets
○ Description: Fetches a list of pets.
2. Pets by ID:
○ URL: http://pets-v2.dev-apis.com/pets?id=${id}
○ Description: Fetches a pet's details by its ID.
3. Breed by Animal Type:
○ URL: http://pets-v2.dev-apis.com/breeds?animal=${animal}
○ Description: Fetches breeds for a specific animal type.
4. Search API:
○ URL:
http://pets-v2.dev-apis.com/pets?animal=${animal}&location=$
{location}&breed=${breed}
○ Description: Searches for pets based on animal type, location, and breed.
Implementation Tasks
1. ESLint Configuration:
○ Set up ESLint with a standard configuration (e.g., Airbnb style guide).
○ Run ESLint in the project to identify and fix linting errors.
2. Code Quality:
○ Write clean, readable, and maintainable code.
○ Use functional components and React hooks.
3. Responsive Design:
○ Ensure the website is responsive and works well on different screen sizes.
○ Use CSS frameworks like Tailwind CSS for styling.
4. Version Control:
○ Initialize a Git repository for version control.
○ Make regular commits with clear and concise commit messages.
Bonus Tasks:
1. Pagination:
○ Implement pagination for the pet list to handle large datasets.
2. Search Functionality:
○ Enhance the search form to provide more filters (e.g., age, size).
3. Improving UI/UX:
○ Use a component library like Material-UI for a polished user interface.
○ Implement animations for better user experience.
Submission:
1. Documentation:
○ Provide a README file with instructions on how to set up and run the project.
○ Document the project structure and any design decisions made.
2. Code Submission:
○ Share the GitHub repository link containing the complete project.
○ Ensure the repository is public or provide access if it's private.