diff --git a/README.md b/README.md index e962b30..878bc74 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # **bitvid: Building a Nostr + WebTorrent Video Streaming Client** +##### _IPNS: k51qzi5uqu5dgwr4oejq9rk41aoe9zcupenby6iqecsk5byc7rx48uecd133a1_ + This project plan outlines the steps to build a decentralized video streaming client using **Nostr** for metadata and **WebTorrent** for video distribution. It includes technical specifications, a framework outline, and a phased approach for development. --- @@ -7,6 +9,7 @@ This project plan outlines the steps to build a decentralized video streaming cl ## **1. Overview** ### **1.1 Objectives** + 1. Enable users to upload videos by posting a magnet link along with metadata (title, description, tags, thumbnail). 2. Allow users to edit video metadata (e.g., description, thumbnail URL) without duplicating content. 3. Fetch video content via WebTorrent and display published videos on a decentralized platform. @@ -18,9 +21,11 @@ This project plan outlines the steps to build a decentralized video streaming cl ## **2. Specifications** ### **2.1 Nostr Note Specification** + We will use **Kind `30078`** for arbitrary custom app data. The note will store all video metadata, enabling discovery and categorization. Editing is supported using the `d` tag in **Replaceable Events**. #### **Nostr Event Schema** + ```json { "kind": 30078, @@ -47,6 +52,7 @@ We will use **Kind `30078`** for arbitrary custom app data. The note will store ``` #### **Fields Description** + - **kind**: `30078` (custom app data for video metadata). - **tags**: - `"d"`: Unique identifier (e.g., hash of the magnet link or custom ID) for replaceable events. @@ -66,6 +72,7 @@ We will use **Kind `30078`** for arbitrary custom app data. The note will store ## **3. Framework Outline** ### **3.1 Technologies** + - **Frontend**: React (or Vanilla JavaScript for smaller scale). - **Decentralized Protocols**: - **Nostr** for metadata storage, retrieval, and updates. @@ -75,9 +82,11 @@ We will use **Kind `30078`** for arbitrary custom app data. The note will store --- ### **3.2 Application Structure** + Organize the project into reusable components and modules to manage complexity and scalability. #### **3.2.1 Directory Structure** + ``` src/ ├── components/ # Reusable UI components @@ -105,6 +114,7 @@ src/ ### **3.3 Phases** #### **Phase 1: Core Functionality** + 1. **Input and Parse Magnet Links**: - Create `MagnetInput` to accept user input for a magnet link. - Validate the link format. @@ -119,6 +129,7 @@ src/ --- #### **Phase 2: Editing and Replaceable Events** + 1. **Enable Editing**: - Fetch the latest metadata using the unique `d` tag. - Prepopulate an editable form (`EditVideoForm`) with current metadata. @@ -130,6 +141,7 @@ src/ --- #### **Phase 3: UI Enhancements** + 1. **Reusable Layouts**: - Add `Header` and `Footer` for navigation and consistent structure. - Use `Layout` to wrap all pages. @@ -141,6 +153,7 @@ src/ --- #### **Phase 4: Performance Optimization** + 1. **Caching**: - Use `IndexedDB` or `LocalStorage` to cache fetched metadata for offline usage. 2. **Pagination or Lazy Loading**: @@ -151,6 +164,7 @@ src/ --- #### **Phase 5: Advanced Features** + 1. **Video Previews**: - Stream videos directly in the browser using WebTorrent and HTML5 `