The Outfit Matcher is a web-based application that helps users filter and find outfits based on certain criteria. The app allows users to apply various filters such as event, season, body, and style to narrow down the available outfits. It can be used for fashion-related e-commerce platforms, wardrobe management, or personal style recommendations.
- Outfit Filtering: Allows users to filter outfits based on different attributes like event, season, body type, and style.
- Responsive Design: Optimized for both desktop and mobile devices.
- API Integration: Fetches outfits from the backend using the
fetchOutfitsfunction. - Fallback Handling: Provides fallback images when the API request fails or returns no results.
- Simulated API Delay: Provides a simulated delay for demo purposes to mimic real-world network conditions.
-
Frontend:
- JavaScript (ES6+)
- Fetch API for making network requests
- HTML/CSS for the web interface
- (Optional) React (if integrated in a React-based project)
-
Backend:
- Java (Servlets)
- JSON handling using
org.jsonlibrary - (Optional) Database (if required for storing outfits data)
-
Other Tools:
- Git/GitHub for version control
- Postman for testing API endpoints
- Clone the repository or create a new project folder.
- Add the
fetchOutfitsfunction to your frontend JavaScript. - Ensure the
fallback.jsfile is available in the same directory for fallback handling.
- Set up a Java web application.
- Ensure the
OutfitFilterUtilclass is available to filter the outfits data based on the provided criteria. - Expose the filtering functionality via an HTTP POST endpoint (
/outfits).
To add additional filters (e.g., color, material), follow these steps:
- Add new filter options to the form or filter section.
- Modify the
fetchOutfitsfunction to include new filter fields in the request payload.
- Update the
OutfitFilterUtilclass to include logic for handling new filter criteria. - Modify the
containsIgnoreCasemethod to check if the new filters match the items in the data.
If you want to add more advanced matching logic:
- Update the
containsIgnoreCasemethod to handle partial matches or multi-value comparisons.
- Modify the backend logic to support AND or OR conditions between filters.
Solution:
- Ensure that the filters are correctly set (check for typos or case mismatches between the frontend and backend).
- Verify that the database or data source contains entries that match the filters.
Solution:
- Check the backend logs for stack traces to identify errors in the processing logic.
- Ensure that the incoming data is valid and correctly formatted.
This project is licensed under the MIT License. See the LICENSE file for details.