Open Issues Need Help
View All on GitHubAI Summary: Create a `Database` class in `services/database.py` to handle loading, saving, and creating data (users, products, orders) in a JSON file (`data/db.json`). The class should have methods to load data from the JSON file, save data to the JSON file, and create new user, product, and order entries. The initial JSON file should contain empty lists for users, products, and orders.
AI Summary: Create an OrderService class within the `services` directory. This class should manage orders, including creating new orders, retrieving existing orders, and generating order receipts (print_check). It will likely interact with the `database.py` module for data persistence and potentially utilize models from the `models` directory (e.g., `order.py`).
AI Summary: Create a `ProductService` class within the `services` directory. This class should have a `products` attribute (likely a list or other data structure to hold product data) and a `print_products` method to display the product information. The class will likely interact with the database (db.json) via the `database.py` module.
AI Summary: Create a Python class named `Order` within the `models` directory. This class should have attributes for `user`, `products`, and `order_id`. It should also include methods `to_dict` (to convert the object to a dictionary) and `from_dict` (to create an object from a dictionary). This is part of a larger e-commerce project using a JSON database.
AI Summary: Create a Python class named `Product` within the `models` directory. This class should have attributes for `product_id`, `name`, `category`, `price`, and `is_stock`. It should also include methods `to_dict` (to convert the object to a dictionary) and `from_dict` (to create an object from a dictionary). This is part of a larger e-commerce project using a JSON database.
AI Summary: Implement a 'Quit' or 'Exit' menu option in the main menu interface (`interfaces/main_menu.py`) of the OOP-Shop project. This involves adding a menu item that allows the user to gracefully exit the application, potentially saving any necessary data before termination.
AI Summary: Enhance the main menu functionality within the OOP-Shop project using the Rich library. This involves improving the visual presentation and user interaction of the home menu displayed to the user.
AI Summary: Implement an email validation function in `utils/validators.py` that checks if a given email string is valid. The function should return `True` if the email is valid and `False` otherwise. The specific validation criteria are not defined, allowing for flexibility in the implementation (e.g., basic format check, using a regular expression, or a more robust library).
AI Summary: Implement a validation function, `validate_name`, in `utils/validators.py` that checks if a given string is a valid name. The function should return `True` if the name is valid and `False` otherwise. The specific criteria for a valid name are not defined and should be determined based on common naming conventions (e.g., allowing letters, spaces, and potentially hyphens).
AI Summary: Improve the user creation interface in the OOP-Shop project. The current `create_user` method in `UserService` uses simple input prompts. The task requires refactoring this method to use a more robust and user-friendly interface, likely leveraging the `forms.py` module within the `interfaces` directory to create input forms with validation, potentially using the `validators.py` module for input checks and formatting.