Instructions for Web Application Development: 1.Fetch HTML Code: Retrieve the full HTML…
- User
Instructions for Web Application Development:
1.Fetch HTML Code: Retrieve the full HTML code of a website using a proxy from a given URL.
2.Parse and Extract Data: Immediately parse the fetched HTML and extract data according to the provided JSON schema and example HTML structure.
3.Store Data: Store all extracted data as JSON in IndexedDB using Dexie.js asynchronously.
4.Display Extracted Data: Correctly display the extracted data on the UI correctly.
5.Book Covers Grid View: Present book covers in a grid view alongside their respective book names.
6.PDF Link Functionality: Ensure that clicking on any book cover opens the corresponding PDF link accurately.
7.No Caching: Do not implement caching mechanisms.
8.Dynamic UI Updates: Update UI data from the database async as the user scrolls.
9.Lazy Loading: Implement lazy loading correctly.
10.Data Cleanup on Close: Remove all fetched and cache data including db data when the user closes the web app.
11.Asynchronous Operations: Ensure all operations are asynchronous.
12.Simultaneous Data Handling: Extract, load, and display data asynchronously and, if possible, simultaneously.
13.No Web Workers or Frameworks: Avoid using web workers or any frameworks; rely on lightweight resources only.
14.Performance Optimization: Make the application fast and smooth, optimizing for all possible circumstances.
15.UI Design: Design a modern, visually appealing, and sleek user interface without compromising quality.
16.Error Handling: Address all potential edge cases, errors, bottlenecks, loopholes, and leaks.
17.Functionality Assurance: Ensure that all buttons and functionalities work as intended.
18.Modification Considerations: Always consider the consequences of modifications before implementing them.
19.Robustness: Enhance robustness throughout the application.
20.Data Extraction Order: Extract data in order: first book cover, then book name, followed by the PDF link; avoid duplicates in storage or display.
21.Responsive UI Elements: Ensure that all UI elements are extremely responsive across various device dimensions.
22.Animation on Scroll: Integrate an animation library for scroll effects.
23.Limit Fetch Requests: Do not make additional fetch requests if all of the required data is successfully stored in the database.
24.Data Source Management: Use only the database as the source of all required data once all of the required data is successfully stored in the database.
25.Cache Management on Exit/Refresh: Delete any cached or stored data when the user closes or refreshes the web app.
26.Retry Mechanism for Failures: Implement two retries if an image, book name, or PDF link fails to load in any circumstances.
- Assistant