- Add .gitignore to exclude node_modules, dist, logs, and system files - Add comprehensive project documentation including README, deployment guide, and development setup - Add .kiro project specifications for amazon-product-bar-extension, appwrite-cloud-storage, appwrite-userid-repair, blacklist-feature, and enhanced-item-management - Add .kiro steering documents for product, structure, styling, and tech guidelines - Add VSCode settings configuration for consistent development environment - Add manifest.json and babel/vite configuration for extension build setup - Add complete source code implementation including AppWrite integration, storage managers, UI components, and services - Add comprehensive test suite with Jest configuration and 30+ test files covering all major modules - Add test HTML files for integration testing and validation - Add coverage reports and build validation scripts - Add AppWrite setup and repair documentation for database schema management - Add migration guides and responsive accessibility implementation documentation - Establish foundation for Amazon product bar extension with full feature set including blacklist management, enhanced item workflows, and real-time synchronization
10 KiB
Requirements Document
Introduction
Eine Erweiterung der bestehenden Amazon Product Bar Extension, die automatische Produktdatenextraktion, KI-basierte Titel-Customization mit Mistral-AI und erweiterte Item-Verwaltung implementiert. Die Extension soll Titel und Preis automatisch extrahieren, drei KI-generierte Titelvorschläge anbieten und diese Daten als Fremdschlüssel für weitere Aktionen bereitstellen.
Glossary
- Enhanced_Item: Erweiterte Produktdaten mit Amazon-Link, extrahiertem Titel, Preis und customisiertem Titel
- Mistral_AI: KI-Service für Titel-Generierung und -Customization
- Title_Suggestions: Drei von Mistral-AI generierte alternative Titel für ein Produkt
- Settings_Panel: Konfigurationsbereich für API-Keys und andere Einstellungen
- Product_Extractor: Komponente zur automatischen Extraktion von Titel und Preis aus Amazon-Produktseiten
- API_Key: Authentifizierungsschlüssel für Mistral-AI-Service
- Custom_Title: Vom Nutzer ausgewählter, KI-generierter Titel
- Original_Title: Ursprünglicher, von Amazon extrahierter Produkttitel
- Product_Price: Aktueller Preis des Produkts auf Amazon
Requirements
Requirement 1: Automatische Produktdatenextraktion
User Story: Als Nutzer möchte ich, dass Titel und Preis automatisch aus Amazon-Produkten extrahiert werden, damit ich diese Informationen nicht manuell eingeben muss.
Acceptance Criteria
- WHEN a valid Amazon product URL is provided, THE Product_Extractor SHALL automatically extract the product title
- WHEN a valid Amazon product URL is provided, THE Product_Extractor SHALL automatically extract the current product price
- WHEN the product page cannot be accessed, THE Product_Extractor SHALL return an error message
- WHEN the title or price cannot be found, THE Product_Extractor SHALL return appropriate fallback values
- THE Product_Extractor SHALL handle different Amazon page layouts and product types
Requirement 2: Settings Panel für API-Key-Verwaltung
User Story: Als Nutzer möchte ich meinen Mistral-AI API-Key in den Einstellungen speichern können, damit die KI-Funktionen verfügbar sind.
Acceptance Criteria
- WHEN the user opens the settings, THE Settings_Panel SHALL display an input field for the Mistral-AI API key
- WHEN a valid API key is entered, THE Settings_Panel SHALL save it securely in local storage
- WHEN an invalid API key format is entered, THE Settings_Panel SHALL display a validation error
- WHEN the settings are opened, THE Settings_Panel SHALL display the currently saved API key (masked for security)
- THE Settings_Panel SHALL provide a test button to verify API key functionality
- WHEN the API key is tested, THE Settings_Panel SHALL show success or failure status
Requirement 3: Mistral-AI Integration für Titel-Generierung
User Story: Als Nutzer möchte ich drei KI-generierte Titelvorschläge erhalten, damit ich einen passenden customisierten Titel auswählen kann.
Acceptance Criteria
- WHEN a product title is extracted, THE Extension SHALL send it to Mistral-AI for customization
- WHEN Mistral-AI processes the title, THE Extension SHALL receive exactly three alternative title suggestions
- WHEN the API key is missing or invalid, THE Extension SHALL display an error message and skip AI processing
- WHEN the Mistral-AI service is unavailable, THE Extension SHALL handle the error gracefully
- THE Extension SHALL use the original title as fallback if AI processing fails
- WHEN AI processing takes longer than 10 seconds, THE Extension SHALL timeout and use fallback
Requirement 4: Titel-Auswahl Interface
User Story: Als Nutzer möchte ich aus drei Titelvorschlägen per Klick auswählen können, damit ich den besten Titel für mein Item verwende.
Acceptance Criteria
- WHEN title suggestions are available, THE Extension SHALL display all three options in a selectable list
- WHEN a title suggestion is clicked, THE Extension SHALL select it as the custom title
- WHEN a title is selected, THE Extension SHALL visually highlight the chosen option
- WHEN no title is explicitly selected, THE Extension SHALL use the first suggestion as default
- THE Extension SHALL also display the original extracted title as a fourth option
- WHEN the original title is selected, THE Extension SHALL use it without AI customization
Requirement 5: Erweiterte Item-Speicherung
User Story: Als Nutzer möchte ich Items mit Amazon-Link, Titel und Preis speichern können, damit alle relevanten Produktinformationen verfügbar sind.
Acceptance Criteria
- WHEN an item is saved, THE Extension SHALL store the Amazon product URL
- WHEN an item is saved, THE Extension SHALL store the selected custom title
- WHEN an item is saved, THE Extension SHALL store the extracted product price
- WHEN an item is saved, THE Extension SHALL store the original extracted title for reference
- THE Extension SHALL validate that all required data (URL, title, price) is present before saving
Requirement 6: Erweiterte Item-Liste Anzeige
User Story: Als Nutzer möchte ich in der Item-Liste alle gespeicherten Informationen sehen können, damit ich einen vollständigen Überblick habe.
Acceptance Criteria
- WHEN the item list is displayed, THE Extension SHALL show the custom title for each item
- WHEN the item list is displayed, THE Extension SHALL show the extracted price for each item
- WHEN the item list is displayed, THE Extension SHALL show the Amazon product URL
- THE Extension SHALL provide a way to view the original extracted title
- THE Extension SHALL display items in chronological order (newest first)
Requirement 7: Fehlerbehandlung und Fallbacks
User Story: Als Nutzer möchte ich, dass die Extension auch bei Fehlern funktioniert, damit ich meine Items trotzdem verwalten kann.
Acceptance Criteria
- WHEN Mistral-AI is unavailable, THE Extension SHALL use the original title and continue with item saving
- WHEN product extraction fails, THE Extension SHALL allow manual title and price input
- WHEN the API key is invalid, THE Extension SHALL display a clear error message with instructions
- WHEN network errors occur, THE Extension SHALL retry operations up to 3 times
- WHEN critical errors occur, THE Extension SHALL log them for debugging purposes
- THE Extension SHALL never lose user data due to API or network failures
Requirement 8: Schöne Benutzeroberfläche und Benutzererfahrung
User Story: Als Nutzer möchte ich eine schöne, intuitive und moderne Benutzeroberfläche haben, damit die Verwendung der Enhanced Item Management Funktionen angenehm und effizient ist.
Acceptance Criteria
- WHEN the Enhanced Items Panel is displayed, THE Interface SHALL use modern glassmorphism design with subtle transparency and blur effects
- WHEN users interact with elements, THE Interface SHALL provide smooth animations and visual feedback with hover states and transitions
- WHEN displaying progress during extraction, THE Interface SHALL show an elegant step-by-step progress indicator with icons and status updates
- WHEN showing item cards, THE Interface SHALL display them with beautiful card layouts including shadows, rounded corners, and proper spacing
- WHEN users hover over interactive elements, THE Interface SHALL provide clear visual feedback with color changes and subtle transformations
- THE Interface SHALL use a consistent color scheme with Amazon orange (#ff9900) as primary color and proper contrast ratios
- WHEN displaying text and content, THE Interface SHALL use proper typography hierarchy with readable fonts and appropriate sizing
- WHEN showing different states (loading, success, error), THE Interface SHALL use distinct visual indicators with appropriate colors and icons
Requirement 9: Verbesserte Interaktivität und Benutzerführung
User Story: Als Nutzer möchte ich eine intuitive Benutzerführung und klare Interaktionsmöglichkeiten haben, damit ich die Funktionen leicht verstehen und verwenden kann.
Acceptance Criteria
- WHEN users enter an Amazon URL, THE Interface SHALL provide real-time validation feedback with clear success/error indicators
- WHEN the extraction process runs, THE Interface SHALL show contextual help text explaining each step to the user
- WHEN title selection is required, THE Interface SHALL highlight the recommended option and provide clear selection guidance
- WHEN users interact with item cards, THE Interface SHALL provide contextual action buttons with clear icons and tooltips
- WHEN errors occur, THE Interface SHALL display helpful error messages with suggested next steps and recovery options
- THE Interface SHALL provide keyboard navigation support for all interactive elements
- WHEN displaying long content, THE Interface SHALL implement proper text truncation with expand/collapse functionality
- WHEN users complete actions, THE Interface SHALL provide clear success feedback with appropriate animations
Requirement 10: Responsive Design und Accessibility
User Story: Als Nutzer möchte ich, dass die Interface auf verschiedenen Bildschirmgrößen gut funktioniert und barrierefrei ist, damit ich sie überall verwenden kann.
Acceptance Criteria
- WHEN viewed on mobile devices, THE Interface SHALL adapt layout to smaller screens with stacked elements and touch-friendly buttons
- WHEN viewed on tablets, THE Interface SHALL optimize spacing and sizing for medium-sized screens
- WHEN users have accessibility needs, THE Interface SHALL provide proper ARIA labels and semantic HTML structure
- WHEN users prefer reduced motion, THE Interface SHALL respect prefers-reduced-motion settings and minimize animations
- WHEN users have high contrast preferences, THE Interface SHALL provide sufficient color contrast and alternative styling
- THE Interface SHALL support screen readers with proper heading structure and descriptive text
- WHEN users navigate with keyboard only, THE Interface SHALL provide visible focus indicators and logical tab order
- WHEN content overflows, THE Interface SHALL provide accessible scrolling with proper scrollbar styling