From cd7ad8d140c26acc7f1bbdcfb13282f08a8bb02b Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Thu, 19 Dec 2024 15:33:38 +0300 Subject: [PATCH] docs(README): document the next steps for the project --- README.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b1eb1ad..69cfe9c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ CompareWare is an open-source platform for comparing tools (software, hardware, - Authenticate users with Nostr keys. - **Future Features**: Reviews and a Web of Trust for collaborative insights. - ## **Getting Started** ### Prerequisites @@ -35,12 +34,77 @@ CompareWare is an open-source platform for comparing tools (software, hardware, - Create a listing component (`items_list.rs`) to display and manage added items. - Add backend functionality to validate and persist items using the Leptos framework. -2. **Review System** (To be implemented) - - Design a data model to handle reviews, including ratings, comments, and reviewer metadata. - - Build a user interface for submitting and viewing reviews linked to specific items. - - Integrate filters and sorting to display reviews based on relevance and ratings. - -3. **Nostr Integration** (In progress) +2. **Nostr Integration** (In progress) - Use Nostr events for decentralized data storage, mapping item data to specific Nostr event types. - Authenticate users through their Nostr keys for secure and decentralized access. - - Enable data sharing and synchronization with Nostr-compatible clients. \ No newline at end of file + - Enable data sharing and synchronization with Nostr-compatible clients. + + +## **Compareware: Next Steps** + +Here’s how I intend to break down the vision into actionable steps to build upon the current codebase I’ve already built: + +### **Immediate Steps** + +#### **Basic Interface (Spreadsheet-like):** +- Create a grid-based UI to represent items and their properties. +- Use rows for properties and columns for items. +- Leverage a Leptos-based table or a custom grid component for rendering. + +#### **Autocompletion for Adding Items and Properties:** +- Integrate Wikidata's search API to provide autocompletion for item and property inputs. +- Add a fallback to redirect users to the Wikidata item creation page when a search fails. + +#### **Fetching Basic Information:** +- Use Wikidata's REST API to fetch metadata for newly added items (e.g., description, tags, etc.). +- Populate these fields in the spreadsheet automatically after adding an item. + +--- + +### **Building on the Current Code** + +#### **Enhance the `ItemForm` to Allow:** +- Searching for existing items via Wikidata. +- Displaying fetched details in the form. +- Modify the `handle_submit` function to fetch and populate additional item details after submission. + +#### **Update the `App` Component to:** +- Add a placeholder grid view using Leptos’ `view!` macro. +- Render the comparison grid. +- Add functionality to fetch items' properties dynamically from Wikidata. + +#### **Add Wikidata Autocompletion:** +- Use Gloo's HTTP client to make calls to the Wikidata search API. + +--- + +### **Mid-Term Enhancements** + +#### **Editable Fields with Wikidata Sync:** +- Implement field-level editing in the grid. +- Use Wikidata's APIs to update data directly for logged-in users. + +#### **Subjective Properties with Nostr Integration:** +- Add a toggle for "objective" (Wikidata) vs. "subjective" (Nostr-backed) properties. +- Store subjective properties locally first and publish them to a Nostr relay for decentralized edits. + +#### **Cache Mechanism:** +- Use a lightweight database (e.g., SQLite or a key-value store like Redis) as a cache for frequently accessed items and properties. +- Implement cache invalidation for edits to ensure the latest data is fetched. + +--- + +### **Advanced Features** + +#### **Advanced Filtering and Sorting:** +- Add functionality to filter items by tags or properties. +- Enable sorting by property values. + +#### **Item Suggestions:** +- Based on properties and tags, suggest items for comparison. + +#### **Collaborative Comparison:** +- Enable real-time collaboration with WebSockets, allowing users to view and edit comparisons together. + +#### **Export/Share Comparison:** +- Add options to export the comparison as a CSV or share it via a unique link.