SmartKaufen Service is a powerful AI-backed service aimed at making shopping convenient, affordable, and personalized for users. With a special focus on sustainability and budget considerations, the service revolutionizes the traditional shopping experience.
-
Custom shopping lists: The service curates personalized shopping lists for users based on their unique preferences and constraints. These shopping lists contain details like the product ID, name, and price of each product.
-
Budget flexibility: In addition to personalized recommendations, the service respects your budget. It provides shopping lists keeping in mind your budget restrictions, ensuring that total price doesn't exceed the set limit.
-
Batch processing support: The service is capable of handling large volumes of data efficiently. It fetches products in batches thereby ensuring optimal resource utilization.
-
Shopping list optimization: The service is capable of refining existing shopping lists by considering additional products, effectively improving and updating the shopping list according to the user's changing needs.
-
Integration with AI: The service leverages artificial intelligence to make intelligent recommendations. The data are processed through an AI server for generating shopping lists.
-
Database interaction: The service effectively retrieves existing shopping lists from the database, if any, and stores updated lists back into the database. In the absence of an existing list, a new one is created.
This project is implemented in Java using Jakarta EE, leveraging features of Lombok library for efficient coding, and Spring JdbcTemplate for handling database operations.
Before you begin, ensure you have the following installed:
- You must have a running AI model server using 'ollama'. Installation and setup instructions can be found on the ollama documentation.
The service primarily revolves around BatchProcessorService
that holds the bulk of the logic. It fetches products from the database in batches, builds the request data and passes it to the integrated AI server. The response from the AI server is processed, the shopping list is updated accordingly. Once the processing is done for all the batches, the final shopping list is stored back in the database.
Contributions, issues and feature requests are welcome!
Enjoy coding and have fun!
curl --location --request GET 'http://localhost:8080/api/send-datato-ollama3?userID=5&budget=70&days=2&people=3'
--header 'Content-Type: application/json'
--data '{}'