From 152c7e8a00311bdfd5dbbdabfdfa17038284843b Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Thu, 18 Sep 2025 20:57:46 +0530 Subject: [PATCH 1/8] docs: add hindi translation --- content/docs/concepts/_index.hi.md | 39 ++ content/docs/concepts/defederation.hi).md | 25 ++ content/docs/concepts/lenses.hi.md | 39 ++ content/docs/concepts/threshold-funding.hi.md | 52 +++ content/docs/flagship/_index.hi.md | 33 ++ content/docs/flagship/create-lens.hi.md | 320 ++++++++++++++++ content/docs/flagship/introduction.hi.md | 16 + content/docs/flagship/production-setup.hi.md | 362 ++++++++++++++++++ content/docs/lens-sdk/_index.hi.md | 57 +++ content/docs/lens-sdk/advanced-topics.hi.md | 208 ++++++++++ content/docs/lens-sdk/api-reference (copy).md | 357 +++++++++++++++++ content/docs/lens-sdk/core-concepts (copy).md | 101 +++++ content/docs/lens-sdk/quick-start (copy).md | 128 +++++++ .../docs/lens-sdk/site-reference (copy).md | 85 ++++ 14 files changed, 1822 insertions(+) create mode 100644 content/docs/concepts/_index.hi.md create mode 100644 content/docs/concepts/defederation.hi).md create mode 100644 content/docs/concepts/lenses.hi.md create mode 100644 content/docs/concepts/threshold-funding.hi.md create mode 100644 content/docs/flagship/_index.hi.md create mode 100644 content/docs/flagship/create-lens.hi.md create mode 100644 content/docs/flagship/introduction.hi.md create mode 100644 content/docs/flagship/production-setup.hi.md create mode 100644 content/docs/lens-sdk/_index.hi.md create mode 100644 content/docs/lens-sdk/advanced-topics.hi.md create mode 100644 content/docs/lens-sdk/api-reference (copy).md create mode 100644 content/docs/lens-sdk/core-concepts (copy).md create mode 100644 content/docs/lens-sdk/quick-start (copy).md create mode 100644 content/docs/lens-sdk/site-reference (copy).md diff --git a/content/docs/concepts/_index.hi.md b/content/docs/concepts/_index.hi.md new file mode 100644 index 0000000..d790abe --- /dev/null +++ b/content/docs/concepts/_index.hi.md @@ -0,0 +1,39 @@ +--- +draft: false +title: 'अवधारणाओं' +weight: 1 +sidebar: + open: true +--- + +riff.cc कई प्रमुख अवधारणाओं के आसपास बनाया गया है जो यह परिभाषित करता है कि यह उपयोगकर्ताओं के साथ कैसे संचालित और बातचीत करता है। ये अवधारणाएं हमारी विकेन्द्रीकृत स्ट्रीमिंग सेवा और सहकारी पुस्तकालय मॉडल की नींव हैं। + +आप प्रत्येक के लिए समर्पित पृष्ठों में विशिष्ट अवधारणाओं के बारे में अधिक पढ़ सकते हैं। + +## रचनात्मक कॉमन्स + +riff.cc कानूनी रूप से मुक्त मीडिया सामग्री पर केंद्रित है, मुख्य रूप से रचनात्मक कॉमन्स के तहत लाइसेंस प्राप्त। यह उपयोगकर्ताओं को रचनाकारों के अधिकारों का सम्मान करते हुए मौजूदा कार्यों को साझा, रीमिक्स और निर्माण करने की अनुमति देता है। हम सार्वजनिक डोमेन सामग्री की भी मेजबानी करते हैं, जो सुलभ मीडिया की एक विस्तृत श्रृंखला सुनिश्चित करते हैं। + +आप रचनात्मक कॉमन्स संगठन (जिन्होंने सीसी लाइसेंस बनाए हैं) के बारे में अधिक पढ़ सकते हैं, उनकी वेबसाइट, [क्रिएवकमंस.org] (https://creativecommons.org/) पर। + +## [लेंस](/docs/concepts/lenses/) + +लेंस एक प्रमुख उदाहरण है जो एक पुस्तकालय और व्यापक नेटवर्क के गेटवे दोनों के रूप में कार्य करता है। हर लेंस कर सकते हैं: + +- अपना स्वयं का सामग्री संग्रह होस्ट करें +- अन्य लेंसों से सामग्री को प्रतिबिंबित करें +- फेडरेशन नेटवर्क में भाग लें +- यदि आवश्यक हो तो स्वतंत्र रूप से संचालित करें + +लेंस के बारे में और अधिक पढ़ें तथा अपना लेंस कैसे बनाएं, इसके बारे में [लेंस](/docs/concepts/lenses/) पृष्ठ पर पढ़ें। + +## [विकेंद्रीकृत संघ (डिफेडरेशन)](/docs/concepts/defederation/) + +पारंपरिक केंद्रीकृत प्लेटफार्मों के विपरीत, फ्लैगशिप एक फेडरेशन मॉडल का उपयोग करता है जहां: + +- विफलता का कोई एकल बिंदु मौजूद नहीं है +- सामग्री कई नोड्स में वितरित की जाती है +- प्रत्येक लेंस संसाधनों को साझा करते हुए स्वायत्तता बनाए रखता है +- प्रत्येक नए प्रतिभागी के साथ नेटवर्क मजबूत होता जाता है + +हम इसे डिफेडरेशन कहते हैं, क्योंकि लेंस को एक-दूसरे के साथ फ़ेडेरेट होने के लिए स्पष्ट रूप से सहमत होना पड़ता है। इसके बारे में [डिफ़ेडरेशन](/docs/concepts/defederation/) पृष्ठ पर और पढ़ें। diff --git a/content/docs/concepts/defederation.hi).md b/content/docs/concepts/defederation.hi).md new file mode 100644 index 0000000..6adc40d --- /dev/null +++ b/content/docs/concepts/defederation.hi).md @@ -0,0 +1,25 @@ ++++ +draft = false +title = 'अपक्षय' +weight = 1 ++++ + +डिफ्रिजरेशन (या विकेन्द्रीकृत फेडरेशन) सामग्री और समुदायों के विकेन्द्रीकृत नेटवर्क के प्रबंधन के लिए हमारी प्रणाली है। + +यह लेंस को एक दूसरे का अनुसरण करने की अनुमति देता है, तुरंत बाद के लेंस से उनकी सभी सामग्री को दोहराया जाता है। + +## उदाहरण +साइट डी निम्नलिखित साइट b (और विस्तार द्वारा साइट c) द्वारा अपने पुस्तकालय का निर्माण कर सकता है। साइट डी में अपनी सामग्री भी हो सकती है। + +A diagram showing the architecture of Flagship +A diagram showing the architecture of Flagship + +इस उदाहरण में, साइट डी में 9 सामग्री के टुकड़े होंगे, और वे सभी एक एकीकृत अनुभव में प्रदर्शित किए जाएंगे जैसे कि वे सभी एक ही पुस्तकालय का हिस्सा थे। + +## तकनीकी विवरण + +पीयरबिट का उपयोग लेंसों के बीच सिंक्रनाइज़ और फेडरेट करने के लिए किया जाता है, और यह कोर तकनीक है जो इसे संभव बनाती है। + +हमारे लेंस sdk का उपयोग इस कार्यक्षमता को सक्षम करने के लिए पीयरबिट का विस्तार करने के लिए किया जाता है। + +प्रत्येक लेंस को अपनी साइट आईडी मिलती है, जिसका उपयोग नेटवर्क पर इसकी पहचान करने के साथ-साथ अन्य लेंसों को इसका अनुसरण करने की अनुमति देने के लिए किया जाता है। \ No newline at end of file diff --git a/content/docs/concepts/lenses.hi.md b/content/docs/concepts/lenses.hi.md new file mode 100644 index 0000000..38d1177 --- /dev/null +++ b/content/docs/concepts/lenses.hi.md @@ -0,0 +1,39 @@ ++++ +draft = false +title = 'लेंस' +weight = 2 ++++ + +लेंस एक प्रमुख उदाहरण है जो एक पुस्तकालय और व्यापक नेटवर्क के गेटवे दोनों के रूप में कार्य करता है। हर लेंस कर सकते हैं: + +- अपनी स्वयं की सामग्री होस्ट करें +- अन्य लेंसों का अनुसरण करें +- अन्य लेंसों द्वारा अनुसरण किया जाएगा + +यह कैसे काम करता है। + +## लेंस बनाना +अपना लेंस बनाना आसान है। इसमें प्रमुख सॉफ्टवेयर डाउनलोड और कॉन्फ़िगर करना शामिल है। + +हम जल्दी से शुरू होने के लिए एक डॉकर सेटअप भी प्रदान करते हैं। + +विस्तृत निर्देश के लिए [लैंस बनाएँ](/docs/flagship/create-lens/) पृष्ठ पर जाएँ। + +एक बार जब आपने अपना लेंस बनाया है, तो आप अन्य लोगों को अपना साइट आईडी दे सकते हैं। + +## निम्नलिखित लेंस +आप अपने लेंस को अन्य लेंस के साथ भी बना सकते हैं। + +आप जिस लेंस का अनुसरण करना चाहते हैं उसके साइट आईडी की नकल करें, और अपने लेंस के *admin * सेक्शन पर जाएं, फिर *subscriptions *. + +जिस लेन्स का आप अनुसरण करना चाहते हैं उसका साइट आईडी चिपकाएँ, और *सबसिब्सक्राइब * पर क्लिक करें। + +![Adding a subscription](/images/docs/concepts/follow-a-lens.png) + +इसे जोड़ने के बाद, आप इसे सदस्यता की सूची में दिखाई देंगे। + +एक बार जब आप सदस्यता जोड़ लेंगे, तो आपके लेंस में आने वाले लेंस की सामग्री दिखाई देगी। + +![Adding a subscription](/images/docs/concepts/follow-a-lens-2.png) + +लेंस को अनफॉलो करने के लिए, बस उस लेंस के बगल में रद्दी आइकन पर क्लिक करें जिसे आप अनफॉलो करना चाहते हैं। \ No newline at end of file diff --git a/content/docs/concepts/threshold-funding.hi.md b/content/docs/concepts/threshold-funding.hi.md new file mode 100644 index 0000000..35b034f --- /dev/null +++ b/content/docs/concepts/threshold-funding.hi.md @@ -0,0 +1,52 @@ ++++ +draft = false +title = 'थ्रेशोल्ड फंडिंग' ++++ + +कल्पना कीजिए: एक बैंड एक रिकॉर्ड बनाना चाहता है। उन्हें स्टूडियो समय, मिश्रण, मास्टरिंग और उत्पादन लागत को कवर करने के लिए $50के की आवश्यकता है। पारंपरिक विकल्प? लेबल के अधिकारों पर हस्ताक्षर करें, एक क्राउडफंडिंग अभियान शुरू करें और सर्वश्रेष्ठ के लिए उम्मीद करें, या ऋण में जाएं। + +थ्रेसहोल्ड फंडिंग इस दुविधा का एक विकल्प प्रस्तुत करता है, उपयोगकर्ताओं को सीधे कलाकारों का समर्थन करने की अनुमति देता है, और ऐसा करने के लिए पुरस्कार कमाते हैं। + +## यह काम किस प्रकार करता है + +बैंड अपने प्रोजेक्ट को "आगामी" के रूप में रिफ़ पर पोस्ट करता है, डेमो, लाइव रिकॉर्डिंग और एल्बम के लिए अपने दृष्टिकोण को साझा करता है। प्रशंसक कलाकार की सदस्यता $10 प्रति वर्ष देकर ले सकते हैं। यहाँ दिलचस्प बात यह है: + +- जब पर्याप्त लोग 50 हजार डॉलर की सीमा तक पहुंच जाते हैं, तो उत्पादन शुरू हो जाता है +- फंडिंग अवधि के दौरान सदस्यता लेने वाले प्रत्येक व्यक्ति को एल्बम रिलीज़ होने पर उच्च गुणवत्ता में स्वचालित रूप से प्राप्त होगा +- बैंड पूर्ण रचनात्मक नियंत्रण और स्वामित्व बनाए रखता है + +## कॉमन्स ट्विस्ट + +लेकिन इसमें क्रांतिकारी बात यह है कि बैंड ने 250 हजार डॉलर की कमाई होने पर रिकॉर्ड को क्रिएटिव कॉमन्स (गैर-वाणिज्यिक) के तहत स्वतः जारी करने का वचन दिया है। + +इसका मतलब यह है: +- बैंड ने सीमा के बाद भी रिफ़ की बिक्री जारी रखी +- जब उनकी कुल कमाई 250,000 डॉलर तक पहुँच जाएगी, तो एल्बम गैर-व्यावसायिक उपयोग के लिए कानूनी रूप से मुफ़्त हो जाएगा +- संगीत आम लोगों तक पहुंचता है, हमारी साझा संस्कृति को समृद्ध करता है +- बैंड को उनके काम के लिए उचित मुआवजा दिया गया है, और वे एल्बम की भौतिक और संग्रहणीय प्रतियां बेचना जारी रख सकते हैं, साथ ही भविष्य की परियोजनाओं के लिए भी इसी तरह धन जुटा सकते हैं। + +## प्लेटफ़ॉर्म योगदान + +कलाकार और प्रशंसक दोनों अपनी सेटिंग्स में योगदान स्लाइडर के माध्यम से मंच का समर्थन करना चुन सकते हैं। + +यह प्लेटफ़ॉर्म योगदान **वैकल्पिक** है और **स्पष्ट रूप से ऑप्ट-इन** है - डिफ़ॉल्ट रूप से, हम किसी भी कमाई का 0% लेते हैं। + +**कलाकार योगदान मॉडल:** +- यदि 100 कलाकार प्रतिवर्ष 50 हजार डॉलर जुटाते हैं: कलाकार निधि में 50 मिलियन डॉलर +- यदि 5% कलाकार 5% प्लेटफ़ॉर्म योगदान निर्धारित करते हैं: $125K प्लेटफ़ॉर्म राजस्व +- इससे लगभग 1-2 मिलियन उपयोगकर्ताओं के उपयोगकर्ता समुदाय को स्थायी रूप से समर्थन मिल सकता है। + +**उपयोगकर्ता योगदान मॉडल:** +- 1 मिलियन उपयोगकर्ता × $50 औसत वार्षिक व्यय × 5% प्लेटफ़ॉर्म कटौती × 5% भागीदारी = अतिरिक्त $125K प्लेटफ़ॉर्म राजस्व +- कलाकारों के योगदान के साथ, यह मंच मामूली भागीदारी दरों पर पूरी तरह से टिकाऊ बन जाता है + +##यह क्यों काम करता है + +1. **कलाकार जीतते हैं**: प्रत्यक्ष वित्तपोषण, रचनात्मक नियंत्रण, उचित मुआवजा +2. **प्रशंसकों की जीत**: कलाकारों का सीधे समर्थन करें, विशेष प्रारंभिक पहुँच प्राप्त करें +3. **संस्कृति की जीत**: समय के साथ अधिक संगीत आम लोगों तक पहुँचता है +4. **प्लेटफ़ॉर्म की जीत**: रचनाकारों का शोषण किए बिना स्थायी राजस्व + +यह सिर्फ़ एल्बमों के लिए धन जुटाने की बात नहीं है। यह एक ऐसी अर्थव्यवस्था बनाने की बात है जहाँ रचनात्मक कार्यों को महत्व दिया जाए, कलाकारों को उचित पारिश्रमिक मिले, और संस्कृति अंततः साझा हो। जहाँ सफलता सिर्फ़ डॉलर में नहीं, बल्कि इस बात से मापी जाए कि हम आम जनता को कितनी कला लौटाते हैं। + +सीमांत वित्तपोषण मॉडल पारंपरिक "सभी अधिकार सुरक्षित" प्रणाली को "सभी अधिकार सुरक्षित, फिर कुछ अधिकार सुरक्षित" में बदल देता है - जिससे उचित मुआवजा और सांस्कृतिक समृद्धि दोनों सुनिश्चित होती है। diff --git a/content/docs/flagship/_index.hi.md b/content/docs/flagship/_index.hi.md new file mode 100644 index 0000000..2bcacce --- /dev/null +++ b/content/docs/flagship/_index.hi.md @@ -0,0 +1,33 @@ +--- +date: '2025-07-07T15:37:53+01:00' +draft: false +title: 'फ्लैगशिप' +weight: 5 +sidebar: + open: true +--- + +फ्लैगशिप हमारा विकेन्द्रीकृत पुस्तकालय मंच है जो समुदायों को अपने स्वयं के असंपीड़ित डिजिटल पुस्तकालयों का निर्माण और रखरखाव करने की अनुमति देता है। + +यह देखने, साझा करने, वितरित करने और कानूनी रूप से मुक्त मीडिया सामग्री को क्यूरेट करने के लिए एक विकेन्द्रीकृत मीडिया मंच का एक स्पष्ट कार्यान्वयन है। + +वेब तैनाती क्षमताओं के साथ एक इलेक्ट्रॉन अनुप्रयोग के रूप में निर्मित, यह नेटफ्लिक्स और यूट्यूब जैसे केंद्रीकृत प्लेटफार्मों के उपयोगकर्ता अनुभव को पीयर-टू-पीयर नेटवर्क के विकेंद्रीकृत आर्किटेक्चर के साथ जोड़ता है। + +यह सॉफ्टवेयर उपयोगकर्ताओं को इस प्रकार सक्षम करता है: + +* अपलोड और मीडिया सामग्री साझा करें (ऑडियो, वीडियो, किताबें और अधिक) +* वर्गीकरण और विशिष्ट सामग्री प्रणालियों के माध्यम से सामग्री की खोज +* सामग्री साझा करने वाले नोड्स के फेडरेटेड नेटवर्क में भाग लें +* व्यापक नेटवर्क से संपर्क बनाए रखते समय स्व-होस्ट उदाहरण + +## तंत्र वास्तुकला अवलोकन + +फ्लैगशिप एक हाइब्रिड आर्किटेक्चर लागू करता है जो एक डेस्कटॉप इलेक्ट्रॉन अनुप्रयोग और एक वेब अनुप्रयोग दोनों के रूप में संचालित हो सकता है, जो पीयर-टू-पीयर नेटवर्किंग प्रौद्योगिकियों की नींव पर बनाया गया है। + + +A diagram showing the architecture of Flagship +A diagram showing the architecture of Flagship + +## Credits: +* रिफ सीसी योगदानकर्ता अतीत और वर्तमान। +दीपविकी (https://deepwiki.com/riffcc/flagship) (https://deepwiki.com/rifcc/flagship) द्वारा तैयार की गई कुछ जानकारी। एक उत्कृष्ट सेवा प्रदान करने के लिए संज्ञानात्मक के लिए धन्यवाद। \ No newline at end of file diff --git a/content/docs/flagship/create-lens.hi.md b/content/docs/flagship/create-lens.hi.md new file mode 100644 index 0000000..48ba530 --- /dev/null +++ b/content/docs/flagship/create-lens.hi.md @@ -0,0 +1,320 @@ ++++ +date = '2025-07-07T15:37:53+01:00' +draft = false +title = 'लेंस बनाएँ(त्वरित प्रारंभ)' +weight = 2 ++++ + +अपने लेंस बनाने के लिए, आपको एक डोमेन नाम की आवश्यकता होगी (एक सबडोमैन काम कर सकता है!) और एक होस्टिंग प्रदाता। + +यह प्रक्रिया सरल है और कमांड लाइन के साथ आपके कम्फर्ट लेवल के आधार पर इसे पूरा करने में लगभग 10-30 मिनट लगते हैं। + +{{< callout type="info"emoji="🌐" >}} +हम बाद में किफायती लेंस होस्टिंग सेवाओं की पेशकश करने की योजना बना रहे हैं। + +हम ओपन सोर्सिंग सॉफ्टवेयर भी तैयार करेंगे ताकि किसी को भी अपना लेंस होस्टिंग प्रदाता चलाने की अनुमति मिल सके।{{< /callout >}} + +हम hetzner या digitalocean का उपयोग करके सुझाव देते हैं, लेकिन किसी भी प्रदाता के बारे में काम करेगा। + +आप अपने लेंस की स्वयं-मेजबान भी कर सकते हैं, लेकिन आपको कमांड लाइन के साथ सहज रहने की आवश्यकता होगी और आपको एक सर्वर स्थापित करने के बारे में बुनियादी समझ होगी। + +## अपने डोमेन की स्थापना + +अपने सर्वर के आईपी एड्रेस पर अपने डोमेन नाम या सबडोमैन को a या aaaa dns रिकॉर्ड का उपयोग करके इंगित करें। + +आप अपने होस्टिंग प्रदाता के साथ इस बारे में जानकारी के लिए जांच कर सकते हैं कि यह कैसे किया जाए, या हमें मदद के लिए पूछ सकते हैं। + +## Preparation + +शुरू होने से पहले आपको थोड़ा काम करना होगा। + +### Dependencies +फ्लैगशिप स्थापित करने से पहले, आपको निम्नलिखित निर्भरता स्थापित करनी चाहिए: + +```sh +sudo apt install libnss3-dev libgtk-3-0 libgbm1 libasound2-dev libatk1.0-0 node-pre-gyp git curl +``` + +### Node.js + +आपको नोड. js स्थापित करने की भी आवश्यकता होगी। + +हम सुझाव देते हैं [नोडसोर्स इंस्टॉलेशन गाइड] (https://github.com/nodessource/distribution#installation-instructions) का उपयोग करके। + +1. नोड रिसोर्स जीपीजी कुंजी डाउनलोड और आयात करें + +```sh +sudo apt-get update +sudo apt-get install -y ca-certificates curl gnupg +sudo mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +``` + +2. डेब रिपोजिटरी बनाएँ + +```sh +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list +``` + +3. अद्यतन चलायें और नोड संस्थापित करें. js पैकेज + +```sh +sudo apt-get update +sudo apt-get install nodejs -y +``` + +4. आधिकारिक पीएनपीएम संस्थापना स्क्रिप्ट डाउनलोड करें: + +```sh +curl -fsSL https://get.pnpm.io/install.sh | sh - +``` + +2. अपने .bashrc फ़ाइल को स्रोत करें तो आपका तंत्र pnpm के पथ को ठीक से पहचानता है (या zshp उपयोगकर्ताओं के लिए zshrc, आदि) : + +```sh +source ~/.bashrc +``` + +### Git + +आपको जीआईटी इंस्टॉल करना होगा। अधिकांश सिस्टम पहले से ही इसके साथ आएंगे, लेकिन यदि नहीं, तो आप इसे इसके साथ इंस्टॉल कर सकते हैं: + +```sh +sudo apt-get install git -y +``` + +## Installing the Lens Node + +Use `pnpm` to install the Lens Node. + +```sh +pnpm install -g @riffcc/lens-node +``` + +यदि प्रेरित किया जाता है, तो `pnpm rign-builds-g` को भी चलाया जाता है ताकि निर्भरता को ठीक से बनाया जा सके। +``` +विंग्स@blackber सभी के लिए, इनवर्ट चयन करने के लिए) @ipshiphips/node-dod-dadachanel, बेहतर क्लासिक-स्तर के रूप में जाना जाता है। क्या आप सहमत हैं? · सच +.pnpm/@ipshipyard+node-datachanel@0.26.6/node_modules/@ipshipयार्ड/node-datachanel: रनिंग इंस्टाल स्क्रिप्ट, 98m में किया गया है.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3: रनिंग इंस्टाल स्क्रिप्ट 71m में की गई.pnpm/classic-level@3.0/node_dellease/iclease/cleaseclease/cleaseping स्क्रिप्ट 46ms + +## लेंस कॉन्फ़िगर करना + +1. **लेंस नोड सेटअप करेंः** + पहला कदम अपने नोड को इनिशियलाइज़ करना है। यह एक डेटा निर्देशिका का निर्माण करेगा, आवश्यक क्रिप्टोग्राफिक पहचान उत्पन्न करेगा, और एक कॉन्फ़िगरेशन फ़ाइल तैयार करेगा। + + ```बैश + लेंस-नोड सेटअप + ``` + + यह कमांडः + - / / lens-node पर एक निर्देशिका बनाएँ (या एक कस्टम पथ अगर `-dir') के साथ निर्दिष्ट है। + - यदि निर्देशिका पहले से मौजूद है, तो यह आपको फिर से कॉन्फ़िगर करने के लिए प्रेरित करेगा। + - पीयरबिट क्लाइंट और लेंस साइट को आरंभीकृत करें. + - विन्यास सहेजें, लेंस साइट पता सहित, में`कॉन्फ़िगरेशन.जेसन` डेटा निर्देशिका के भीतर. + - अपने पीयर आईडी, सार्वजनिक कुंजी और साइट पता जैसे महत्वपूर्ण विवरण छापें। + + {{< callout emoji="🐉" >}} + आप के बारे में चेतावनी देख सकते हैं "नोड निर्देशिका "/home/$USER/.lens-node" already exists" भले ही आपने पहले कभी लेंस नहीं बनाया हो। + + यह लेंस नोड में एक बग है, और *फर्स्ट टाइम* के लिए लेंस बनाने के दौरान सुरक्षित रूप से उपेक्षित किया जा सकता है। इसे भविष्य में जारी किया जाएगा। + + बस संकेत का उत्तर "हां" दें, और सेटअप जारी रहेगा। + {{< /callout >}} + + पेश है आउटपुट का उदाहरण: + + ``` + wings@blackberry:~$ lens-node सेटअप + ✔ नोड निर्देशिका "/home/wings/.lens-node" पहले से मौजूद है। क्या आप सेटअप के लिए इसे पुनः कॉन्फ़िगर करना चाहते हैं? यह क्रिया अपरिवर्तनीय है। हाँ + नोड निर्देशिका साफ़ हो गई है और नए कॉन्फ़िगरेशन के लिए तैयार है: /home/wings/.lens-node + [साइट] एक्सेस कंट्रोलर खुले: 334.832ms + [साइट] डेटा स्टोर खुले: 114.121ms + [साइट] कुल खुला समय: 449.201ms + + लेंस नोड सेटअप पूर्ण! + -------------------------------------------------- + नोड निर्देशिका: /home/wings/.lens-node + कॉन्फ़िगरेशन यहाँ सहेजा गया: /home/wings/.lens-node/config.json + पीयर आईडी: 12D3KooWAo2AC2Aga6gxon6Fd8jXMoxRtBkQrBBK3hsuQs3wtnNT + नोड सार्वजनिक कुंजी: ed25119p/0e837b3358453b3384ba0a86701e440e79b009fba4f010b0a944f054df21b8c8 + साइट पता: zb2rhjCvmPfrgmgjGvnsYLQpzwbLGgvDWs2AsJp5qN4Zxwt7Z + -------------------------------------------------- + आप अब अपना नोड चला सकते हैं: लेंस-नोड रन + ``` + + साइट पता सहेजें, जैसा कि आपको बाद में इसकी आवश्यकता होगी। (अगर आप भूल जाते हैं तो आप इसे हमेशा एस्बेस्टस-नोड/config.json में पा सकते हैं)। +2. **Start your Lens Node:** + To start your node, run: + + ```bash + lens-node run + ``` + + यह नोड डेमॉन शुरू करेगा, पीयरबिट नेटवर्क से कनेक्ट होगा, और आपके लेंस साइट को खोल देगा। एक इंटरएक्टिव टर्मिनल खुलेगा, और आप इसे अपने नोड प्रबंधित करने के लिए उपयोग कर सकते हैं। + + हम एक स्क्रीन या tmux सत्र में नोड चलाने का सुझाव देते हैं, ताकि यह पृष्ठभूमि में चल रहा है अगर आप टर्मिनल को बंद करते हैं। + + बाद में उपयोग के लिए `ws` सुनने का पता कॉपी करें - उदाहरण के लिए, `/ip4/127.0.0.1/tcp/8002/ws/p2p/12D3KooWAo2AC2Aga6gxon6Fd8jXMoxRtBkQrBBK3hsuQs3wtnNT`. + +## फ्लैगशिप की स्थापना + +1. क्लोन फ्लैगशिप के जीथूब रिपोजिटरी: + ```sh + git clone https://github.com/riffcc/flagship.git + ``` + +2. फ्लैगशिप निर्देशिका में जाएं और इसकी संस्थापना निर्भरता सेट करें: + ```sh + cd flagship + pnpm install + ``` + +`.env.example` फाइल को `.env` में नक़ल करें: + ```sh + cp .env.example .env + ``` + +4. `.env फाइल को संपादित करें `vite_site_adress ` चर को पहले सहेजे गए साइट पते पर सेट करने के लिए. 'vite_botstrapers' चर को `ws' श्रवण पता में सेट करें जिसे आपने पहले कॉपी किया था।. + +5. अनुप्रयोग को विकास मोड में चलाएँ (हॉट रीलोडिंग के साथ): + ```sh + pnpm watch:web + ``` + +6. अपने ब्राउज़र में अनुप्रयोग पर जाएँ `http://localhost:5175/#/account`. + +7. अब आपको प्रमुख अनुप्रयोग देखना चाहिए।. + + ![फ्लैगशिप एप्लिकेशन](/images/docs/flagship/installing-flagship-account.png) + + {{< callout emoji="🐉" >}} + आप सुरक्षित रूप से पृष्ठ के नीचे पर लागू "नहीं की गई चेतावनी" को अनदेखा कर सकते हैं। + {{< /callout >}} + +8. सार्वजनिक कुंजी के नीचे "सार्वजनिक कुंजी" को अपने क्लिपबोर्ड पर नक़ल करने के लिए क्लिक करें. + +## एडमिन अकाउंट बनाना + +आपके लेंस होस्ट करने वाले सर्वर पर `> खाता क्रिया को प्राधिकृत करें. +``` +लेंस नोड चल रहा है। नीचे दिए मेनू को रोकने या उपयोग करने के लिए कंट्रोल+c दबाएं.-------------------------------------------------- +नोड निर्देशिका: /home/wings/.lens-node +पीयर आईडी: 12D3KooWAo2AC2Aga6gxon6Fd8jXMoxRtBkQrBBK3hsuQs3wtnNT +नोड सार्वजनिक कुंजी: ed25119p/0e837b3358453b3384ba0a86701e440e79b009fba4f010b0a944f054df21b8c8 +साइट पता: zb2rhjCvmPfrgmgjGvnsYLQpzwbLGgvDWs2AsJp5qN4Zxwt7Z +सुन रहा है: [ +"/ip4/127.0.0.1/tcp/8002/ws/p2p/12D3KooWAo2AC2Aga6gxon6Fd8jXMoxRtBkQrBBK3hsuQs3wtnNT", +"/ip4/127.0.0.1/tcp/8001/p2p/12D3KooWAo2AC2Aga6gxon6Fd8jXMoxRtBkQrBBK3hsuQs3wtnNT" +] +-------------------------------------------------- +? क्रियाएँ: (तीर कुंजियों का उपयोग करें) +❯ खाता अधिकृत करें +────────────── +सदस्यताएँ प्रबंधित करें +────────────── +नोड बंद करें +``` + +एंटर दबाएं, फिर पहले कॉपी की गई सार्वजनिक कुंजी पेस्ट करें: + +``` +✔ क्रियाएँ: खाता अधिकृत करें +✔ खाते की स्ट्रिंग सार्वजनिक कुंजी दर्ज करें: ed25119p/1a1b2a241f1734f6088fa4715bc763f448dbbf0d1ab8c100a959dec765ba5a58 +? खाता प्रकार चुनें (तीर कुंजियों का उपयोग करें) +❯ सदस्य +व्यवस्थापक +``` + + तीर कुंजियों से "ऐड्मिन" चुनें, फिर प्रवेश करना + दबाएँ। + +आपको सफलता का संदेश देखना चाहिए: +``` +2025-07-15 23:13:41.822 [info] खाता सफलतापूर्वक प्राधिकृत +{ + "सार्वजनिक कुंजी": "ed25119p/1a1b2a241f1734f6088fa4715bc763f448dbbf0d1ab8c100a959dec765ba5a58", + "खाता प्रकार": "ऐड्मिन" +} +``` + + अपने ब्राउज़र में फ्लैगशिप एप्लिकेशन को रिफ्रेश करें। आप अब एक होना चाहिए "ऐड्मिन" टैब. + +## लेंस का प्रबंधन +### अपने लेंस में सामग्री जोड़ें + +अब समय आ गया है कि आप अपनी सामग्री का पहला टुकड़ा निकाल लें! एक उदाहरण के रूप में, हम **rip: एक रीमिक्स घोषणापत्र ** फिल्म, एक कानूनी रूप से मुक्त वृत्तचित्र रीमिक्स संस्कृति के बारे में अपलोड करेंगे। + +1.क्लिक करें "अपलोड" बटन टॉप मेन्यू में + +2. नाम भरें, जैसे कि "RiP: एक रीमिक्स घोषणापत्र". + +3.इस मामले में एक सामग्री cid दर्ज करें "QmTWWUmvC9txvE7aHs9xHd541qLx3ax58urvx3Kb3SFK2Q". + +4. "फ़िल्में" श्रेणी का चयन करें. + +5. लघुछवि सीआईडी सेट करें "Qmb3eeESRoX5L6NhTYLEtFFUS1FZgqe1e7hdBk2f57DUGh". + +6. क्लिक करें "अपलोड" बटन. + +अब आप अपने लेंस में फिल्म देखना चाहिए अगर आप "फिल्म" टैब. + +### सामग्री की विशेषता + +आप अपने लेंस के फ्रंट पेज पर कंटेंट दिखा सकते हैं। + +1. क्लिक करें "एडमिन" शीर्ष मेनू में टैब. + +2. क्लिक करें "सामग्री" एडमिन पैनल के बाईं मेनू में टैब. + +3. क्लिक करें "फीचर" आप अपलोड की गई फिल्म के बगल में बटन (ए प्लस साइन के साथ स्टार) + +आपको * नए विशेष रिलीज़ * पेज पर ले जाया जाएगा। + +"प्रचारित" स्लाइडर को सेट किया जाएगा "हाँ" डिफ़ॉल्ट रूप से। प्रमोटेड कंटेंट हीरो स्लाइडर में फ्रंट पेज पर दिखाई देगा, जबकि सामान्य विशिष्ट सामग्री अभी भी सामने वाले पृष्ठ पर दिखाई देगी लेकिन कम जोर के साथ। + +4. क्लिक करें "बनाएं" प्रदर्शित रिलीज़ बनाने के लिए बटन. + +अब आपको अपने लेंस के फ्रंट पेज पर फिल्म देखना चाहिए! + +![लेंस का मुखपृष्ठ](/images/docs/flagship/frontpage-generic.png) + +### किसी विशेष रिलीज़ में विवरण जोड़ना + +{{< callout emoji="🚧" >}} +यह खंड निर्माणाधीन है। +{{< /callout >}} + +आप प्रदर्शित रिलीज़ में क्लिक करके अधिक विवरण जोड़ सकते हैं"संपादन करना" प्रदर्शित रिलीज़ के बगल में बटन, फिर क् "उन्नत" टैब पर क्लिक करें। + + +यह आपको प्रदर्शित रिलीज़ में एक विवरण, टैग और अन्य विवरण जोड़ने की अनुमति देगा। + +जब हीरो स्लाइडर पर एक विशेष रिलीज को बढ़ावा दिया जाता है तो आप थंबनेल सीआईडी के बजाय प्रदर्शित की जाने वाली एक बैनर छवि भी जोड़ सकते हैं। + +## अगले कदम + +### हमारे समुदाय में शामिल हों + +हमारे पास एक विघ्न सर्वर है जहां आप प्रश्न पूछ सकते हैं, अपने लेंस साझा कर सकते हैं, और समुदाय से मदद प्राप्त कर सकते हैं। + +[हमारे डिस्कॉर्ड सर्वर से जुड़ें](https://discord.gg/cvYgQSfCrQ) + +### लेंस का अनुसरण करें (वैकल्पिक) + +लेंस चलाने के सबसे अच्छे हिस्सों में से एक अन्य लेंस का अनुसरण करने और उनकी सामग्री को देखने में सक्षम है। + +आप जिस लेंस का अनुसरण करना चाहते हैं उसके साइट आईडी की नकल करें, और अपने लेंस के *व्यवस्थापक* सेक्शन पर जाएं, फिर *सदस्यता *. + +जिस लेन्स का आप अनुसरण करना चाहते हैं उसका साइट आईडी चिपकाएँ, और *सबसिब्सक्राइब * पर क्लिक करें। + +{{< callout type="info" emoji="ℹ️" >}} +वर्तमान riff.cc लेंस की साइट आईडी `zb2rhogguxkanjy47dvrplrppt84mwvwuvekuhmcg7nkhtcn' है, यदि आप कुछ अनुसरण करना चाहते हैं।{{< /callout >}} + +![सदस्यता जोड़ना](/images/docs/concepts/follow-a-lens.png) + +इसे जोड़ने के बाद, आप इसे सदस्यता की सूची में दिखाई देंगे। + +एक बार जब आप सदस्यता जोड़ लेंगे, तो आपके लेंस में आने वाले लेंस की सामग्री दिखाई देगी। + +अरे! [एक सदस्यता जोड़ें](/images/docs/concepts/follow-a-lens-2.png) + +लेंस को अनफॉलो करने के लिए, बस उस लेंस के बगल में रद्दी आइकन पर क्लिक करें जिसे आप अनफॉलो करना चाहते हैं। \ No newline at end of file diff --git a/content/docs/flagship/introduction.hi.md b/content/docs/flagship/introduction.hi.md new file mode 100644 index 0000000..d9eefd6 --- /dev/null +++ b/content/docs/flagship/introduction.hi.md @@ -0,0 +1,16 @@ ++++ +title = 'परिचय' +weight = 1 ++++ + +प्रमुख एक अप्रतिरोध्य पुस्तकालय का संदर्भ कार्यान्वयन है - डिजिटल सामग्री को साझा करने और संरक्षित करने के लिए एक विकेन्द्रीकृत मंच जो सेंसर या बंद नहीं किया जा सकता है। + +चूंकि प्रत्येक लेंस को अन्य लेंसों की किसी भी संख्या द्वारा दोहराया जा सकता है या प्रतिबिंबित किया जा सकता है, इसलिए फ्लैगशिप एक स्व-हीलिंग, सेंसरशिप-प्रतिरोधी तरीका प्रदान करता है जो प्रकाशन और साझा करता है। जब तक अन्य समुदायों के पास प्रतियां होती हैं, व्यक्तिगत लेंस के नुकसान से उस सामग्री की उपलब्धता प्रभावित नहीं होती है। + +यह एक वेब इंटरफेस (और बाद में, डेस्कटॉप और मोबाइल के लिए इलेक्ट्रॉन ऐप) प्रदान करता है जो अपने स्वयं के लेंस को बनाने, प्रबंधित करने और साझा करने के लिए - एक प्रमुख उदाहरण है जो अन्य लेंस से सामग्री को दर्पण कर सकता है और विकेंद्रीकृत फेडरेशन नेटवर्क में भाग ले सकता है। + +## शुरू करना + +अपने खुद के अजेय पुस्तकालय बनाने के लिए तैयार? देखें: + +- [एक लेंस बनाएँ](/docs/flagship/create-lens) - अपने पहले लेंस को लॉन्च करने के लिए क्विक स्टार्ट गाइड \ No newline at end of file diff --git a/content/docs/flagship/production-setup.hi.md b/content/docs/flagship/production-setup.hi.md new file mode 100644 index 0000000..af1bd19 --- /dev/null +++ b/content/docs/flagship/production-setup.hi.md @@ -0,0 +1,362 @@ ++++ +date = '2025-07-07T15:37:53+01:00' +draft = false +title = 'उत्पादन सेटअप' +weight = 3 ++++ + +### **उत्पादन: लेंस नोड के साथ एक प्रमुख उदाहरण लागू करना** + +यह गाइड आपको एक उत्पादन के लिए तैयार प्रमुख उदाहरण तैनात करने के माध्यम से चलेगा, जिसमें एक सर्वर की स्थापना, डीएनएस का विन्यास, इसे एसएसएल के साथ सुरक्षित करना, और एक निरंतर टर्मिनल सत्र में लेंस नोड चलाना शामिल है। + +### **प्रीरेक्वज़ट** + +* एक सर्वर इंस्टैंस (जैसे, aws ec2 या digitalocean droopplet) जो उबुन्टू 22.04 जैसे आधुनिक लिनक्स वितरण का संचालन करता है * **अनुशंसित स्पेसिफिकेशन:** 2+ CPU Cores, 4GB+ RAM. +* एक पंजीकृत डोमेन नाम(e.g., `your-domain.com`). +* अपने डोमेन के dns प्रबंधन पैनल तक पहुँच।. +* आपके सर्वर पर संस्थापित निम्न सॉफ्टवेयर: + * [Node.js](https://nodejs.org/) + * [pnpm](https://pnpm.io/installation) + * [Git](https://git-scm.com/downloads) + * [Nginx](https://www.nginx.com/) + * [Screen](https://www.gnu.org/software/screen/) (`sudo apt install screen`) + +--- + +### **पार्ट 1: सर्वर और डोमेन कॉन्फ़िगरेशन** + +यह अनुभाग आपके सर्वर, dns और ssl प्रमाणपत्र के आरंभिक सेटअप को कवर करता है. + +#### **स्टेप 1: अपने डोमेन को सर्वर पर इंगित करें** + +अपने डीएनएस प्रदाता नियंत्रण पैनल में, अपने सर्वर के सार्वजनिक आईपी पते की ओर इंगित करने वाले दो `a `. रिकॉर्ड बनाएं: + +1. आपके मुख्य डोमेन के लिए एक `A` रिकॉर्ड: +* **प्रकार:** `A` +* **नाम/होस्ट:** `@` (या `your-domain.com`) +* **मान/इसकी ओर इंगित करता है:** `your-server-ip` + +2. लेंस नोड उपडोमेन के लिए एक `A` रिकॉर्ड: +* **प्रकार:** `A` +* **नाम/होस्ट:** `lens` +* **मान/इसकी ओर इंगित करता है:** `your-server-ip` + +> **टिप्पणी:** डीएनएस परिवर्तन को प्रचारित करने में कुछ समय लग सकता है।. + +#### **step 2: nginx इंस्टॉल करें और ssl प्रमाणपत्र प्राप्त करें** + +1. **nginx और certbot संस्थापित करें:** + ```बैश + sudo apt update + sudo apt install nginx certbot python3-certbot-nginx + ``` + +2. ssl प्रमाणपत्र हम अपने दोनों डोमेन के लिए प्रमाणपत्र प्राप्त करने के लिए सीईआरटी का उपयोग करेंगे। यह कमांड अस्थायी रूप से nginx को सत्यापन के लिए पोर्ट 80 को मुक्त करने के लिए रोक देगा। + ```बैश + sudo systemctl stop nginx + sudo certbot certonly --standalone -d your-domain.com -d lens.your-domain.com + ``` + प्रक्रिया पूरी करने के लिए प्रांप्ट्स का पालन करें। एक बार समाप्त हो जाने के बाद, certbot आपके प्रमाणपत्र फ़ाइलें बना देगा।. + +#### **स्टेप 3: nginx कॉन्फ़िगर करें** + +अब हम आपके फ्लैगशिप साइट और लेंस नोड के प्रॉक्सी अनुरोध को पूरा करने के लिए nginx विन्यास फ़ाइलें बनाएंगे।. + +1. **अपने प्रमुख साइट के लिए nginx विन्यास बनाएँ:** + ```बैश + sudo nano /etc/nginx/sites-available/your-domain.com + ``` + your-domain.com` को अपने वास्तविक डोमेन से बदलकर निम्नलिखित पेस्ट करें: + ```nginx + सर्वर { + listen 80; + server_name your-domain.com; + # सभी HTTP अनुरोधों को HTTPS पर रीडायरेक्ट करें + return 301 https://$host$request_uri; + } + + सर्वर { + listen 443 ssl; + server_name your-domain.com; + + root /var/www/your-domain.com/html; + index index.html; + + # SSL configuration + ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + try_files $uri $uri/ /index.html; + } + } + ``` + +2. **प्रमुख साइट के लिए वेब रूट निर्देशिका बनाएँ:** + ```बैश + sudo mkdir -p /var/www/your-domain.com/html + ``` + +3. **अपने लेंस नोड उप-डोमैन के लिए एनगिनएक्स कॉन्फिग बनाएँ:** + ```बैश + sudo nano /etc/nginx/sites-available/lens.your-domain.com + ``` + फ़ाइल में नीचे पूरे कॉन्फ़िगरेशन ब्लॉक को चिपकाएँ. + > **महत्वपूर्ण:** आपको **`$YOUR_SUBDOMAIN`** के प्रत्येक उदाहरण को अपने वास्तविक उपडोमेन (जैसे, `lens.your-domain.com`) से प्रतिस्थापित करना होगा। + + ```nginx + server_names_hash_bucket_size 128; + + सर्वर { + server_name $YOUR_SUBDOMAIN; + listen [::]:4002 ssl ipv6only=on; + listen 4002 ssl; + + # प्रमाणपत्र फ़ाइल लोड करें. + ssl_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$YOUR_SUBDOMAIN/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/chain.pem; + + # diffie-heelman पैरामीटर लोड करें. + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + proxy_pass http://127.0.0.1:8001; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + } + + सर्वर { + server_name $YOUR_SUBDOMAIN; + listen [::]:4003 ssl ipv6only=on; + listen 4003 ssl; + + # प्रमाणपत्र फ़ाइल लोड करें. + ssl_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$YOUR_SUBDOMAIN/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/chain.pem; + + # diffie-heelman पैरामीटर लोड करें. + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + proxy_pass http://127.0.0.1:8002; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + } + + सर्वर { + server_name $YOUR_SUBDOMAIN; + listen [::]:4004 ssl ipv6only=on; + listen 4004 ssl; + + # प्रमाणपत्र फ़ाइल लोड करें. + ssl_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$YOUR_SUBDOMAIN/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/chain.pem; + + # diffie-heelman पैरामीटर लोड करें. + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + proxy_pass http://127.0.0.1:8083; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + } + + + सर्वर { + server_name $YOUR_SUBDOMAIN; + listen [::]:4005 ssl ipv6only=on; + listen 4005 ssl; + + # प्रमाणपत्र फ़ाइल लोड करें. + ssl_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$YOUR_SUBDOMAIN/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/chain.pem; + + # diffie-heelman पैरामीटर लोड करें. + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + proxy_pass http://127.0.0.1:8084; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + } + + सर्वर { + server_name $YOUR_SUBDOMAIN; # managed by Certbot + + root /usr/share/nginx/html; + index index.html index.htm; + + location / { + try_files $uri $uri/ =404; + } + + listen [::]:443 ssl; # managed by Certbot + listen 443 ssl; # managed by Certbot + + # प्रमाणपत्र फ़ाइल लोड करें. + ssl_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$YOUR_SUBDOMAIN/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/chain.pem; + + # Load the Diffie-Hellman parameter. + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + } + सर्वर { + server_name $YOUR_SUBDOMAIN; + listen [::]:9002 ssl ipv6only=on; + listen 9002 ssl; + + # प्रमाणपत्र फ़ाइल लोड करें. + ssl_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$YOUR_SUBDOMAIN/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/$YOUR_SUBDOMAIN/chain.pem; + + # diffie-heelman पैरामीटर लोड करें. + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + proxy_pass http://127.0.0.1:8082; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + } + + सर्वर { + listen 80; + listen [::]:80 ; + server_name $YOUR_SUBDOMAIN; + + # इस विशेष यूआरएल का अनुरोध करने वाली कुछ भी सामग्री परोसी जानी चाहिए + # certbot का फ़ोल्डर तो http-01 एसीएमई चुनौती को पूरा किया जा सकता है + # https प्रमाणपत्र. + location '/.well-known/acme-challenge' { + default_type "text/plain"; + root /var/www/letsencrypt; + } + + if ($host = $YOUR_SUBDOMAIN) { + return 301 https://$host$request_uri; + } # managed by Certbot + + return 404; # managed by Certbot + } + + ``` + +4. **सिंबालिक लिंक बनाने के द्वारा दोनों साइटों को सक्षम करें:** + ```बैश + sudo ln -s /etc/nginx/sites-available/your-domain.com /etc/nginx/sites-enabled/ + sudo ln -s /etc/nginx/sites-available/lens.your-domain.com /etc/nginx/sites-enabled/ + ``` + +5. **अपने nginx विन्यास जाँचें और सेवा फिर आरंभ करें:** + ```बैश + sudo nginx -t + sudo systemctl restart nginx + ``` + +--- + +### **भाग 2: लेंस नोड सेट और चलाने** + +हम पृष्ठभूमि में लेंस नोड प्रक्रिया को चलाने के लिए 'स्क्रीन' का उपयोग करेंगे, जिससे यह आपके एसएसएच सत्र से अलग होने के बाद भी जारी रहने की अनुमति देगा। +1. **लेंस नोड को वैश्विक स्तर पर संस्थापित करें:** + ```बैश + pnpm install -g @riffcc/lens-node + ``` + +2. **आरंभिक सेटअप प्रक्रिया चलाएँ:** + ```बैश + lens-node setup + ``` + +3. **नया `स्क्रीन` सत्र प्रारंभ करें:** + ```बैश + screen -S lens-node + ``` + आपका टर्मिनल साफ हो जाएगा, और आप अब `lens-node' नामक एक नए आभासी सत्र के अंदर हैं।. + +4. स्क्रीन सत्र के अंदर नोड आरंभ करें। `lens. your-domain.com' को आपके वास्तविक subdomain से बदलें।. + ```बैश + लेंस-नोड रन --domain लेंस. yourdomain.com --relay + ``` + +5. एक बार नोड चल रहा है, तो आप इस के समान आउटपुट देखेंगे। अपने 'साइट एड्रेस' और 'ऑन ऑन' एड्रेस की सूची जिसमें '/wss' होता है।. + + ```बैश + Node Directory: /root/.lens-node + Peer ID: 12D3KooWFzrhasG7pouxZSsSP3bHP45C3TCq2MYirTPC5oA9Lj2v + Site Address: zb2rhoGguxQaNZy47DvRPLRmpT84mwvwuvekUhmCgF7nkhTCn + Listening on: [ + "/dns4/lens.your-domain.com/tcp/4002/p2p/12D3KooWFzrhasG7pouxZSsSP3bHP45C3TCq2MYirTPC5oA9Lj2v", + "/dns4/lens.your-domain.com/tcp/4003/wss/p2p/12D3KooWFzrhasG7pouxZSsSP3bHP45C3TCq2MYirTPC5oA9Lj2v" + ] + ``` + +6. **स्क्रीन सत्र से अलग करें**, नोड चला जा रहा है. **`Ctrl+A`** दबाएँ, फिर **`D`** दबाएँ. + +अब आपके पास एक लेंस नोड है जो पृष्ठभूमि में सफलतापूर्वक चल रहा है। + +> **नोड प्रबंधित करने के लिए:** +> * **लॉग देखने या प्रक्रिया रोकने के लिए सत्र से पुनः जुड़ें**: `screen -r lens-node` +> * **नोड रोकने के लिए**, पुनः जुड़ें और `Ctrl+C` दबाएँ। +> * **चेतावनी:** यह विधि सर्वर रीबूट के बाद काम नहीं करती। यदि सर्वर पुनः आरंभ होता है, तो आपको नए स्क्रीन सत्र में नोड को मैन्युअल रूप से पुनः आरंभ करना होगा। + +--- + +### **भाग 3: प्रमुख उदाहरण तैनात करें** + +अंत में, फ्लैगशिप फ्रंटेंड एप्लिकेशन को कॉन्फ़िगर, बिल्ड और तैनात करें। + +1. **रिपोजिटरी क्लोन करें और निर्देशिका में नेविगेट करें:** + ```बैश + git clone https://github.com/riffcc/flagship + cd flagship + ``` + +2. **एनवायरनमेंट फ़ाइल बनाएँ:** + ```बैश + cp .env.example .env + ``` + +3. एनवायरनमेंट वेरिएबल(environment variable) का विश्लेषण करें। `.env` फ़ाइल को खोलो और आपके चल रहे लेंस नोड से मूल्यों का उपयोग करके निम्न वेरिएबल सेट करेंः + ```dotenv + # Paste the "Site Address" from your node's output here + VITE_SITE_ADDRESS=zb2rhoGguxQaNZy47DvRPLRmpT84mwvwuvekUhmCgF7nkhTCn + + # Paste the secure "/wss" listening address here + VITE_BOOTSTRAPPERS=/dns4/lens.your-domain.com/tcp/4003/wss/p2p/12D3KooWFzrhasG7pouxZSsSP3bHP45C3TCq2MYirTPC5oA9Lj2v + ``` + +4. **निर्भरता संस्थापित करें और अनुप्रयोग का निर्माण करें:** + ```बैश + pnpm install + pnpm compile:web + ``` + +5. **अपने nginx वेब रूट पर निर्मित फ़ाइलों को तैनात करें.** + ```बैश + sudo cp -r packages/renderer/dist/web/* /var/www/your-domain.com/html/ + ``` + +6. **वेब फ़ाइलों के लिए सही स्वामित्व नियत करें:** + ```बैश + sudo chown -R www-data:www-data /var/www/your-domain.com/html + ``` + +आपका प्रमुख उदाहरण अब लाइव है! आप इसे अपने ब्राउज़र में `https://your-domain.com ' तक पहुंचा सकते हैं। \ No newline at end of file diff --git a/content/docs/lens-sdk/_index.hi.md b/content/docs/lens-sdk/_index.hi.md new file mode 100644 index 0000000..c1c6904 --- /dev/null +++ b/content/docs/lens-sdk/_index.hi.md @@ -0,0 +1,57 @@ +--- +date: '2025-07-22T04:50:31+02:00' +draft: false +title: 'Lens SDK' +sidebar: + open: true +--- + +## ओवर्व्यू + +लेंस एसडीके एक व्यापक, मजबूत और उद्यम-ग्रेड सॉफ्टवेयर विकास किट है जिसे परिष्कृत, विकेन्द्रीकृत सामग्री वितरण और फेडरेशन नेटवर्क के निर्माण के लिए डिजाइन किया गया है। पी2पी फ्रेमवर्क की शक्ति का लाभ उठाते हुए, लेंस एसडीके संप्रभु, अंतर-संचालन और लचीली सामग्री अनुप्रयोगों के निर्माण के लिए एक पूर्ण, लेयर्ड आर्किटेक्चर प्रदान करता है। + +यह एसडीके उन डेवलपरों और संगठनों के लिए तैयार किया गया है जो ऐसे अनुप्रयोगों का निर्माण करना चाहते हैं जहां डेटा अखंडता, उपयोगकर्ता स्वामित्व और विकेंद्रीकृत सहयोग सर्वोपरि है। यह पीयर-टू-पीयर नेटवर्किंग, डेटाबेस तुल्यकालन और क्रिप्टोग्राफिक पहचान की जटिलताओं को अमूर्त करता है, जो त्वरित और सुरक्षित विकास के लिए एक स्वच्छ, उच्च-स्तरीय एपीआई प्रदान करता है। + +## कोर दर्शन + +लेंस एसडीके का डिजाइन कई मूलभूत सिद्धांतों द्वारा निर्देशित है: + +1. **डेटा संप्रभुता:** उपयोगकर्ता और समुदाय अपने स्वयं के डेटा और डिजिटल स्थानों पर चरम नियंत्रण बनाए रखते हैं। प्रत्येक 'साइट' कार्यक्रम उदाहरण अपने स्वयं के नियमों और प्रशासकों द्वारा शासित एक संप्रभु इकाई है। + +2. **संरचित संघ:**अंतर-आवेदन संचार मनमाना नहीं है. यह स्पष्ट रूप से एक संरचित और अनुमति प्राप्त प्रक्रिया है "सब्स्क्रिप्शन." यह मॉडल यह सुनिश्चित करता है कि डेटा साझा करना जानबूझकर और सुरक्षित है, अवांछित डेटा इंजेक्शन को रोकना और ट्रस्ट पर निर्मित नेटवर्क बनाना। + +3. **मॉड्यूलर और लेयर्ड आर्किटेक्चर:** एसडीके निम्न-स्तरीय पी2पी कार्यक्रम तर्क से उच्च-स्तरीय सेवा एपीआई तक चिंताओं को एक सख्त अलगाव को लागू करता है. यह लेयर्ड डिजाइन सुरक्षा को बढ़ाता है, रखरखाव को सरल बनाता है, और स्केलेबल विकास प्रथाओं को बढ़ावा देता है। + +4. **सत्यापन योग्य स्रोत:**नेटवर्क के माध्यम से सृजित और साझा किए गए सभी डेटा क्रिप्टोग्राफिक रूप से हस्ताक्षरित और इसकी उत्पत्ति के पते के साथ स्टांप किया गया है `साइट`. यह सभी सामग्री के लिए एक अपरिवर्तनीय और सत्यापित ऑडिट ट्रेल प्रदान करता है, इसकी प्रामाणिकता की हमेशा पुष्टि की जा सकती है। + +## प्रमुख विशेषताएं + +* **टर्नकी विकेन्द्रीकृत अनुप्रयोग (`साइट` प्रोग्रैम):** एसडीके में एक शक्तिशाली और फीचर पूर्ण पी2पी प्रोग्राम शामिल है। `साइट`. यह सामग्री रिलीज़, श्रेणियों, विशेष वस्तुओं और मॉडरेशन टूल्स के लिए आउट-ऑफ-बॉक्स समर्थन प्रदान करता है. + +* **लचीली भूमिका-आधारित अभिगम नियंत्रण (आरबीएसी):**एक परिष्कृत, सुरक्षित और बाहरी अनुमति प्रणाली। यह तयशुदा भूमिकाओं के लिए एक स्पष्ट पदानुक्रम प्रदान करता है (`एडमिन`, `मॉडल`, `सदस्य`)और सामग्री निर्माण, प्रबंधन और साइट प्रशासन पर सटीक नियंत्रण के लिए परिष्कृत अनुमति के साथ कस्टम भूमिकाओं के निर्माण की अनुमति देता है। + +* **स्वचालित फेडरेशन और सिंक्रोनाइजेशन:** एक परिष्कृत `फेडरेशनमैनेजर` अंतर-साइट संचार के सभी पहलुओं को देखता है, जिसमें शामिल हैं: + * **ऐतिहासिक डेटा समन्वयन:** जब कोई नया अभिदान स्थापित किया जाता है तो स्वचलित बैक-फ़िल्स सामग्री. + * **लाइव पब/सब अपडेट:** फेडरेटेड साइटों के बीच वास्तविक समय डेटा तुल्यकालन सुनिश्चित करता है। + * **स्टेटफुल कनेक्शन मैनेजमेंट:** संघटित कनेक्शनों के जीवनचक्र का बुद्धिमत्तापूर्वक प्रबंधन करता है, जिसमें असब्सक्रिप्शन पर स्वचालित डेटा सफाई शामिल है। + +* **उच्च स्तरीय सेवा एपीआई (`लेंस सेवा`):** एक डेवलपर-अनुकूल इंटरफेस जो अनुप्रयोग एकीकरण के लिए एकमात्र प्रवेश बिंदु के रूप में कार्य करता है. यह एक स्थिर, वादा-आधारित एपीआई प्रदान करता है जो सभी अंतर्निहित p2p जटिलता से दूर अमूर्त. + +* **अतिरिक्त स्कीमा:** सभी डेटा संरचनाओं को दृढ़ता से टाइप की स्कीमा के साथ परिभाषित किया गया है, जो नेटवर्क में डेटा स्थिरता और अखंडता सुनिश्चित करता है, जबकि भविष्य की आवश्यकताओं के लिए अतिरिक्त रहता है। + +## इस एसडीके का इस्तेमाल किसे करना चाहिए? + +लेंस एसडीके डेवलपर्स और संगठनों के निर्माण के लिए आदर्श है: + +* **विकेन्द्रीकृत सामग्री मंच:** स्वतंत्र रचनाकारों, पत्रकारों या कलाकारों के लिए जिन्हें सेंसरशिप-प्रतिरोधी प्रकाशन उपकरणों की आवश्यकता होती है। +* **समुदाय के स्वामित्व वाले फ़ोरम और अभिलेखागार:** जहां सदस्य ज्ञान या डेटा के साझा भंडार में सहयोग और शासन करते हैं। +* **संघीय सोशल मीडिया अनुप्रयोग:** अनुप्रयोग जो उपयोगकर्ताओं को अपने खुद के नोड्स चलाने की अनुमति देते हैं जबकि अभी भी एक बड़े, परस्पर जुड़े सामाजिक ग्राफ में भाग लेते हैं. +* **एंटरप्राइज़ डेटा शेयरिंग नेटवर्क:** विश्वसनीय कॉर्पोरेट भागीदारों के बीच डेटा और कलाकृतियों को साझा करने के लिए सुरक्षित, निजी नेटवर्क। + +## शुरू हो रही है + +लेंस sdk के साथ काम शुरू करने के लिए, हम निम्नलिखित वर्गों की समीक्षा करने की सिफारिश करते हैं: + +1. **[मूल अवधारणाएँ](/docs/lens-sdk/core-concepts):**विस्तृत विवरण `साइट` कार्यक्रम, महासंघ और एसडीके के वास्तुशिल्प सिद्धांतों। +2. **[त्वरित प्रारंभ](/docs/lens-sdk/quick-start):** एक स्टेप-बाई-स्टेप ट्यूटोरियल एक बुनियादी अनुप्रयोग को ऊपर और चल पाने के लिए। +3. **[एपीआई संदर्भ](/docs/lens-sdk/api-reference):** 'एलेंस सर्विस' के लिए व्यापक दस्तावेज, इसके तरीके और डेटा प्रकार। \ No newline at end of file diff --git a/content/docs/lens-sdk/advanced-topics.hi.md b/content/docs/lens-sdk/advanced-topics.hi.md new file mode 100644 index 0000000..d3bb942 --- /dev/null +++ b/content/docs/lens-sdk/advanced-topics.hi.md @@ -0,0 +1,208 @@ ++++ +date = '2025-07-22T12:25:02+02:00' +draft = false +title = 'Advanced Topics' +weight = 3 ++++ + +इस खंड में लेंस एसडीके के साथ मजबूत, स्केलेबल और सुरक्षित अनुप्रयोगों के निर्माण के लिए उन्नत अवधारणाओं और सर्वोत्तम प्रथाओं को शामिल किया गया है। यह उन डेवलपर्स के लिए है जो पहले से ही क्विक स्टार्ट गाइड और कोर अवधारणाओं में शामिल विषयों से परिचित हैं। + +### 1. उपयोक्ता पहचान के लिए बटुआ का प्रयोग + +लेंस sdk के साथ dapps बनाने की सबसे शक्तिशाली विशेषता यह है कि उपयोगकर्ता की पहचान के रूप में एक बाहरी वॉलेट (जैसे मेटामास्क) का उपयोग करने की क्षमता है। यह उपयोगकर्ताओं को सभी कार्यों के लिए सीधे हस्ताक्षर करने की अनुमति देता है, यह सुनिश्चित करता है कि वे अपनी सामग्री के सच्चे मालिक हैं। + +ऐसा करने के लिए, आपको एक पीयरबिट-संगत बनाने की आवश्यकता है `आइडेनटी` एक वस्तु से `ईथर.जेएस` साइन. + +#### Step 1:निर्भरता जोड़ें + +आप की जरूरत होगी `ईथर` ब्राउज़र वॉलेट के साथ बातचीत. + +```बैश +पीएनपीएम ईथर संस्थापित करता है +``` + +#### Step 2: संकेतक से पहचान बनाएँ + +एसडीके एक उपयोगिता फ़ंक्शन प्रदान करता है, `संकेतक से पहचान बनाएँ`, इसे आसान बनाने के लिए। ब्राउज़र अनुप्रयोग में, आप साइनर से मिल जाएगा `विंडो. शीर्षक` प्रवाइडर. + +```टाइप्स्क्रिप्ट +import { ethers } from 'ethers'; +import { LensService, संकेतक से पहचान बनाएँ } from '@riffcc/lens-sdk'; + +async फंक्शन सेटअप के साथ() { + // ब्राउज़र वातावरण में: + कॉन्स्ट प्रदाता = नयाईथर का ब्राउज़र प्रोविडियर (विंडो.इथरम); + स्थिरांक संकेतक = प्रदाता का इंतजार करें.(); + + // आकाश संकेतक = से एक सहकर्मी बिट संगत पहचान बनाएँ.. + बटुआ पहचान = अवैट संकेतक से पहचान बनाएँ(साइन); + + // लेंस सेवा को संस्थापित करें, मनपसंद पहचान पारित करना. + स्थिरांक लेन्ज़ = नया लेंस सेवा({ + आइडेनिटी: वॉलेट पहचान, + डीबग: ट्रू, + }); + + // अब, सभी कॉल जैसे `.लेंस.वृद्धि () ` एक हस्ताक्षर ट्रिगर करेगा + // उपयोक्ता वॉलेट में निवेदन. + लेंस का इंतजार है(); + // ... आपके अनुप्रयोग तर्क के बाकी +} +``` + +#### Step 3:वॉलेट पहचान के साथ एक साइट बनाना + +यदि उपयोगकर्ता `साइट`, बनाने वाला पहला उपयोगकर्ता है, तो उनके वॉलेट की सार्वजनिक कुंजी को रूट प्रशासक के रूप में उपयोग किया जाना चाहिए`वैलेटिडिटी.पब्लिककी` को सीधे `साइट` कंस्ट्रक्टर के पास भेज सकते हैं।. + +```टाइप्स्क्रिप्ट +import { Site } from '@riffcc/lens-sdk/programs'; +// ... लेंस और बटुआ पहचान पिछले चरण से स्थापित की जाती है + +// उपयोगकर्ता का वॉलेट पब्लिक कुंजी नई साइट के लिए विश्वास की जड़ बन जाता है। +स्थिरांक रूटडिंकी = बटुआ पहचान. सार्वजनिक कुंजी; +स्थिरांक न्यूज़ाइट = नई साइट (रूटमाडम्नी); + +// साइट खोलें. इस क्रिया के लिए उपयोक्ता का बटुआ हस्ताक्षर करेगा. +प्रतीक्षा लेन्स.ओपनसाइट (समाचार) + +कंसोल.लॉग(`साइट सफलतापूर्वक बनाया गया! पता: ${लेंस. साइट प्रोग्राम. पता.}`); +``` + +यह पैटर्न गैर-ग्राहक अनुप्रयोगों के निर्माण के लिए मौलिक है जहां उपयोगकर्ताओं का पूर्ण नियंत्रण है। + +### 2. Managing Peerbit Client Externally + +In some complex applications, you may need to manage the lifecycle of the Peerbit P2P client yourself, especially if your application uses other Peerbit programs alongside the `Site` program. + +The `LensService` constructor accepts an optional `peerbit` client instance. When a client is provided this way, the service will not attempt to manage its lifecycle. + +**Use Case:** Your application needs to run a `Site` program and a separate custom `Chat` program on the same Peerbit node. + +```typescript +import { Peerbit } from 'peerbit'; +import { LensService } from '@riffcc/lens-sdk'; +import { ChatProgram } from './my-chat-program'; // Your custom program + +async function setup() { + // 1. Create and manage the Peerbit client yourself. + const peerbit = await Peerbit.create({ directory: './shared-p2p-node' }); + + // 2. Pass the external client to the LensService. + const lens = new LensService({ peerbit: peerbit, debug: true }); + + // 3. You can now open a Site... + await lens.openSite('EXISTING_SITE_ADDRESS'); + + // 4. ...and also open your other custom programs on the same node. + const chat = await peerbit.open(new ChatProgram()); + + // ... application logic ... + + // 5. You are responsible for stopping the client. + // The lens.stop() call will NOT stop the external client. + await lens.stop(); // Only stops the Site program and FederationManager + await peerbit.stop(); +} +``` + +### 3. Customizing Replication (`SiteArgs`) + +By default, a `Site` program attempts to replicate its data stores with a low replication factor to save resources. For applications requiring higher availability or performance, you can provide custom replication arguments when opening a site. + +The `SiteArgs` object allows you to specify `replicate` options for each data store within the `Site`. + +**Use Case:** You are running a dedicated "pinning" node that should store a complete copy of all data for maximum availability. + +```typescript +import { Site } from '@riffcc/lens-sdk/programs'; + +const dedicatedPinningNodeArgs = { + // Setting 'replicate: true' means "replicate everything you can find." + releasesArgs: { replicate: true }, + featuredReleasesArgs: { replicate: true }, + contentCategoriesArgs: { replicate: true }, + // ACLs and Subscriptions should always be fully replicated on an admin node. + membersArg: { replicate: true }, + administratorsArgs: { replicate: true }, + subscriptionsArgs: { replicate: true } +}; + +const site = new Site(myPublicKey); +await lens.openSite(site, { siteArgs: dedicatedPinningNodeArgs }); +``` + +For detailed replication options, refer to the Peerbit documentation on `ReplicationOptions`. + +### 4. Understanding Federation Performance + +The `FederationManager` is designed to be efficient, but in large-scale networks, it's helpful to understand its behavior: + +* **Historical Sync:** This is the most resource-intensive part of federation. When a site with thousands of releases is subscribed to, the initial sync can take time and consume bandwidth. This process runs in the background and does not block other operations. +* **Live Sync:** Live updates via pub/sub are extremely lightweight. A `FederationUpdate` message only contains the cryptographic hashes and metadata of changed entries, not the full data, making real-time updates very fast. +* **Network Topology:** Federation performance is dependent on the underlying libp2p network. For optimal performance, ensure that nodes (especially those that frequently federate with each other) are well-connected. You can use `peerbit.dial()` to manually establish connections between nodes if needed. + +### 5. Production-Level Content Moderation (`BlockedContent` and Denylists) + +The Lens SDK is designed with a powerful content moderation architecture that extends beyond simple in-app filtering to the core infrastructure. This section outlines the full vision, separating what is currently available from features that are in progress or planned for the future. + +#### Logical Deletes vs. Hard Deletes + +It is important to distinguish between the two forms of content removal: + +* **`deleteRelease()` (Logical Delete):** This is a standard feature. When an administrator calls `deleteRelease()`, it removes the `Release` document from the site's database. This is a "soft" or "logical" delete within the application's view. The underlying data file on IPFS is not immediately affected. + +* **`BlockedContent` (Hard Delete Foundation):** This schema is the foundation for a "hard delete" process. It is designed to create a permanent, verifiable record that a piece of content (identified by its CID) should be purged not just from the app, but from the entire storage infrastructure. + +#### The "Bad Bits" Moderation Pattern: Current State and Future Vision + +The recommended pattern for robust moderation follows the principles of established denylist formats like the ["Bad Bits" denylist](https://badbits.dwebops.pub/). + +Here is the workflow, including the status of each component: + +1. **Administrator Action:** An administrator identifies a piece of content by its IPFS Content Identifier (CID) that needs to be blocked. + +2. **Double Hashing and Record Creation (In Progress):** + * **Functionality:** To protect privacy, the original CID is **double-hashed** (e.g., SHA256(SHA256(CID))) before being stored. This prevents casual observers from identifying the content on the blocklist. + * **Status:** The high-level `LensService` methods to perform this action (e.g., `blockContent()`) are **currently in progress**. This will provide a simple, secure way for administrators to add entries to the `blockedContent` store without needing direct program interaction. + +3. **Infrastructure Synchronization (Future Implementation):** + * **Vision:** The long-term vision is for a trusted backend service or "Operator" to monitor the `Site`'s `blockedContent` store. This Operator will generate a standard denylist file from the stored hashes and distribute it to all core infrastructure. + * **Status:** The implementation of this **Operator service is planned for the future**. When complete, it will enable the `blockedContent` store to act as a decentralized source of truth that can instruct IPFS nodes, clusters, and CDNs to refuse to serve and permanently delete blocked content. + +#### Summary of Moderation Features + +| Feature | Status | Description | +|-------------------------------------------|-------------------|---------------------------------------------------------------------------------------------------------| +| **Logical Deletion** (`deleteRelease`) | ✅ **Implemented** | Removes content metadata from the `Site`'s database. | +| **Blocklist Schema** (`BlockedContent`) | ✅ **Implemented** | The on-chain data structure for recording moderation decisions exists. | +| **Service API for Blocking** (`blockContent`) | ⏳ **In Progress** | High-level `LensService` methods for easy and secure management of the `blockedContent` store. | +| **Operator for Infrastructure Sync** | 🗺️ **Future** | A service to automate the syncing of the on-chain blocklist to IPFS nodes, clusters, and CDNs. | + +This roadmap provides a clear path from the current capabilities to a comprehensive, end-to-end content moderation system that is both powerful and privacy-preserving. + +### 6. Direct Program Interaction (For Advanced Use Cases) + +While the `LensService` should be used for 99% of interactions, there may be rare cases where direct interaction with the `Site` program is necessary (e.g., in server-side administrative scripts). + +The active `Site` program instance is available via `lensService.siteProgram`. + +**Use Case:** A script needs to inspect the low-level replication state of a specific database. + +```typescript +// This is NOT a typical application pattern. Use with caution. +const site: Site | null = lens.siteProgram; + +if (site) { + // Accessing the underlying log of a store + const releaseLog = site.releases.log; + + // Get the cryptographic heads of the log + const heads = await releaseLog.log.getHeads().all(); + console.log('Current release log heads:', heads.map(h => h.hash)); + + // Directly interacting with ACLs + await site._authorise(AccountType.MEMBER, 'some_public_key'); +} +``` + +**Warning:** Bypassing the `LensService` means you lose its safety checks, error handling, and stable API contract. This should only be done when you have a deep understanding of the Peerbit framework and the internal logic of the `Site` program. diff --git a/content/docs/lens-sdk/api-reference (copy).md b/content/docs/lens-sdk/api-reference (copy).md new file mode 100644 index 0000000..1ce6c86 --- /dev/null +++ b/content/docs/lens-sdk/api-reference (copy).md @@ -0,0 +1,357 @@ ++++ +date = '2025-07-22T05:45:03+02:00' +draft = false +title = 'API Reference' +weight = 5 ++++ + +This document provides a detailed reference for the public API of the Lens SDK, primarily focusing on the `LensService` class. The `LensService` is the sole intended entry point for developers building applications with the SDK. + +## `LensService` + +The `LensService` class provides a high-level, asynchronous interface for all SDK functionalities. It manages the Peerbit client, the `Site` program lifecycle, and all user-facing operations. + +### Constructor + +```typescript +new LensService(options?: { + peerbit?: ProgramClient; + debug?: boolean; + customPrefix?: string; + identity?: Identity; +}) +``` + +Initializes a new instance of the service. + +| Parameter | Type | Optional | Description | +|----------------|-----------------|:--------:|---------------------------------------------------------------------------------------------------------| +| `options` | `object` | **Yes** | Configuration for the service instance. | +| `options.peerbit`| `ProgramClient` | **Yes** | An externally managed Peerbit client. If provided, `init()` and `stop()` will not affect its lifecycle. | +| `options.debug`| `boolean` | **Yes** | Enables verbose diagnostic logging to the console. Defaults to `false`. | +| `options.customPrefix`| `string` | **Yes** | Sets a custom prefix for log messages. Defaults to `'[LensService]'`. | +| `options.identity`| `Identity` | **Yes** | A custom, user-centric identity (e.g., from a wallet) to use for all signing operations. If omitted, the service uses the Peerbit node's default identity. | + +--- + +## Lifecycle Methods + +These methods control the connection to the Peerbit network and the active `Site` program. + +### `init()` + +```typescript +init(directory?: string): Promise +``` + +Initializes and starts a new, internally managed Peerbit client. This method must be called before any other operations if the service was not constructed with an external client. + +| Parameter | Type | Optional | Description | +|-------------|----------|:--------:|--------------------------------------------------------------------------------------------| +| `directory` | `string` | **Yes** | The file system path for storing peer identity and data. If omitted, data is stored in memory. | + +### `stop()` + +```typescript +stop(): Promise +``` + +Gracefully shuts down the service, closing the active `Site` and stopping the Peerbit client (if internally managed). + +### `openSite()` + +```typescript +openSite( + siteOrAddress: Site | string, + options?: { siteArgs?: SiteArgs, federate?: boolean } +): Promise +``` + +Opens a `Site` program, making it the active context for all subsequent API calls. + +| Parameter | Type | Optional | Description | +|-------------------|---------------------|:--------:|------------------------------------------------------------------------------------------------------------| +| `siteOrAddress` | `Site \| string` | No | To create a new `Site`, pass a `new Site(rootTrust)` instance. To open an existing one, pass its address. | +| `options` | `object` | **Yes** | Additional configuration. | +| `options.siteArgs`| `SiteArgs` | **Yes** | Advanced configuration for database replication. | +| `options.federate`| `boolean` | **Yes** | If `true`, starts the `FederationManager` for this site to handle subscriptions. Defaults to `true`. | + +--- + +## Account and Status Methods + +Methods for retrieving information about the current user. + +### `getAccountStatus()` + +```typescript +getAccountStatus(): Promise +``` + +Determines the full permission status of the current **active identity** (custom wallet or default node identity) for the active `Site`. This is the primary method for fetching the necessary information to render a user interface tailored to their capabilities. + +```typescript +interface AccountStatusResponse { + isAdmin: boolean; // True if the user is a top-level administrator + roles: string[]; // An array of role names assigned to the user (e.g., ["moderator", "member"]) + permissions: string[]; // A flattened, unique list of all permissions granted by the user's roles +} +``` + +--- + +### API Input Types + +To simplify interactions, the `LensService` uses two primary input patterns for creating and editing documents. + +* **`AddInput`**: This is used for creating new documents (e.g., in `addRelease`). The type `AddInput` is an alias for just `T`. You provide only the core data properties for the document you want to create. The `LensService` is responsible for automatically adding the required `id`, `postedBy`, and `siteAddress` fields. + +* **`EditInput`**: This is used for updating existing documents (e.g., in `editRelease`). This type is an alias for `T & ImmutableProps`. You must provide the full data for the document, including the `id`, `postedBy`, and `siteAddress` of the existing document. The service will verify that the immutable properties (`postedBy` and `siteAddress`) have not been changed. + +--- + +## Content Management (Releases) + +Methods for creating and managing the primary content type, `Release`. + +### `addRelease()` + +```typescript +addRelease(data: AddInput): Promise +``` + +Creates and saves a new `Release` document. Requires the user to have a role with the `release:create` permission (e.g., `Member`, `Moderator`, `Admin`). + +| Parameter | Type | Description | +|-----------|---------------------|---------------------------------------------------------------------------------------------------------| +| `data` | `AddInput` | An object with the release properties (`name`, `categoryId`, etc.). | + +### `editRelease()` + +```typescript +editRelease(data: EditInput): Promise +``` + +Updates an existing `Release`. The required permission depends on the action: + +* A user with the `release:edit:own` permission can edit a release where they are the `postedBy`. +* A user with the `release:edit:any` permission can edit any release. + +| Parameter | Type | Description | +|-----------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| `data` | `EditInput` | The full `Release` data, including the `id` of the document to update. The service will reject the edit if `postedBy` or `siteAddress` are modified. | + +Updates an existing `Release`. The `data` object must include the `id`. Requires `ADMIN` privileges. + +### `deleteRelease()` + +```typescript +deleteRelease(id: string): Promise +``` + +Deletes a `Release` by its ID. Requires the `release:delete` permission (e.g., `Moderator`, `Admin`). + +### `getRelease()` + +```typescript +getRelease(id: string): Promise | undefined> +``` + +Retrieves a single `Release` by its ID. + +### `getReleases()` + +```typescript +getReleases(options?: SearchOptions): Promise[]> +``` + +Retrieves an array of `Release` documents. + +--- + +## Featured Content Management + +Methods for managing `FeaturedRelease` entries. These operations require a role with the `featured:manage` permission (e.g., `Moderator`, `Admin`). + +### `addFeaturedRelease()` + +```typescript +addFeaturedRelease(data: AddInput): Promise +``` + +Creates a `FeaturedRelease` to highlight an existing `Release`. + +### `editFeaturedRelease()` + +```typescript +editFeaturedRelease(data: EditInput): Promise +``` + +Updates an existing `FeaturedRelease`. The `id` must be present, and core properties (`postedBy`, `siteAddress`) cannot be changed. + +### `deleteFeaturedRelease()` + +```typescript +deleteFeaturedRelease(id:string): Promise +``` + +Deletes a `FeaturedRelease` by its ID. + +*(Methods `getFeaturedRelease` and `getFeaturedReleases` follow the same pattern as their `Release` counterparts.)* + +--- + +## Content Category Management + +Methods for managing `ContentCategory` documents. These operations require a role with the `category:manage` permission (e.g., `Moderator`, `Admin`). + +### `addContentCategory()` + +```typescript +addContentCategory(data: AddInput): Promise +``` + +Creates a new `ContentCategory`. The `categoryId` must be unique. + +### `editContentCategory()` + +```typescript +editContentCategory(data: EditInput): Promise +``` + +Updates an existing `ContentCategory`. The service will reject the update if immutable fields (`postedBy`, `siteAddress`, `categoryId`) are changed. + +### `deleteContentCategory()` + +```typescript +deleteContentCategory(id: string): Promise +``` + +Deletes a `ContentCategory` by its ID. + +### `getContentCategory()` + +```typescript +getContentCategory(id: string): Promise | undefined> +``` + +Retrieves a single `ContentCategory` by its ID. + +### `getContentCategories()` + +```typescript +getContentCategories(options?: SearchOptions): Promise[]> +``` + +Retrieves an array of all `ContentCategory` documents. + +--- + +## Federation (Subscription) Management + +Methods for managing federation relationships. These operations require a role with the `subscription:manage` permission (e.g., `Moderator`, `Admin`). + +### `addSubscription()` + +```typescript +addSubscription(data: AddInput): Promise +``` + +Subscribes to another `Site`, initiating federation. + +| Parameter | Type | Description | +|-----------|------------|-------------------------------------------------------------| +| `data` | `AddInput` | An object with the subscription properties. `SubscriptionData` is `{ to: string }` | + +### `deleteSubscription()` + +```typescript +deleteSubscription(data: { id?: string; to?: string }): Promise +``` + +Unsubscribes from a `Site`, stopping federation and purging its content. + +| Parameter | Type | Description | +|-----------|----------|----------------------------------------------------------------------| +| `data` | `object` | An object containing either the subscription `id` or the target site's `to` address to remove. | + +### `getSubscriptions()` + +```typescript +getSubscriptions(options?: SearchOptions): Promise +``` + +Retrieves a list of all current `Subscription` documents. + +## Access Control Management + +Methods for managing user permissions on the active `Site`. These operations are privileged and can **only be performed by an Administrator**. + +### `addAdmin()` + +```typescript +addAdmin(publicKey: string | PublicSignKey): Promise +``` + +Promotes another user to be a full Administrator, adding them to the site's root `TrustedNetwork`. + +| Parameter | Type | Description | +|-------------|------------------------|------------------------------------------------------------| +| `publicKey` | `string \| PublicSignKey` | The public key of the user to promote. | + +### `assignRole()` + +```typescript +assignRole(publicKey: string | PublicSignKey, roleId: string): Promise +``` + +Assigns a specific role to a user. + +| Parameter | Type | Description | +|-------------|------------------------|-----------------------------------------------------------------------------| +| `publicKey` | `string \| PublicSignKey` | The public key of the user. | +| `roleId` | `string` | The string identifier of the role to assign (e.g., `"member"`, `"moderator"`). | + +### `revokeRole()` + +```typescript +revokeRole(publicKey: string | PublicSignKey, roleId: string): Promise +``` + +Revokes a specific role from a user. + +| Parameter | Type | Description | +|-------------|------------------------|-----------------------------------------------------------------------------| +| `publicKey` | `string \| PublicSignKey` | The public key of the user. | +| `roleId` | `string` | The string identifier of the role to revoke. | + +## Common Response Objects + +Most methods in the `LensService` return one of the following standardized response objects to ensure consistent error handling and feedback. + +### `BaseResponse` + +The simplest response object, indicating only success or failure. + +| Field | Type | Description | +|-----------|-----------|-------------------------------------------------------| +| `success` | `boolean` | `true` if the operation was successful, otherwise `false`. | +| `error` | `string` | An error message if `success` is `false`. | + +### `IdResponse` + +Extends `BaseResponse` to include the unique ID of the document that was affected. + +| Field | Type | Description | +|-------|----------|-----------------------------------------------------------| +| `id` | `string` | The unique identifier of the created or modified document. | +| *(...inherits from `BaseResponse`)* | | | + +### `HashResponse` + +Extends `IdResponse` to also include the cryptographic hash of the operation's log entry, which can be used for verification. + +| Field | Type | Description | +|-------|----------|------------------------------------------------------| +| `hash`| `string` | The cryptographic hash of the underlying P2P log entry. | +| *(...inherits from `IdResponse`)* | | | diff --git a/content/docs/lens-sdk/core-concepts (copy).md b/content/docs/lens-sdk/core-concepts (copy).md new file mode 100644 index 0000000..c556396 --- /dev/null +++ b/content/docs/lens-sdk/core-concepts (copy).md @@ -0,0 +1,101 @@ ++++ +date = '2025-07-22T05:44:53+02:00' +draft = false +title = 'Core Concepts' +weight = 2 ++++ + +The Lens SDK is designed around a set of robust, interoperable components. A thorough understanding of these core concepts is essential for leveraging the full power and security of the SDK. This document provides a detailed overview of the foundational pillars of the Lens architecture: the `LensService`, the `Site` Program, the Federation Model, and the Access Control System. + +## 1. The Layered Architecture + +The SDK employs a strict, layered architecture to promote modularity, security, and maintainability. Each layer has a distinct responsibility, and communication flows vertically through well-defined interfaces. + +```mermaid +graph TD + A[📱 Application Layer
UI, Backend, CLI] -->|Consumes| B[🧩 Service Layer
LensService: Public API] + B -->|Orchestrates| C[🔗 Federation & Program Layer
FederationManager, Site Program] + C -->|Built Upon| D[🌐 P2P Framework Layer:
Peerbit] + + %% Styling + classDef layer stroke-width:1px,rx:10,ry:10; + class A,B,C,D layer; + +``` + +* **Service Layer (`LensService`):** This is the canonical public interface for the SDK. It is the sole entry point for any consuming application. Its purpose is to provide a stable, high-level, and asynchronous API that completely abstracts the complexities of the underlying P2P network and program logic. The service layer is responsible for managing the lifecycle of the P2P client and the active `Site` program. + +* **Program Layer (`Site` Program):** This is the "on-chain" or decentralized backend of the application. The `Site` program is a stateful, replicable "smart contract" that defines the application's data schemas, databases, and the immutable rules governing data access. It is the ultimate source of truth for all content and permissions within a given `Site`. + +* **Federation Layer (`FederationManager`):** This is a specialized, internal component managed by the `LensService`. It orchestrates all inter-program communication. While the `Site` program defines *what* data exists, the `FederationManager` defines *how* that data is discovered, synchronized, and shared between different `Site` instances. + +* **P2P Framework Layer (Peerbit):** The foundational layer that provides the necessary primitives for peer-to-peer networking, database creation, data replication, and cryptographic identity. The Lens SDK is built directly upon this robust framework. + +## 2. The `Site` Program: A Sovereign Digital Entity + +The central construct in the Lens ecosystem is the `Site`. Conceptually, a `Site` is a sovereign, addressable, and self-contained digital space. It functions as a decentralized application instance, complete with its own databases and access control system. + +### Key Characteristics of a `Site` + +* **Unique, Verifiable Address:** Every `Site` is identified by a permanent, cryptographic address derived from its owner's public key and its initial parameters. This address is used to locate, open, and interact with the `Site` on the network. +* **Structured Data Stores:** A `Site` is a collection of discrete, purpose-built data stores for `Releases`, `ContentCategories`, `Subscriptions`, and more. This structured approach ensures data integrity and organizational clarity. +* **Explicit Permissions:** Access to a `Site` is not public by default. All write permissions are explicitly granted by an **Administrator** through a robust Role-Based Access Control (RBAC) system. + +## 3. The Federation Model: Principled Data Exchange + +Federation is the process by which independent `Site` instances share data. The Lens SDK implements a principled, subscription-based model to ensure that all data exchange is intentional and secure. + +### The Federation Lifecycle + +1. **Explicit Subscription:** The process is initiated by a user with `subscription:manage` permission (typically a `Moderator` or `Admin`). To federate, they create a `Subscription` record containing the target `Site`'s address. This action is a deliberate declaration of trust. + +2. **State Synchronization:** Upon the creation of a `Subscription`, the `FederationManager` performs two types of synchronization: + * **Historical Sync:** A one-time process that connects to the remote `Site` and replicates its existing public content (e.g., `Releases`). + * **Live Sync:** The manager subscribes to the remote `Site`'s dedicated pub/sub topic, creating a persistent, real-time communication channel for immediate updates. + +3. **Data Provenance:** All data received via federation is immutable and retains the cryptographic signature of its original author and the address of its originating `Site`. This guarantees that the source of all content can be verified. + +4. **Lifecycle Termination:** If a `Subscription` is deleted, the `FederationManager` performs a cleanup operation, purging all data associated with the unsubscribed `Site` from its local databases. + +## 4. The Access Control System (RBAC) + +Security is integral to the `Site` program. The system is built on a robust and secure **Role-Based Access Control (RBAC)** model, managed by a dedicated internal `RoleBasedccessController`. This controller is the ultimate authority for all actions within a `Site`. + +### Identity and Signing + +Every action that modifies a `Site` (like adding a release or assigning a role) must be cryptographically signed. The Lens SDK supports two models for this identity: + +1. **Default Node Identity:** If you initialize `LensService` without specifying a custom identity, it will use an auto-generated identity tied to the Peerbit node itself. This is suitable for server-side scripts or headless nodes where a single, consistent identity is desired. + +2. **Custom Wallet Identity:** For user-facing applications, the recommended approach is to provide a custom identity derived from the user's own wallet (e.g., MetaMask). When you instantiate `LensService` with this custom identity, **all subsequent actions are signed by the user's wallet**. This ensures that the user, not the application node, is the true owner and author of their content. This is the foundation of data sovereignty in the Lens SDK. + +### The RBAC Components + +* **Administrators (`TrustedNetwork`):** At the top level is a `TrustedNetwork` of administrators. Any user whose public key is in this network is considered an **Admin**. Admins have universal permissions and are the only users who can manage the RBAC system itself (e.g., create new roles, assign roles to users, or add other Admins). The initial creator of a `Site` is its first `Admin`. + +* **Roles:** A `Role` is a named collection of specific permissions. A `Site` is initialized with a set of default roles, and Admins can create new custom roles as needed. + +* **Permissions:** A `Permission` is a granular string that represents a specific action, typically in the format `"resource:action"` (e.g., `"release:delete"`). + +* **Assignments:** An `Assignment` is a verifiable link between a user's public key and a `Role`. A user gains permissions by virtue of the roles they are assigned. + +### Default Roles and Permissions Table + +A `Site` comes with a clear set of default roles, providing a sensible permission structure out of the box. An **Admin** can perform all actions listed below. + +| Action / Permission (`resource:action`) | Moderator | Member | Guest | Description | +|-----------------------------------------|:---------:|:------:|:-----:|--------------------------------------------------------------------------| +| **`release:create`** | ✅ | ✅ | ❌ | Can publish new `Release` documents. | +| **`release:edit:own`** | ✅ | ✅ | ❌ | Can edit `Release` documents they personally posted. | +| **`release:edit:any`** | ✅ | ❌ | ❌ | Can edit `Release` documents posted by *any* user on the site. | +| **`release:delete`** | ✅ | ❌ | ❌ | Can delete any `Release` from the site. | +| **`featured:manage`** | ✅ | ❌ | ❌ | Can create, edit, or delete `FeaturedRelease` entries. | +| **`category:manage`** | ✅ | ❌ | ❌ | Can create, edit, or delete `ContentCategory` documents. | +| **`blocklist:manage`** | ✅ | ❌ | ❌ | Can create or delete `BlockedContent` entries. | +| **`subscription:manage`** | ✅ | ❌ | ❌ | Can subscribe to or unsubscribe from other sites. | + +* **Guest (Implicit Role):** This is the default status for any user who is not an Admin and has not been assigned any roles. `Guests` have read-only access and cannot perform any write operations. + +### Federation and Permissions + +The RBAC model extends intelligently to federated content. While trust is primarily based on the subscription, the Lens SDK provides a powerful override: **a local `Admin` or `Moderator` can always act on federated content** (e.g., delete a stale post from an unsubscribed site). This ensures that local site owners maintain ultimate control over the content stored in their databases. diff --git a/content/docs/lens-sdk/quick-start (copy).md b/content/docs/lens-sdk/quick-start (copy).md new file mode 100644 index 0000000..07aa9b6 --- /dev/null +++ b/content/docs/lens-sdk/quick-start (copy).md @@ -0,0 +1,128 @@ ++++ +date = '2025-07-22T12:22:36+02:00' +draft = false +title = 'Quick Start' +weight = 1 ++++ + +This guide provides a step-by-step walkthrough to get a basic application running with the Lens SDK. By the end of this guide, you will have initialized the service, created a new `Site`, populated it with default content categories, added content, and retrieved it. + +### Prerequisites + +* Node.js (v18 or higher recommended) +* A TypeScript-ready project environment + +### Step 1: Installation + +First, add the Lens SDK to your project dependencies. + +```bash +pnpm install @riffcc/lens-sdk +``` + +### Step 2: Initializing the `LensService` + +The `LensService` is the primary entry point for all SDK functionality. The first step is to create an instance and initialize its underlying P2P client. + +```typescript +import { LensService } from '@riffcc/lens-sdk'; +import { Site } from '@riffcc/lens-sdk/programs'; + +async function main() { + console.log("Initializing Lens Service..."); + // We enable 'debug' for verbose logging during development. + const lens = new LensService({ debug: true }); + + // The init() method creates and starts the Peerbit client. + // We provide a directory to persist the user's identity and data. + await lens.init('./my-first-site-data'); + + console.log("Service Initialized."); + + // We'll add more code here in the next steps... + + // Always remember to stop the service gracefully. + await lens.stop(); + console.log("Service Stopped."); +} + +main().catch(console.error); +``` + +### Step 3: Creating and Opening a `Site` + +A `Site` is your decentralized content hub. To create a new one, you instantiate the `Site` program with your public key as the root administrator and then ask the service to open it. + +```typescript +// Inside your main() function, after lens.init() + +// 1. Get the public key of the current user from the initialized client. +const myPublicKey = lens.peerbit.identity.publicKey; + +// 2. Create a new Site instance, making yourself the root administrator. +const mySite = new Site(myPublicKey); + +// 3. Open the site. This registers it on the network and creates default roles. +console.log("Opening a new Site..."); +await lens.openSite(mySite); + +const siteAddress = lens.siteProgram.address; +console.log(`Site created and opened successfully! Address: ${siteAddress}`); +``` + +> **Using a Custom Identity:** The example above uses the default identity automatically generated for the Peerbit node. For user-facing applications, the recommended approach is to use the user's own wallet (like MetaMask) as the identity. To learn how to implement this, please see the **Using a Wallet for User Identity** section in our [Advanced Topics guide](/docs/lens-sdk/advanced-topics/#1-using-a-wallet-for-user-identity). + +### Step 4: Initializing Site Content Categories + +A new `Site` is empty by default. As the root administrator, you should initialize it with a set of `ContentCategory` documents. This is a one-time operation that populates the site with the necessary templates for posting content. + +```typescript +// Inside your main() function, after lens.openSite() + +console.log("Initializing site with default content categories..."); +// This is a privileged, direct interaction with the Site program. +await lens.siteProgram.initializeDefaultContentCategories(); +console.log("Default categories initialized successfully."); +``` + +### Step 5: Adding Content (Creating a `Release`) + +Now that the `Site` has been initialized with categories, you can add content. Let's add your first `Release`, linking it to the default `"music"` category. + +```typescript +// Inside your main() function, after initializing categories + +console.log("Adding a new Release to the Site..."); + +const releaseData = { + name: "Hello, Decentralized World!", + categoryId: "music", // Link to the 'music' category we just created + contentCID: "bafybeigdyrzt5sfp7vu572pausrk236q2762rqcbqcnwqwixituoxuejm4" // Example CID +}; + +const response = await lens.addRelease(releaseData); + +if (response.success) { + console.log(`Release added successfully! ID: ${response.id}`); +} else { + console.error(`Failed to add release: ${response.error}`); +} +``` + +### Step 6: Retrieving Content + +Finally, let's verify that the content was saved by retrieving all releases from the site. + +```typescript +// Inside your main() function, after adding the release + +console.log("Retrieving all releases..."); +const allReleases = await lens.getReleases(); + +console.log(`Found ${allReleases.length} release(s):`); +allReleases.forEach(release => { + console.log(`- ID: ${release.id}, Name: "${release.name}"`); +}); +``` + +Congratulations! You have successfully created a decentralized `Site`, initialized it, managed permissions, added content, and retrieved it. From here, explore the [Core Concepts](./core-concepts) or consult the [API Reference](./api-reference). diff --git a/content/docs/lens-sdk/site-reference (copy).md b/content/docs/lens-sdk/site-reference (copy).md new file mode 100644 index 0000000..19e2561 --- /dev/null +++ b/content/docs/lens-sdk/site-reference (copy).md @@ -0,0 +1,85 @@ ++++ +date = '2025-07-22T06:21:22+02:00' +draft = false +title = 'Site Reference' +weight = 4 ++++ + +### Schemas + +This document provides a detailed reference for the data schemas that constitute a `Site` program. Understanding these schemas is crucial for preparing data for API calls and for interpreting the data returned by the `LensService`. + +All data objects submitted to the `LensService` for creation or editing should conform to the structures described below. + +#### Common Document Properties + +While there is no rigid base class, most documents share a set of common, fundamental properties. When creating a new content item (like a `Release`), the `id`, `postedBy`, and `siteAddress` fields are automatically handled by the `LensService`. + +| Field | Type | Description | +|---------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `id` | `string` | A unique identifier for the document. Usually a UUID, generated automatically on creation. Required when editing an existing document. | +| `postedBy` | `PublicSignKey` or `Uint8Array` | The cryptographic public key of the identity associated with the document. When creating content, this is automatically set to the current user unless specified otherwise. | +| `siteAddress` | `string` | The unique address of the `Site` where this document was originally created. This is always set by the service and is immutable. | + +> **Note on Immutability:** The `postedBy` and `siteAddress` fields are considered immutable. Once a document is created, these values cannot be changed via an `edit` operation. The SDK enforces this rule at the service layer. + +--- + +#### 1. `Release` + +The `Release` is the primary content object. It represents a single, publishable item like a music album, a video, or an article. + +| Field | Type | Required | Description | +|----------------|----------|:--------:|---------------------------------------------------------------------------| +| `name` | `string` | **Yes** | The display title of the release. | +| `categoryId` | `string` | **Yes** | The `id` of the `ContentCategory` this release belongs to (e.g., "music"). | +| `contentCID` | `string` | **Yes** | The IPFS Content Identifier (CID) of the main data file(s) for this release. | +| `thumbnailCID` | `string` | No | The IPFS CID for a thumbnail or cover image associated with the release. | +| `metadata` | `string` | No | A JSON string containing additional, category-specific metadata. | + +#### 2. `ContentCategory` + +A `ContentCategory` defines a template for a type of content, including what metadata is expected. These are typically created by a `Site` administrator or initialized from a default set. + +| Field | Type | Required | Description | +|----------------|----------|:--------:|---------------------------------------------------------------------------------------------------------------| +| `categoryId` | `string` | **Yes** | A unique, human-readable string identifier (e.g., "movies", "tv-shows"). **This field is immutable.** | +| `displayName` | `string` | **Yes** | The human-readable name for the category (e.g., "TV Shows"). | +| `featured` | `boolean`| No | A flag to indicate if this category should be prominently displayed. Defaults to `false`. | +| `description` | `string` | No | A brief explanation of what content belongs in this category. | +| `metadataSchema`| `string` | No | A JSON string defining the structure of the `metadata` field for `Releases` in this category. See [defaults.ts](https://github.com/riffcc/lens-sdk/blob/main/src/programs/site/defaults.ts) for examples. | + +> **Note on `categoryId` Immutability:** The `categoryId` field acts as a stable "business key". Once a category is created, this ID cannot be changed to ensure that all `Releases` linked to it remain valid. The SDK enforces this rule. + +#### 3. `FeaturedRelease` + +A `FeaturedRelease` acts as a "pin" or "shortcut" to an existing `Release`, allowing it to be highlighted. + +| Field | Type | Required | Description | +|-------------|-----------|:--------:|------------------------------------------------------------------------| +| `releaseId` | `string` | **Yes** | The `id` of the `Release` document that is being featured. | +| `startTime` | `string` | **Yes** | An ISO 8601 formatted date-time string indicating when the feature should become active. | +| `endTime` | `string` | **Yes** | An ISO 8601 formatted date-time string indicating when the feature should expire. | +| `promoted` | `boolean` | **Yes** | A flag for additional styling or priority in a "promoted" section. | + +#### 4. `Subscription` + +A `Subscription` represents a unilateral "follow" action, forming the basis of federation. When a `Subscription` is created, the `FederationManager` begins syncing content from the target `Site`. + +| Field | Type | Required | Description | +|---------------|----------|:--------:|-----------------------------------------------------------------------------------------------------------| +| `to` | `string` | **Yes** | The full, unique address of the remote `Site` program being subscribed to. | + +>Note: The `id` for a subscription is deterministically generated from a combination of the subscriber's and the target site's addresses to prevent duplicate subscriptions. + +#### 5. `BlockedContent` + +A `BlockedContent` record is a moderation tool used by `Site` administrators to hide or prevent content from being displayed. + +| Field | Type | Required | Description | +|-------|----------|:--------:|----------------------------------------------| +| `cid` | `string` | **Yes** | The IPFS Content Identifier (CID) to be blocked. | + +--- + +This reference provides the necessary detail for developers to correctly format data for all API interactions. For information on how to create, retrieve, or manage documents using these schemas, please consult the [**API Reference**](/docs/lens-sdk/api-reference). From b9309d71359bfe66a30e7edf1fe12945f973491e Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Fri, 17 Oct 2025 18:40:12 +0530 Subject: [PATCH 2/8] translation English to Hindi --- content/docs/lens-sdk/advanced-topics.hi.md | 125 +++--- content/docs/lens-sdk/api-reference.hi.md | 357 ++++++++++++++++++ ...concepts (copy).md => core-concepts.hi.md} | 8 +- ...uick-start (copy).md => quick-start.hi.md} | 0 4 files changed, 423 insertions(+), 67 deletions(-) create mode 100644 content/docs/lens-sdk/api-reference.hi.md rename content/docs/lens-sdk/{core-concepts (copy).md => core-concepts.hi.md} (77%) rename content/docs/lens-sdk/{quick-start (copy).md => quick-start.hi.md} (100%) diff --git a/content/docs/lens-sdk/advanced-topics.hi.md b/content/docs/lens-sdk/advanced-topics.hi.md index d3bb942..23b89a2 100644 --- a/content/docs/lens-sdk/advanced-topics.hi.md +++ b/content/docs/lens-sdk/advanced-topics.hi.md @@ -70,50 +70,52 @@ import { Site } from '@riffcc/lens-sdk/programs'; यह पैटर्न गैर-ग्राहक अनुप्रयोगों के निर्माण के लिए मौलिक है जहां उपयोगकर्ताओं का पूर्ण नियंत्रण है। -### 2. Managing Peerbit Client Externally +### 2.बाहरी रूप से पीयरबिट क्लाइंट का प्रबंधन -In some complex applications, you may need to manage the lifecycle of the Peerbit P2P client yourself, especially if your application uses other Peerbit programs alongside the `Site` program. +कुछ जटिल अनुप्रयोगों में, आपको खुद पी2पी क्लाइंट के जीवनचक्र का प्रबंधन करने की आवश्यकता हो सकती है, विशेष रूप से यदि आपका अनुप्रयोग `साइट` कार्यक्रम के साथ अन्य पीयरबिट कार्यक्रमों का उपयोग करता है।. -The `LensService` constructor accepts an optional `peerbit` client instance. When a client is provided this way, the service will not attempt to manage its lifecycle. +`लेन्स सर्विस कंस्ट्रक्टर`एक वैकल्पिक `पेर्बिट` क्लाइंट इंस्टैंस को स्वीकार करता है। जब किसी ग्राहक को इस तरह से प्रदान किया जाता है, तो सेवा अपने जीवनचक्र को प्रबंधित करने का प्रयास नहीं करेगी।. -**Use Case:** Your application needs to run a `Site` program and a separate custom `Chat` program on the same Peerbit node. +**केस का करें इस्तेमाल:** आपके एप्लिकेशन को एक `साइट` प्रोग्राम और एक अलग कस्टम `चैट`प्रोग्राम चलाने की आवश्यकता है -```typescript +```टाइप्स्क्रिप्ट import { Peerbit } from 'peerbit'; import { LensService } from '@riffcc/lens-sdk'; import { ChatProgram } from './my-chat-program'; // Your custom program -async function setup() { - // 1. Create and manage the Peerbit client yourself. - const peerbit = await Peerbit.create({ directory: './shared-p2p-node' }); +अतुल्यकालिक फ़ंक्शन सेटअप() { + // 1. सहकर्मीबिट क्लाएंट को स्वयं बनाएँ और प्रबंधित करें. + कॉन्स्टेंट पीरबिट = Peerbit.create({ निर्देशिका: './shared-p2p-node' }) का इंतजार करें; - // 2. Pass the external client to the LensService. - const lens = new LensService({ peerbit: peerbit, debug: true }); - - // 3. You can now open a Site... - await lens.openSite('EXISTING_SITE_ADDRESS'); + + // 2.बाहरी क्लाइंट को लेंस सेवा में पास करें. + स्थिर लेंस = नया लेंस सेवा ({ पीरबिट: पीरबिट, डिबग: ट्रू }); - // 4. ...and also open your other custom programs on the same node. - const chat = await peerbit.open(new ChatProgram()); + // 3. अब आप एक साइट खोल सकते हैं... +लेंस. opensite ('easeing_site_adress) का इंतजार करें; + + // 4. ... और एक ही नोड पर अपने अन्य कस्टम प्रोग्राम भी खोलें. +const चैट = await peerbit.open(नया चैटप्रोग्राम()); - // ... application logic ... + // ...अनुप्रयोग तर्क ... - // 5. You are responsible for stopping the client. - // The lens.stop() call will NOT stop the external client. - await lens.stop(); // Only stops the Site program and FederationManager - await peerbit.stop(); + // 5. आप क्लाइंट को रोकने के लिए जिम्मेदार हैं. + // lens.stop() कॉल बाहरी क्लाइंट को नहीं रोकेगा। +await lens.stop(); // केवल साइट प्रोग्राम और फ़ेडरेशन मैनेजर को रोकता है +await peerbit.stop(); } ``` -### 3. Customizing Replication (`SiteArgs`) +### 3.अनुकूलन प्रतिकृति (`साइटआर्ग्स`) -By default, a `Site` program attempts to replicate its data stores with a low replication factor to save resources. For applications requiring higher availability or performance, you can provide custom replication arguments when opening a site. +डिफ़ॉल्ट रूप से, एक`साइट`प्रोग्राम संसाधनों को बचाने के लिए कम प्रतिकृति कारक के साथ अपने डेटा स्टोर को दोहराने का प्रयास करता है। उच्च उपलब्धता या प्रदर्शन की आवश्यकता वाले अनुप्रयोगों के लिए, आप एक साइट खोलने के दौरान कस्टम प्रतिकृति तर्क प्रदान कर सकते हैं. -The `SiteArgs` object allows you to specify `replicate` options for each data store within the `Site`. +`साइटआर्ग्स` ऑब्जेक्ट आपको `साइट` के भीतर प्रत्येक डेटा स्टोर के लिए `प्रतिकृति` विकल्प निर्दिष्ट करने की अनुमति देता है। -**Use Case:** You are running a dedicated "pinning" node that should store a complete copy of all data for maximum availability. +**उपयोग मामला:** आप एक समर्पित "पिनिंग" नोड चला रहे हैं, जिसे अधिकतम उपलब्धता के लिए सभी डेटा की एक पूरी प्रतिलिपि संग्रहीत करनी चाहिए +. -```typescript +```टाइप्स्क्रिप्ट import { Site } from '@riffcc/lens-sdk/programs'; const dedicatedPinningNodeArgs = { @@ -131,62 +133,59 @@ const site = new Site(myPublicKey); await lens.openSite(site, { siteArgs: dedicatedPinningNodeArgs }); ``` -For detailed replication options, refer to the Peerbit documentation on `ReplicationOptions`. - -### 4. Understanding Federation Performance - -The `FederationManager` is designed to be efficient, but in large-scale networks, it's helpful to understand its behavior: - -* **Historical Sync:** This is the most resource-intensive part of federation. When a site with thousands of releases is subscribed to, the initial sync can take time and consume bandwidth. This process runs in the background and does not block other operations. -* **Live Sync:** Live updates via pub/sub are extremely lightweight. A `FederationUpdate` message only contains the cryptographic hashes and metadata of changed entries, not the full data, making real-time updates very fast. -* **Network Topology:** Federation performance is dependent on the underlying libp2p network. For optimal performance, ensure that nodes (especially those that frequently federate with each other) are well-connected. You can use `peerbit.dial()` to manually establish connections between nodes if needed. +विस्तृत प्रतिकृति विकल्प के लिए, विस्तृत प्रतिकृति विकल्प के लिए `प्रतिकृति विकल्प`. -### 5. Production-Level Content Moderation (`BlockedContent` and Denylists) +### 4. महासंघ के प्रदर्शन को समझना -The Lens SDK is designed with a powerful content moderation architecture that extends beyond simple in-app filtering to the core infrastructure. This section outlines the full vision, separating what is currently available from features that are in progress or planned for the future. +`फेडरेशनमैनेजर`को कुशल होने के लिए डिजाइन किया गया है, लेकिन बड़े पैमाने पर नेटवर्क में, यह अपने व्यवहार को समझने में सहायक है: -#### Logical Deletes vs. Hard Deletes +* **ऐतिहासिक समन्वयन:** यह संघ का सबसे संसाधन प्रधान हिस्सा है। जब कोई साइट हजारों रिलीज के साथ सदस्यता लेती है, तो प्रारंभिक सिंक समय ले सकता है और बैंडविड्थ का उपभोग कर सकता है। यह प्रक्रिया पृष्ठभूमि में चलती है और अन्य संचालन को अवरुद्ध नहीं करती है. +* **लाइव सिंक:** pub/sub के माध्यम से लाइव अपडेट बेहद हल्के होते हैं। एक `फेडरेशन अपडेट` संदेश में केवल क्रिप्टोग्राफिक हैश और परिवर्तित प्रविष्टियों के मेटाडेटा को शामिल किया गया है, न कि पूर्ण डेटा, जो वास्तविक समय अपडेट को बहुत तेजी से बनाते हैं. +* **नेटवर्क टोपोलॉजी :** संघ का प्रदर्शन अंतर्निहित libp2p नेटवर्क पर निर्भर है। इष्टतम प्रदर्शन के लिए, सुनिश्चित करें कि नोड्स (विशेष रूप से वे जो अक्सर एक दूसरे से पोषित होते हैं) अच्छी तरह से जुड़े हुए हैं। यदि आवश्यक हो तो नोड्स के बीच कनेक्शन को मैन्युअल रूप से स्थापित करने के लिए आप `peerbit.dial ()` का उपयोग कर सकते हैं। +### 5. उत्पादन-स्तर की सामग्री मॉडरेशन (`ब्लॉक-कंटेंट` और एंजेलिस्ट) -It is important to distinguish between the two forms of content removal: +लेंस एसडीके को एक शक्तिशाली सामग्री मॉडरेशन आर्किटेक्चर के साथ डिजाइन किया गया है जो मूल बुनियादी ढांचे के लिए सरल इन-एप फिल्टरिंग से परे है। यह खंड पूरी दृष्टि को रेखांकित करता है, जो वर्तमान में उपलब्ध सुविधाओं से अलग है जो प्रगति में हैं या भविष्य के लिए योजनाबद्ध हैं। -* **`deleteRelease()` (Logical Delete):** This is a standard feature. When an administrator calls `deleteRelease()`, it removes the `Release` document from the site's database. This is a "soft" or "logical" delete within the application's view. The underlying data file on IPFS is not immediately affected. +#### लॉजिकल डेलेट बनाम हार्ड डेलेट -* **`BlockedContent` (Hard Delete Foundation):** This schema is the foundation for a "hard delete" process. It is designed to create a permanent, verifiable record that a piece of content (identified by its CID) should be purged not just from the app, but from the entire storage infrastructure. +सामग्री हटाने के दो रूपों के बीच अंतर करना महत्वपूर्ण है: -#### The "Bad Bits" Moderation Pattern: Current State and Future Vision +* **`deleteRelease()` (लॉजिकल डिलीट):** यह एक मानक सुविधा है। जब कोई व्यवस्थापक `deleteRelease()` को कॉल करता है, तो यह साइट के डेटाबेस से `Release` दस्तावेज़ को हटा देता है। यह एप्लिकेशन के दृश्य में एक "सॉफ्ट" या "लॉजिकल" डिलीट है। IPFS पर अंतर्निहित डेटा फ़ाइल तुरंत प्रभावित नहीं होती है। -The recommended pattern for robust moderation follows the principles of established denylist formats like the ["Bad Bits" denylist](https://badbits.dwebops.pub/). +* **`ब्लॉक्डकंटेंट` (हार्ड डिलीट फाउंडेशन):** यह स्कीमा "हार्ड डिलीट" प्रक्रिया का आधार है। इसे एक स्थायी, सत्यापन योग्य रिकॉर्ड बनाने के लिए डिज़ाइन किया गया है कि सामग्री का एक टुकड़ा (जिसकी CID द्वारा पहचान की गई हो) न केवल ऐप से, बल्कि पूरे स्टोरेज इंफ्रास्ट्रक्चर से हटा दिया जाना चाहिए। -Here is the workflow, including the status of each component: +#### "बुरे अंशों" का मॉडरेशन पैटर्न: वर्तमान स्थिति और भविष्य की दृष्टि -1. **Administrator Action:** An administrator identifies a piece of content by its IPFS Content Identifier (CID) that needs to be blocked. +मजबूत मॉडरेशन के लिए अनुशंसित पैटर्न ["बैड बिट्स" इनकार सूची](https://badbits.dwebops.pub/) जैसे स्थापित इनकार सूची प्रारूपों के सिद्धांतों का पालन करता है। -2. **Double Hashing and Record Creation (In Progress):** - * **Functionality:** To protect privacy, the original CID is **double-hashed** (e.g., SHA256(SHA256(CID))) before being stored. This prevents casual observers from identifying the content on the blocklist. - * **Status:** The high-level `LensService` methods to perform this action (e.g., `blockContent()`) are **currently in progress**. This will provide a simple, secure way for administrators to add entries to the `blockedContent` store without needing direct program interaction. +यहां कार्य प्रवाह है, जिसमें प्रत्येक घटक की स्थिति शामिल है: -3. **Infrastructure Synchronization (Future Implementation):** - * **Vision:** The long-term vision is for a trusted backend service or "Operator" to monitor the `Site`'s `blockedContent` store. This Operator will generate a standard denylist file from the stored hashes and distribute it to all core infrastructure. - * **Status:** The implementation of this **Operator service is planned for the future**. When complete, it will enable the `blockedContent` store to act as a decentralized source of truth that can instruct IPFS nodes, clusters, and CDNs to refuse to serve and permanently delete blocked content. +1. **प्रशासक क्रिया:** एक प्रशासक अपनी आईपीएफ की सामग्री पहचानकर्ता (सीआईडी) द्वारा सामग्री के एक टुकड़े की पहचान करता है जिसे ब्लॉक करने की आवश्यकता है. -#### Summary of Moderation Features +2. **डबल हैगिंग और रिकॉर्ड निर्माण (प्रगति पर है):** + * **फंगक्शनैलिटी:** गोपनीयता की रक्षा के लिए, मूल सीआईडी है **डबल-हैश** (e.g., SHA256(SHA256(CID))) जमा करने से पहले। यह आकस्मिक पर्यवेक्षकों को ब्लॉक सूची पर सामग्री की पहचान करने से रोकता है. + * **स्थिति:** इस क्रिया को करने के लिए उच्च-स्तरीय `लेंस सेवा` विधियाँ (जैसे, `ब्लॉककंटेंट()`) **वर्तमान में प्रगति पर हैं**। इससे प्रशासकों को सीधे प्रोग्राम इंटरैक्शन की आवश्यकता के बिना `ब्लॉककंटेंट` स्टोर में प्रविष्टियाँ जोड़ने का एक सरल, सुरक्षित तरीका मिल जाएगा। -| Feature | Status | Description | -|-------------------------------------------|-------------------|---------------------------------------------------------------------------------------------------------| -| **Logical Deletion** (`deleteRelease`) | ✅ **Implemented** | Removes content metadata from the `Site`'s database. | -| **Blocklist Schema** (`BlockedContent`) | ✅ **Implemented** | The on-chain data structure for recording moderation decisions exists. | -| **Service API for Blocking** (`blockContent`) | ⏳ **In Progress** | High-level `LensService` methods for easy and secure management of the `blockedContent` store. | -| **Operator for Infrastructure Sync** | 🗺️ **Future** | A service to automate the syncing of the on-chain blocklist to IPFS nodes, clusters, and CDNs. | +3.**इंफ्रास्ट्रक्चर सिंक्रोनाइज़ेशन (भविष्य में कार्यान्वयन):** +* **विज़न:** दीर्घकालिक दृष्टिकोण एक विश्वसनीय बैकएंड सेवा या "ऑपरेटर" को `साइट` के `ब्लॉककंटेंट` स्टोर की निगरानी करने के लिए स्थापित करना है। यह ऑपरेटर संग्रहीत हैश से एक मानक इनकार सूची फ़ाइल तैयार करेगा और उसे सभी मुख्य इंफ्रास्ट्रक्चर में वितरित करेगा। +* **स्थिति:** इस **ऑपरेटर सेवा के कार्यान्वयन की योजना भविष्य में बनाई गई है**। पूरा होने पर, यह `ब्लॉककंटेंट` स्टोर को सत्य के एक विकेन्द्रीकृत स्रोत के रूप में कार्य करने में सक्षम बनाएगा जो IPFS नोड्स, क्लस्टर्स और CDN को सेवा देने से मना करने और अवरुद्ध सामग्री को स्थायी रूप से हटाने का निर्देश दे सकता है। +#### मॉडरेशन विशेषताओं का सारांश -This roadmap provides a clear path from the current capabilities to a comprehensive, end-to-end content moderation system that is both powerful and privacy-preserving. +| फ़ीचर | स्थिति | विवरण | +|------------------------------------------|-------------------|---------------------------------------------------------------------------------------------------| +| **तार्किक विलोपन** (`रिलीज़ हटाएं`) | ✅ **कार्यान्वित** | `साइट` के डेटाबेस से सामग्री मेटाडेटा हटाता है। | +| **ब्लॉकलिस्ट स्कीमा** (`ब्लॉककंटेंट`) | ✅ **कार्यान्वित** | मॉडरेशन निर्णयों को रिकॉर्ड करने के लिए ऑन-चेन डेटा संरचना मौजूद है। | +| **ब्लॉकिंग के लिए सेवा API** (`ब्लॉककंटेंट`) | ⏳ **प्रगति पर** | `ब्लॉककंटेंट` स्टोर के आसान और सुरक्षित प्रबंधन के लिए उच्च-स्तरीय `लेंस सेवा` विधियाँ। | +| **इंफ्रास्ट्रक्चर सिंक के लिए ऑपरेटर** | 🗺️ **भविष्य** | IPFS नोड्स, क्लस्टर्स और CDNs के लिए ऑन-चेन ब्लॉकलिस्ट के सिंकिंग को स्वचालित करने के लिए एक सेवा। | -### 6. Direct Program Interaction (For Advanced Use Cases) +यह रोडमैप मौजूदा क्षमताओं से लेकर एक व्यापक, एंड-टू-एंड सामग्री मॉडरेशन प्रणाली तक एक स्पष्ट रास्ता प्रदान करता है जो शक्तिशाली और गोपनीयता-प्रदाता दोनों है। -While the `LensService` should be used for 99% of interactions, there may be rare cases where direct interaction with the `Site` program is necessary (e.g., in server-side administrative scripts). +### 6.प्रत्यक्ष प्रोग्राम इंटरैक्शन (उन्नत उपयोग मामलों के लिए) -The active `Site` program instance is available via `lensService.siteProgram`. +जबकि `लेंस सर्विस` का उपयोग 99% इंटरैक्शन के लिए किया जाना चाहिए, ऐसे दुर्लभ मामले हो सकते हैं जहां 'साइट' कार्यक्रम के साथ प्रत्यक्ष संवाद आवश्यक है (जैसे, सर्वर-साइड प्रशासनिक स्क्रिप्ट). +सक्रिय`साइट` कार्यक्रम उदाहरण`एलेंस सर्विस. साइट प्रोग्राम`के माध्यम से उपलब्ध है।. -**Use Case:** A script needs to inspect the low-level replication state of a specific database. +**उपयोग मामला:** एक स्क्रिप्ट को एक विशिष्ट डेटाबेस की निम्न-स्तरीय प्रतिकृति स्थिति का निरीक्षण करने की आवश्यकता है. ```typescript // This is NOT a typical application pattern. Use with caution. @@ -205,4 +204,4 @@ if (site) { } ``` -**Warning:** Bypassing the `LensService` means you lose its safety checks, error handling, and stable API contract. This should only be done when you have a deep understanding of the Peerbit framework and the internal logic of the `Site` program. +**वॉर्निंग:** `एलेंस सर्विस` को बाईपास करने का मतलब है कि आप अपनी सुरक्षा जांच, त्रुटि हैंडलिंग और स्थिर एपीआई अनुबंध खो देते हैं। यह तभी किया जाना चाहिए जब आपके पास पीयरबिट ढांचे और `साइट` कार्यक्रम के आंतरिक तर्क की गहरी समझ हो।. diff --git a/content/docs/lens-sdk/api-reference.hi.md b/content/docs/lens-sdk/api-reference.hi.md new file mode 100644 index 0000000..ecb55f3 --- /dev/null +++ b/content/docs/lens-sdk/api-reference.hi.md @@ -0,0 +1,357 @@ ++++ +date = '2025-07-22T05:45:03+02:00' +draft = false +title = 'API Reference' +weight = 5 ++++ + +यह दस्तावेज लेन्स एसडीके के पब्लिक एपीआई के लिए एक विस्तृत संदर्भ प्रदान करता है, मुख्य रूप से `लेन्स सर्विस` वर्ग पर ध्यान केंद्रित करता है। `एलेंस सर्विस` डेवलपरों के लिए एकमात्र इच्छित प्रवेश बिंदु है। + +## `एलेंस सर्विस` + +`एलेंस सर्विस` क्लास सभी sdk कार्यात्मकताओं के लिए एक उच्च-स्तरीय, अतुल्यकालिक इंटरफ़ेस प्रदान करता है। यह पीयरबिट क्लाइंट, `साइट` प्रोग्राम लाइफसाइकिल और सभी उपयोगकर्ता-फेसिंग ऑपरेशन का प्रबंधन करता है। + +### कन्स्ट्रक्टर + +```typescript +new LensService(options?: { + peerbit?: ProgramClient; + debug?: boolean; + customPrefix?: string; + identity?: Identity; +}) +``` + +सेवा का एक नया उदाहरण प्रारंभ करता है. + +|परैमिटर | प्रकार | ऑप्शनल | डिस्क्रिप्शन | +|----------------|-----------------|:--------:|---------------------------------------------------------------------------------------------------------| +| `ऑप्शन` | `आब्जिक्ट` | **Yes** | सेवा उदाहरण के लिए विन्यास. | +| `ऑप्शन.पीयरबिट`| `प्रोग्रामक्लियंट` | **Yes** | बाहरी रूप से प्रबंधित पीयरबिट क्लाइंट। यदि प्रदान किया जाता है, `इस में ()` और `स्टाप ()` अपने जीवनचक्र को प्रभावित नहीं करेगा. | +| `ऑप्शन.डीबग`| `बूलीआन` | **Yes** | कंसोल में वर्बोज डायग्नोस्टिक लागिंग सक्षम करता है। में डिफ़ॉल्ट `ग़लत`. | +| `ऑप्शन.मनपसंद प्रीफिक्स`| `स्ट्रिंग` | **Yes** | लॉग संदेश के लिए एक मनपसंद उपसर्ग सेट करता है. में डिफ़ॉल्ट `'[लेंस सेवा]'`. | +| `ऑप्शन.आइडेनटी`| `आइडेनटी` | **Yes** | सभी साइनिंग ऑपरेशन के लिए उपयोग करने के लिए एक कस्टम, उपयोगकर्ता केंद्रित पहचान (जैसे, एक वॉलेट से) यदि छोड़ा जाता है, सेवा पीयरबिट नोड की डिफ़ॉल्ट पहचान का उपयोग करती है. | + +--- + +## जीवनचक्र के तरीके + +ये तरीके पीयरबिट नेटवर्क और सक्रिय `साइट` प्रोग्राम से संबंध को नियंत्रित करते हैं। + +### `इस में()` + +```typescript +init(directory?: string): Promise +``` + +एक नया, आंतरिक रूप से प्रबंधित पीरबिट क्लाइंट प्रारंभ करता है। यदि किसी बाहरी क्लाइंट के साथ सेवा का निर्माण नहीं किया गया था तो इस पद्धति को किसी अन्य परिचालन से पहले बुलाया जाना चाहिए। + +| परैमिटर | प्रकार | ऑप्शनल | डिस्क्रिप्शन | +|-------------|----------|:--------:|--------------------------------------------------------------------------------------------| +| `डिरेक्टरी` | `स्ट्रिंग` | **Yes** | पीयर पहचान और डेटा के भंडारण के लिए फ़ाइल सिस्टम पथ. यदि छोड़ा जाता है, डेटा स्मृति में संग्रहीत है. | + +### `स्टाप()` + +```typescript +stop(): Promise +``` + +अच्छी तरह से सेवा को बंद कर देता है, सक्रिय `साइट' को बंद कर देता है और पीरबिट क्लाइंट (यदि आंतरिक रूप से प्रबंधित हो) को रोक देता है। + +### `ओपनसाइट()` + +```typescript +openSite( + siteOrAddress: Site | string, + options?: { siteArgs?: SiteArgs, federate?: boolean } +): Promise +``` + +एक `साइट` कार्यक्रम खोलता है, जो इसे बाद के सभी एपीआई कॉल के लिए सक्रिय संदर्भ बनाता है। + +| परैमिटर | प्रकार | ऑप्शनल | डिस्क्रिप्शन | +|-------------------|---------------------|:--------:|------------------------------------------------------------------------------------------------------------| +| `साइटोरैड्रेस` | `साइट \| स्ट्रिंग` | No | `साइट` बनाने के लिए `नई साइट` (rootTrust)` का उदाहरण दें। मौजूदा को खोलने के लिए अपना पता पास करें. | +| `ऑप्शन` | `वस्तु` | **Yes** | अतिरिक्त कॉन्फ़िगरेशन. | +| `ऑप्शन.साइटआर्ग्स`| `साइटआर्ग्स` | **Yes** | डेटाबेस प्रतिकृति के लिए उन्नत विन्यास. | +| `ऑप्शन.फेडरेट`| `बूलीआन` | **Yes** | यदि `. सही` है, तो सदस्यता को संभालने के लिए इस साइट के लिए `फेडरेशनमैनेजर`आरंभ करें. में डिफ़ॉल्ट `सही`. | + +--- + +## खाते और स्थिति के तरीके + +वर्तमान उपयोगकर्ता के बारे में जानकारी प्राप्त करने के लिए खाता और स्थिति विधि + +### `जीएसीसीटेटस()` + +```typescript +getAccountStatus(): Promise +``` + +वर्तमान की पूर्ण अनुमति स्थिति निर्धारित करता है **active identity** (पसंदीदा बटुआ या तयशुदा नोड पहचान) सक्रिय `साइट` के लिए। यह आवश्यक जानकारी प्राप्त करने का प्राथमिक तरीका है जिससे उपयोगकर्ता इंटरफ़ेस को उनकी क्षमताओं के अनुरूप बनाया जा सके।. + +```typescript +interface AccountStatusResponse { + isAdmin: boolean; // True if the user is a top-level administrator + roles: string[]; // An array of role names assigned to the user (e.g., ["moderator", "member"]) + permissions: string[]; // A flattened, unique list of all permissions granted by the user's roles +} +``` + +--- + +### एपीआई इनपुट प्रकार + +बातचीत को सरल बनाने के लिए, `एलेंस सर्विस` दस्तावेज बनाने और संपादन के लिए दो प्राथमिक इनपुट पैटर्न का उपयोग करता है। + +* **`इनपुट जोड़ें`**: इसका उपयोग नए दस्तावेज़ बनाने के लिए किया जाता है (उदाहरण के लिए, `रिलीज जोड़ें` में)। `इनपुट जोड़ें` प्रकार केवल `T` का उपनाम है। आप जिस दस्तावेज़ को बनाना चाहते हैं, उसके लिए केवल मुख्य डेटा गुण प्रदान करते हैं। `एलेंस सर्विस` आवश्यक `आइडी`, `पोस्टबी`, और `साइट पता` फ़ील्ड को स्वचालित रूप से जोड़ने के लिए ज़िम्मेदार है।. + +* **`इनपुट संपादित करें`**: इसका उपयोग मौजूदा दस्तावेज़ों को अद्यतन करने के लिए किया जाता है (उदाहरण के लिए, `संपादित करें` में)। यह प्रकार `टी और अशोभनीय` का उपनाम है। आपको दस्तावेज़ का पूरा डेटा प्रदान करना होगा, जिसमें मौजूदा दस्तावेज़ का `आइडी`, `पोस्टबी`, और `साइट पता` शामिल है। सेवा यह सत्यापित करेगी कि अपरिवर्तनीय गुण (`पोस्टबी` और `साइट पता`) बदले नहीं गए हैं।. + +--- + +## सामग्री प्रबंधन (जारी) + +प्राथमिक सामग्री प्रकार, `रीलीस` के निर्माण और प्रबंधन के लिए तरीके। + +### `रिलीज जोड़ें()` + +```typescript +addRelease(data: AddInput): Promise +``` + +एक नया `रीलीस` दस्तावेज बनाता है और बचाता है। `रिलीज: बनाएँ ` permission (जैसे, `सदस्य`, `माडरैटर`, `ऐड्मिन`) के साथ उपयोगकर्ता की भूमिका की आवश्यकता होती है. + +| परैमिटर | प्रकार | डिस्क्रिप्शन | +|-----------|---------------------|---------------------------------------------------------------------------------------------------------| +| `डेटा` | `इनपुट जोड़ें<रिलीज़डेटा>` | रिलीज़ गुणों के साथ एक वस्तु (`नाम`, `श्रेणीआईडी`, आदि.). | + +### `संपादित करें()` + +```typescript +editRelease(data: EditInput): Promise +``` + +मौजूदा `रिलीज` को अपडेट करें। आवश्यक अनुमति कार्रवाई पर निर्भर करती है: + +* एक उपयोगकर्ता `रिलीज: एडिट: ` अनुमति के साथ एक रिलीज को संपादित कर सकता है जहां वे हैं `पोस्टबी`. +* उपयोक्ता के साथ `रिलीज़: एडिट: एनी` अनुमति किसी भी रिलीज को संपादित कर सकता है. + +| परैमिटर | प्रकार | डिस्क्रिप्शन | +|-----------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| `डेटा` | `इनपुट संपादित करें<रिलीज़डेटा>` | अद्यतन करने के लिए दस्‍तावेज के `आईडी` सहित पूरा `मुक्त करना` डेटा। यदि `पोस्टबाई` या `साइट एड्रेस` संशोधित किया जाता है तो सेवा संपादन को अस्वीकार कर देगी. | + +मौजूदा `रिलीज` को अपडेट करें। `डेटा` ऑब्जेक्ट में `आईडी` अवश्य शामिल होना चाहिए। `एडीएमआई` के विशेषाधिकार की आवश्यकता है। +### `हटाएंरिलीज़()` + +```typescript +deleteRelease(id: string): Promise +``` + +`डेलीज़ ए` को इसकी आईडी द्वारा रिलीज किया गया है। `रिलीज: हटाएं` अनुमति की आवश्यकता होती है (जैसे, `मध्यस्थ`, `व्यवस्थापक`). + +### `विज्ञप्ति प्राप्त करें()` + +```typescript +getRelease(id: string): Promise | undefined> +``` + +अपनी आईडी द्वारा एकल `मुक्त करना`. को पुनः प्राप्त करता है। + +### `विज्ञप्ति प्राप्त करें()` + +```typescript +getReleases(options?: SearchOptions): Promise[]> +``` + +`रिलीज़` दस्तावेज़ों की एक सरणी पुनर्प्राप्त करता है. + +--- + +## विशिष्ट सामग्री प्रबंधन + +`विशेष रुप से प्रदर्शितरिलीज़` प्रविष्टियों के प्रबंधन के लिए तरीके। इन संचालनों के लिए `फीटर्ड:मैनेज ` अनुमति (उदाहरण के लिए, `मोडरेटर`, `एडमिन`) के साथ एक भूमिका की आवश्यकता होती है। + +### `विशेष रिलीज़ जोड़ें()` + +```typescript +addFeaturedRelease(data: AddInput): Promise +``` + +किसी मौजूदा `रिलीज़` को हाइलाइट करने के लिए `विशेष रुप से प्रदर्शितरिलीज़` बनाता है. + +### `संपादित करेंविशेष रुप से प्रदर्शितरिलीज़()` + +```typescript +editFeaturedRelease(data: EditInput): Promise +``` + +किसी मौजूदा `विशेष रुप से प्रदर्शितरिलीज़` को अपडेट करता है। `पहचान` मौजूद होना चाहिए, और मुख्य गुण (`के द्वारा प्रकाशित किया गया`, `साइट का पता`) बदले नहीं जा सकते। + +### `डिलीटफीचर्डरिलीज़()` + +```typescript +deleteFeaturedRelease(id:string): Promise +``` + +`विशेष रुप से प्रदर्शितरिलीज़` को उसकी आईडी से हटाता है. + +*(विधि `विशेष रिलीज़ प्राप्त करें` और `विशेष रिलीज़ प्राप्त करें` अपने `मुक्त करना` समकक्षों के समान पैटर्न का अनुसरण करते हैं।)* + +--- + +## सामग्री श्रेणी प्रबंधन + +'संपर्क श्रेणी के दस्तावेजों के प्रबंधन के लिए तरीके। इन कार्यों के लिए `श्रेणी:प्रबंध` की अनुमति (उदाहरण के लिए, `मॉडल`, `एडमिन`) के साथ एक भूमिका की आवश्यकता होती है। + +### `संपर्क वर्ग जोड़ें()` + +```typescript +addContentCategory(data: AddInput): Promise +``` + +एक नया `कंटेंट श्रेणी ` बनाता है. `श्रेणीकरण ` विशिष्ट होना चाहिए। + +### `संपर्क श्रेणी संपादित करें()` + +```typescript +editContentCategory(data: EditInput): Promise +``` + +मौजूदा अद्यतन करें `सामग्री श्रेणी`. सेवा अद्यतन को अस्वीकार कर देगा यदि स्थिर क्षेत्र(`पोस्टबी`, `साइट पताः`, `श्रेणी आईडी`) बदल रहे हैं. + +### `संपर्क वर्ग मिटाएँ()` + +```typescript +deleteContentCategory(id: string): Promise +``` + +अपनी आईडी से `कंटेंट श्रेणी` को हटाता है। + +### `संपर्क श्रेणी()` + +```typescript +getContentCategory(id: string): Promise | undefined> +``` + +अपनी आईडी से एकल `संपर्क श्रेणी` प्राप्त करता है। + +### `सामग्री श्रेणी()` + +```typescript +getContentCategories(options?: SearchOptions): Promise[]> +``` + +सभी `संपर्क श्रेणी` के दस्तावेजों की सरणी निकाल रहा है. +--- + +## संघ (सदस्यता) प्रबंधन + +फ़ेडरेशन संबंधों के प्रबंधन के तरीके। इन कार्यों के लिए `सब्सक्रिप्शन: मैनेज` अनुमति वाली भूमिका की आवश्यकता होती है (उदाहरण के लिए, ` माडरैटर`, `ऐड्मिन`)। + +### `एडुब्सक्रिप्शन()` + +```typescript +addSubscription(data: AddInput): Promise +``` + +एक अन्य `साइट` में सदस्यता लेता है, शुरू करने वाले फेडरेशन। + +| पैरामीटर | प्रकार | विवरण | +|-----------|------------|-------------------------------------------------------------| +| `डेटा` | `इनपुट जोड़ें<सदस्यताडेटा>` | सदस्यता गुणों के साथ एक वस्तु. + `सदस्यताडेटा` `{को:स्ट्रिंग } है` | + +### `डेलेसबस्क्रिप्शन()` + +```typescript +deleteSubscription(data: { id?: string; to?: string }): Promise +``` + +किसी `साइट` से अनाधिकार, 'स्टॉपिंग फेडरेशन' और इसकी सामग्री को शुद्ध करना। + +| पैरामीटर | प्रकार | विवरण | +|-----------|----------|----------------------------------------------------------------------| +| `डेटा` | `आब्जिक्ट` | एक वस्तु जिसमें या तो सदस्यता `आईडी` या लक्ष्य साइट का `टू` पता हटाने के लिए. | + +### `हसबस्क्रिप्ट()` + +```typescript +getSubscriptions(options?: SearchOptions): Promise +``` + +सभी वर्तमान `सदस्ता` दस्तावेजों की सूची निकाल रहा है. + +## अभिगम नियंत्रण प्रबंधन + +सक्रिय `साइट` पर उपयोगकर्ता अनुमति के प्रबंधन के लिए तरीके. ये ऑपरेशन विशेषाधिकार प्राप्त हैं और कर सकते हैं +**केवल एक प्रशासक द्वारा किया जाए**. + +### `ऐडएडमिन()` + +```typescript +addAdmin(publicKey: string | PublicSignKey): Promise +``` + +एक अन्य उपयोगकर्ता को एक पूर्ण प्रशासक के रूप में बढ़ावा देता है, उन्हें साइट के रूट `ट्रस्टेडनेटवर्क` में जोड़ देता है। + +| पैरामीटर | प्रकार | विवरण | +|-------------|------------------------|------------------------------------------------------------| +| `सार्वजनिक कुंजी` | `स्ट्रिंग \| सार्वजनिक संकेत कुंजी` | प्रचार करने के लिए उपयोगकर्ता की सार्वजनिक कुंजी. | + +### `कार्य सूची()` + +```typescript +assignRole(publicKey: string | PublicSignKey, roleId: string): Promise +``` + +उपयोगकर्ता को एक विशिष्ट भूमिका प्रदान करता है। + +| पैरामीटर | प्रकार | विवरण | +|-------------|------------------------|-----------------------------------------------------------------------------| +| `सार्वजनिक कुंजी` | `स्ट्रिंग \| सार्वजनिक संकेत कुंजी` |उपयोगकर्ता की सार्वजनिक कुंजी. | +| `रोलिड` | `स्ट्रिंग` | निर्दिष्ट करने के लिए भूमिका की स्ट्रिंग पहचानकर्ता (जैसे, `"मेम्बर"`, `"माडरैटर"`). | + +### `रेवोकेरोले()` + +```typescript +revokeRole(publicKey: string | PublicSignKey, roleId: string): Promise +``` + +उपयोगकर्ता की एक विशिष्ट भूमिका को संशोधित करता है। + +| पैरामीटर | प्रकार | विवरण | +|-------------|------------------------|-----------------------------------------------------------------------------| +| `सार्वजनिक कुंजी` | `स्ट्रिंग \| सार्वजनिक संकेत कुंजी` | उपयोगकर्ता की सार्वजनिक कुंजी. | +| `रोलिड` | `स्ट्रिंग` | रद्द करने की भूमिका का स्ट्रिंग पहचानकर्ता. | + +## सामान्य अनुक्रिया वस्तुएँ + +` एलेंस सर्विस` में अधिकांश तरीके निम्नलिखित मानकीकृत प्रतिक्रिया वस्तुओं में से एक को वापस करते हैं ताकि निरंतर त्रुटि हैंडलिंग और प्रतिक्रिया सुनिश्चित की जा सके। + +### `बेस रिस्पोंस` + +सरलतम प्रतिक्रिया वस्तु, जो केवल सफलता या विफलता को दर्शाता है। + +| फ़ील्ड | प्रकार | विवरण | +|------|------|-------------------------------------------------------| +| `सक्सेस` | `बूलीआन` | यदि ऑपरेशन सफल रहा तो `सही`, अन्यथा `गलत`. | +| `गलत` | `स्ट्रिंग` | यदि `सक्सेस` `गलत` है तो एक त्रुटि संदेश. | + +### `आईडी रिस्पोंस` + +प्रभावित दस्तावेज़ की विशिष्ट आईडी को शामिल करने के लिए `बेस रिस्पोंस` का विस्तार करता है। + +| फ़ील्ड | प्रकार | विवरण | +|-------|-----------|----------------------------------------------------------| +| `आइडी` | `स्ट्रिंग` | बनाए गए या संशोधित दस्तावेज़ का विशिष्ट पहचानकर्ता। | +| *(...`बेस रिस्पोंस` से विरासत में मिला है)* | | | + +### `हैश रिस्पोंस` + +ऑपरेशन के लॉग प्रविष्टि के क्रिप्टोग्राफिक हैश को भी शामिल करने के लिए `प्रतिक्रिया` का विस्तार करता है, जिसका उपयोग सत्यापन के लिए किया जा सकता है। + +| फ़ील्ड | प्रकार | विवरण | +|-------|-----------|---------------------------------------| +| `हैश`| `स्ट्रिंग` | अंतर्निहित P2P लॉग प्रविष्टि का क्रिप्टोग्राफ़िक हैश। | +| *(...`आईडी रिस्पोंस` से विरासत में मिला है)* | | | \ No newline at end of file diff --git a/content/docs/lens-sdk/core-concepts (copy).md b/content/docs/lens-sdk/core-concepts.hi.md similarity index 77% rename from content/docs/lens-sdk/core-concepts (copy).md rename to content/docs/lens-sdk/core-concepts.hi.md index c556396..1ce0407 100644 --- a/content/docs/lens-sdk/core-concepts (copy).md +++ b/content/docs/lens-sdk/core-concepts.hi.md @@ -5,11 +5,11 @@ title = 'Core Concepts' weight = 2 +++ -The Lens SDK is designed around a set of robust, interoperable components. A thorough understanding of these core concepts is essential for leveraging the full power and security of the SDK. This document provides a detailed overview of the foundational pillars of the Lens architecture: the `LensService`, the `Site` Program, the Federation Model, and the Access Control System. +लेंस एसडीके को मजबूत, इंटरऑपरेबल घटकों के सेट के आसपास डिजाइन किया गया है। एसडीके की पूर्ण शक्ति और सुरक्षा का लाभ उठाने के लिए इन कोर अवधारणाओं की पूरी समझ आवश्यक है। यह दस्तावेज लेंस वास्तुकला के मूलभूत स्तंभों का एक विस्तृत विवरण प्रदान करता है: `lensservice `, `site` कार्यक्रम, फेडरेशन मॉडल और एक्सेस कंट्रोल सिस्टम. -## 1. The Layered Architecture +## 1. लेयर्ड आर्किटेक्चर -The SDK employs a strict, layered architecture to promote modularity, security, and maintainability. Each layer has a distinct responsibility, and communication flows vertically through well-defined interfaces. +एसडीके मॉड्यूलरता, सुरक्षा और रखरखाव को बढ़ावा देने के लिए एक सख्त, लेयर्ड आर्किटेक्चर को नियोजित करता है। प्रत्येक परत की एक विशिष्ट जिम्मेदारी होती है, और अच्छी तरह से परिभाषित इंटरफेस के माध्यम से संचार ऊर्ध्वाधर रूप से बहता है। ```mermaid graph TD @@ -23,7 +23,7 @@ graph TD ``` -* **Service Layer (`LensService`):** This is the canonical public interface for the SDK. It is the sole entry point for any consuming application. Its purpose is to provide a stable, high-level, and asynchronous API that completely abstracts the complexities of the underlying P2P network and program logic. The service layer is responsible for managing the lifecycle of the P2P client and the active `Site` program. +* **Service Layer (`LensService`):** यह sdk के लिए कैननिकल पब्लिक इंटरफेस है। किसी भी उपभोक्ता अनुप्रयोग के लिए यह एकमात्र प्रवेश बिंदु है। इसका उद्देश्य एक स्थिर, उच्च स्तर और अतुल्यकालिक एपीआई प्रदान करना है जो पूरी तरह से अंतर्निहित p2p नेटवर्क और प्रोग्राम तर्क की जटिलताओं को अमूर्त करता है। सेवा स्तर पी2पी क्लाइंट के जीवन चक्र और सक्रिय 'साइट' कार्यक्रम के प्रबंधन के लिए जिम्मेदार है।. * **Program Layer (`Site` Program):** This is the "on-chain" or decentralized backend of the application. The `Site` program is a stateful, replicable "smart contract" that defines the application's data schemas, databases, and the immutable rules governing data access. It is the ultimate source of truth for all content and permissions within a given `Site`. diff --git a/content/docs/lens-sdk/quick-start (copy).md b/content/docs/lens-sdk/quick-start.hi.md similarity index 100% rename from content/docs/lens-sdk/quick-start (copy).md rename to content/docs/lens-sdk/quick-start.hi.md From bb9be272d39542fbfb011bbf2a4f46f3c17332e7 Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Wed, 5 Nov 2025 07:48:27 +0530 Subject: [PATCH 3/8] translator english to hindi --- content/docs/lens-sdk/api-reference (copy).md | 357 ------------------ content/docs/lens-sdk/core-concepts.hi.md | 82 ++-- content/docs/lens-sdk/quick-start.hi.md | 36 +- 3 files changed, 60 insertions(+), 415 deletions(-) delete mode 100644 content/docs/lens-sdk/api-reference (copy).md diff --git a/content/docs/lens-sdk/api-reference (copy).md b/content/docs/lens-sdk/api-reference (copy).md deleted file mode 100644 index 1ce6c86..0000000 --- a/content/docs/lens-sdk/api-reference (copy).md +++ /dev/null @@ -1,357 +0,0 @@ -+++ -date = '2025-07-22T05:45:03+02:00' -draft = false -title = 'API Reference' -weight = 5 -+++ - -This document provides a detailed reference for the public API of the Lens SDK, primarily focusing on the `LensService` class. The `LensService` is the sole intended entry point for developers building applications with the SDK. - -## `LensService` - -The `LensService` class provides a high-level, asynchronous interface for all SDK functionalities. It manages the Peerbit client, the `Site` program lifecycle, and all user-facing operations. - -### Constructor - -```typescript -new LensService(options?: { - peerbit?: ProgramClient; - debug?: boolean; - customPrefix?: string; - identity?: Identity; -}) -``` - -Initializes a new instance of the service. - -| Parameter | Type | Optional | Description | -|----------------|-----------------|:--------:|---------------------------------------------------------------------------------------------------------| -| `options` | `object` | **Yes** | Configuration for the service instance. | -| `options.peerbit`| `ProgramClient` | **Yes** | An externally managed Peerbit client. If provided, `init()` and `stop()` will not affect its lifecycle. | -| `options.debug`| `boolean` | **Yes** | Enables verbose diagnostic logging to the console. Defaults to `false`. | -| `options.customPrefix`| `string` | **Yes** | Sets a custom prefix for log messages. Defaults to `'[LensService]'`. | -| `options.identity`| `Identity` | **Yes** | A custom, user-centric identity (e.g., from a wallet) to use for all signing operations. If omitted, the service uses the Peerbit node's default identity. | - ---- - -## Lifecycle Methods - -These methods control the connection to the Peerbit network and the active `Site` program. - -### `init()` - -```typescript -init(directory?: string): Promise -``` - -Initializes and starts a new, internally managed Peerbit client. This method must be called before any other operations if the service was not constructed with an external client. - -| Parameter | Type | Optional | Description | -|-------------|----------|:--------:|--------------------------------------------------------------------------------------------| -| `directory` | `string` | **Yes** | The file system path for storing peer identity and data. If omitted, data is stored in memory. | - -### `stop()` - -```typescript -stop(): Promise -``` - -Gracefully shuts down the service, closing the active `Site` and stopping the Peerbit client (if internally managed). - -### `openSite()` - -```typescript -openSite( - siteOrAddress: Site | string, - options?: { siteArgs?: SiteArgs, federate?: boolean } -): Promise -``` - -Opens a `Site` program, making it the active context for all subsequent API calls. - -| Parameter | Type | Optional | Description | -|-------------------|---------------------|:--------:|------------------------------------------------------------------------------------------------------------| -| `siteOrAddress` | `Site \| string` | No | To create a new `Site`, pass a `new Site(rootTrust)` instance. To open an existing one, pass its address. | -| `options` | `object` | **Yes** | Additional configuration. | -| `options.siteArgs`| `SiteArgs` | **Yes** | Advanced configuration for database replication. | -| `options.federate`| `boolean` | **Yes** | If `true`, starts the `FederationManager` for this site to handle subscriptions. Defaults to `true`. | - ---- - -## Account and Status Methods - -Methods for retrieving information about the current user. - -### `getAccountStatus()` - -```typescript -getAccountStatus(): Promise -``` - -Determines the full permission status of the current **active identity** (custom wallet or default node identity) for the active `Site`. This is the primary method for fetching the necessary information to render a user interface tailored to their capabilities. - -```typescript -interface AccountStatusResponse { - isAdmin: boolean; // True if the user is a top-level administrator - roles: string[]; // An array of role names assigned to the user (e.g., ["moderator", "member"]) - permissions: string[]; // A flattened, unique list of all permissions granted by the user's roles -} -``` - ---- - -### API Input Types - -To simplify interactions, the `LensService` uses two primary input patterns for creating and editing documents. - -* **`AddInput`**: This is used for creating new documents (e.g., in `addRelease`). The type `AddInput` is an alias for just `T`. You provide only the core data properties for the document you want to create. The `LensService` is responsible for automatically adding the required `id`, `postedBy`, and `siteAddress` fields. - -* **`EditInput`**: This is used for updating existing documents (e.g., in `editRelease`). This type is an alias for `T & ImmutableProps`. You must provide the full data for the document, including the `id`, `postedBy`, and `siteAddress` of the existing document. The service will verify that the immutable properties (`postedBy` and `siteAddress`) have not been changed. - ---- - -## Content Management (Releases) - -Methods for creating and managing the primary content type, `Release`. - -### `addRelease()` - -```typescript -addRelease(data: AddInput): Promise -``` - -Creates and saves a new `Release` document. Requires the user to have a role with the `release:create` permission (e.g., `Member`, `Moderator`, `Admin`). - -| Parameter | Type | Description | -|-----------|---------------------|---------------------------------------------------------------------------------------------------------| -| `data` | `AddInput` | An object with the release properties (`name`, `categoryId`, etc.). | - -### `editRelease()` - -```typescript -editRelease(data: EditInput): Promise -``` - -Updates an existing `Release`. The required permission depends on the action: - -* A user with the `release:edit:own` permission can edit a release where they are the `postedBy`. -* A user with the `release:edit:any` permission can edit any release. - -| Parameter | Type | Description | -|-----------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------| -| `data` | `EditInput` | The full `Release` data, including the `id` of the document to update. The service will reject the edit if `postedBy` or `siteAddress` are modified. | - -Updates an existing `Release`. The `data` object must include the `id`. Requires `ADMIN` privileges. - -### `deleteRelease()` - -```typescript -deleteRelease(id: string): Promise -``` - -Deletes a `Release` by its ID. Requires the `release:delete` permission (e.g., `Moderator`, `Admin`). - -### `getRelease()` - -```typescript -getRelease(id: string): Promise | undefined> -``` - -Retrieves a single `Release` by its ID. - -### `getReleases()` - -```typescript -getReleases(options?: SearchOptions): Promise[]> -``` - -Retrieves an array of `Release` documents. - ---- - -## Featured Content Management - -Methods for managing `FeaturedRelease` entries. These operations require a role with the `featured:manage` permission (e.g., `Moderator`, `Admin`). - -### `addFeaturedRelease()` - -```typescript -addFeaturedRelease(data: AddInput): Promise -``` - -Creates a `FeaturedRelease` to highlight an existing `Release`. - -### `editFeaturedRelease()` - -```typescript -editFeaturedRelease(data: EditInput): Promise -``` - -Updates an existing `FeaturedRelease`. The `id` must be present, and core properties (`postedBy`, `siteAddress`) cannot be changed. - -### `deleteFeaturedRelease()` - -```typescript -deleteFeaturedRelease(id:string): Promise -``` - -Deletes a `FeaturedRelease` by its ID. - -*(Methods `getFeaturedRelease` and `getFeaturedReleases` follow the same pattern as their `Release` counterparts.)* - ---- - -## Content Category Management - -Methods for managing `ContentCategory` documents. These operations require a role with the `category:manage` permission (e.g., `Moderator`, `Admin`). - -### `addContentCategory()` - -```typescript -addContentCategory(data: AddInput): Promise -``` - -Creates a new `ContentCategory`. The `categoryId` must be unique. - -### `editContentCategory()` - -```typescript -editContentCategory(data: EditInput): Promise -``` - -Updates an existing `ContentCategory`. The service will reject the update if immutable fields (`postedBy`, `siteAddress`, `categoryId`) are changed. - -### `deleteContentCategory()` - -```typescript -deleteContentCategory(id: string): Promise -``` - -Deletes a `ContentCategory` by its ID. - -### `getContentCategory()` - -```typescript -getContentCategory(id: string): Promise | undefined> -``` - -Retrieves a single `ContentCategory` by its ID. - -### `getContentCategories()` - -```typescript -getContentCategories(options?: SearchOptions): Promise[]> -``` - -Retrieves an array of all `ContentCategory` documents. - ---- - -## Federation (Subscription) Management - -Methods for managing federation relationships. These operations require a role with the `subscription:manage` permission (e.g., `Moderator`, `Admin`). - -### `addSubscription()` - -```typescript -addSubscription(data: AddInput): Promise -``` - -Subscribes to another `Site`, initiating federation. - -| Parameter | Type | Description | -|-----------|------------|-------------------------------------------------------------| -| `data` | `AddInput` | An object with the subscription properties. `SubscriptionData` is `{ to: string }` | - -### `deleteSubscription()` - -```typescript -deleteSubscription(data: { id?: string; to?: string }): Promise -``` - -Unsubscribes from a `Site`, stopping federation and purging its content. - -| Parameter | Type | Description | -|-----------|----------|----------------------------------------------------------------------| -| `data` | `object` | An object containing either the subscription `id` or the target site's `to` address to remove. | - -### `getSubscriptions()` - -```typescript -getSubscriptions(options?: SearchOptions): Promise -``` - -Retrieves a list of all current `Subscription` documents. - -## Access Control Management - -Methods for managing user permissions on the active `Site`. These operations are privileged and can **only be performed by an Administrator**. - -### `addAdmin()` - -```typescript -addAdmin(publicKey: string | PublicSignKey): Promise -``` - -Promotes another user to be a full Administrator, adding them to the site's root `TrustedNetwork`. - -| Parameter | Type | Description | -|-------------|------------------------|------------------------------------------------------------| -| `publicKey` | `string \| PublicSignKey` | The public key of the user to promote. | - -### `assignRole()` - -```typescript -assignRole(publicKey: string | PublicSignKey, roleId: string): Promise -``` - -Assigns a specific role to a user. - -| Parameter | Type | Description | -|-------------|------------------------|-----------------------------------------------------------------------------| -| `publicKey` | `string \| PublicSignKey` | The public key of the user. | -| `roleId` | `string` | The string identifier of the role to assign (e.g., `"member"`, `"moderator"`). | - -### `revokeRole()` - -```typescript -revokeRole(publicKey: string | PublicSignKey, roleId: string): Promise -``` - -Revokes a specific role from a user. - -| Parameter | Type | Description | -|-------------|------------------------|-----------------------------------------------------------------------------| -| `publicKey` | `string \| PublicSignKey` | The public key of the user. | -| `roleId` | `string` | The string identifier of the role to revoke. | - -## Common Response Objects - -Most methods in the `LensService` return one of the following standardized response objects to ensure consistent error handling and feedback. - -### `BaseResponse` - -The simplest response object, indicating only success or failure. - -| Field | Type | Description | -|-----------|-----------|-------------------------------------------------------| -| `success` | `boolean` | `true` if the operation was successful, otherwise `false`. | -| `error` | `string` | An error message if `success` is `false`. | - -### `IdResponse` - -Extends `BaseResponse` to include the unique ID of the document that was affected. - -| Field | Type | Description | -|-------|----------|-----------------------------------------------------------| -| `id` | `string` | The unique identifier of the created or modified document. | -| *(...inherits from `BaseResponse`)* | | | - -### `HashResponse` - -Extends `IdResponse` to also include the cryptographic hash of the operation's log entry, which can be used for verification. - -| Field | Type | Description | -|-------|----------|------------------------------------------------------| -| `hash`| `string` | The cryptographic hash of the underlying P2P log entry. | -| *(...inherits from `IdResponse`)* | | | diff --git a/content/docs/lens-sdk/core-concepts.hi.md b/content/docs/lens-sdk/core-concepts.hi.md index 1ce0407..b44c7f1 100644 --- a/content/docs/lens-sdk/core-concepts.hi.md +++ b/content/docs/lens-sdk/core-concepts.hi.md @@ -5,7 +5,7 @@ title = 'Core Concepts' weight = 2 +++ -लेंस एसडीके को मजबूत, इंटरऑपरेबल घटकों के सेट के आसपास डिजाइन किया गया है। एसडीके की पूर्ण शक्ति और सुरक्षा का लाभ उठाने के लिए इन कोर अवधारणाओं की पूरी समझ आवश्यक है। यह दस्तावेज लेंस वास्तुकला के मूलभूत स्तंभों का एक विस्तृत विवरण प्रदान करता है: `lensservice `, `site` कार्यक्रम, फेडरेशन मॉडल और एक्सेस कंट्रोल सिस्टम. +लेंस एसडीके को मजबूत, इंटरऑपरेबल घटकों के सेट के आसपास डिजाइन किया गया है। एसडीके की पूर्ण शक्ति और सुरक्षा का लाभ उठाने के लिए इन कोर अवधारणाओं की पूरी समझ आवश्यक है। यह दस्तावेज लेंस वास्तुकला के मूलभूत स्तंभों का एक विस्तृत विवरण प्रदान करता है: `एलेंस सर्विस `, `साइट` कार्यक्रम, फेडरेशन मॉडल और एक्सेस कंट्रोल सिस्टम. ## 1. लेयर्ड आर्किटेक्चर @@ -23,79 +23,81 @@ graph TD ``` -* **Service Layer (`LensService`):** यह sdk के लिए कैननिकल पब्लिक इंटरफेस है। किसी भी उपभोक्ता अनुप्रयोग के लिए यह एकमात्र प्रवेश बिंदु है। इसका उद्देश्य एक स्थिर, उच्च स्तर और अतुल्यकालिक एपीआई प्रदान करना है जो पूरी तरह से अंतर्निहित p2p नेटवर्क और प्रोग्राम तर्क की जटिलताओं को अमूर्त करता है। सेवा स्तर पी2पी क्लाइंट के जीवन चक्र और सक्रिय 'साइट' कार्यक्रम के प्रबंधन के लिए जिम्मेदार है।. +* **Service Layer (``एलेंस सर्विस`):** यह sdk के लिए कैननिकल पब्लिक इंटरफेस है। किसी भी उपभोक्ता अनुप्रयोग के लिए यह एकमात्र प्रवेश बिंदु है। इसका उद्देश्य एक स्थिर, उच्च स्तर और अतुल्यकालिक एपीआई प्रदान करना है जो पूरी तरह से अंतर्निहित p2p नेटवर्क और प्रोग्राम तर्क की जटिलताओं को अमूर्त करता है। सेवा स्तर पी2पी क्लाइंट के जीवन चक्र और सक्रिय 'साइट' कार्यक्रम के प्रबंधन के लिए जिम्मेदार है।. -* **Program Layer (`Site` Program):** This is the "on-chain" or decentralized backend of the application. The `Site` program is a stateful, replicable "smart contract" that defines the application's data schemas, databases, and the immutable rules governing data access. It is the ultimate source of truth for all content and permissions within a given `Site`. +* **Program Layer (`साइट` Program):** यह है "ऑन-चेन" या अनुप्रयोग के विकेन्द्रीकृत बैकएण्ड.`साइट` कार्यक्रम एक राज्य है, प्रतिकृति "स्मार्ट कॉन्ट्रैक्ट" जो अनुप्रयोग के डाटा स्कीमा को परिभाषित करता है, डेटाबेस, और डेटा अभिगम को नियंत्रित करने वाले अपरिवर्तनीय नियम. यह सभी सामग्री और अनुमति के लिए एक दिए गए के भीतर सत्य का अंतिम स्रोत है `साइट`. -* **Federation Layer (`FederationManager`):** This is a specialized, internal component managed by the `LensService`. It orchestrates all inter-program communication. While the `Site` program defines *what* data exists, the `FederationManager` defines *how* that data is discovered, synchronized, and shared between different `Site` instances. +* **Federation Layer (`FederationManager`):** यह एक विशेषीकृत है, आंतरिक घटक द्वारा प्रबंधित`एलेंस सर्विस`.यह सभी इंटर-प्रोग्राम संचार को व्यवस्थित करता है.जबकि प्रोग्राम * क्या डेटा मौजूद है,`FederationManager` को परिभाषित करता है कि डेटा की खोज की गई है, तुल्यकालिक, और विभिन्न उदाहरणों के बीच साझा। `साइट`. -* **P2P Framework Layer (Peerbit):** The foundational layer that provides the necessary primitives for peer-to-peer networking, database creation, data replication, and cryptographic identity. The Lens SDK is built directly upon this robust framework. +* **P2P Framework Layer (Peerbit):**मूलभूत परत जो पीयर-टू-पीयर नेटवर्किंग, डेटाबेस निर्माण के लिए आवश्यक प्राइमिटिव प्रदान करता है, डेटा प्रतिकृति, और क्रिप्टोग्राफिक पहचान. लेंस एसडीके इस मजबूत ढांचे पर सीधे बनाया गया है. -## 2. The `Site` Program: A Sovereign Digital Entity +## 2. The `साइट` Program: A Sovereign Digital Entity -The central construct in the Lens ecosystem is the `Site`. Conceptually, a `Site` is a sovereign, addressable, and self-contained digital space. It functions as a decentralized application instance, complete with its own databases and access control system. +लेंस इकोसिस्टम में केंद्रीय निर्माण है `साइट`. कन्सेप्चूअल्ली,एक `साइट` एक संप्रभु, पता योग्य और स्व-निहित डिजिटल स्थान है। यह एक विकेंद्रीकृत एप्लिकेशन इंस्टेंस के रूप में कार्य करता है, जिसमें अपनी स्वयं की डेटाबेस और पहुँच नियंत्रण प्रणाली होती है। -### Key Characteristics of a `Site` - -* **Unique, Verifiable Address:** Every `Site` is identified by a permanent, cryptographic address derived from its owner's public key and its initial parameters. This address is used to locate, open, and interact with the `Site` on the network. -* **Structured Data Stores:** A `Site` is a collection of discrete, purpose-built data stores for `Releases`, `ContentCategories`, `Subscriptions`, and more. This structured approach ensures data integrity and organizational clarity. -* **Explicit Permissions:** Access to a `Site` is not public by default. All write permissions are explicitly granted by an **Administrator** through a robust Role-Based Access Control (RBAC) system. +### Key Characteristics of a `साइट` +* **Unique, Verifiable Address:**हर `साइट` को उसके मालिक की सार्वजनिक कुंजी और उसकी प्रारंभिक पैरामीटर्स से निकाले गए स्थायी, क्रिप्टोग्राफिक पते द्वारा पहचाना जाता है। इस पते का उपयोग नेटवर्क पर `साइट` को ढूँढने, खोलने और उसके साथ इंटरैक्ट करने के लिए किया जाता है। +* **Structured Data Stores:**`साइट` विभिन्न, विशेष उद्देश्य के लिए बनाए गए डेटा स्टोर्स का संग्रह है, जैसे कि `Releases`, `ContentCategories`, `Subscriptions` और अन्य। यह संरचित दृष्टिकोण डेटा की अखंडता और संगठनात्मक स्पष्टता सुनिश्चित करता है। +* **स्पष्ट अनुमतियाँ:** `साइट` तक पहुँच डिफ़ॉल्ट रूप से सार्वजनिक नहीं होती है। सभी लेखन अनुमतियाँ स्पष्ट रूप से एक **प्रशासक** द्वारा एक मजबूत Role-Based Access Control (RBAC) प्रणाली के माध्यम से प्रदान की जाती हैं। ## 3. The Federation Model: Principled Data Exchange -Federation is the process by which independent `Site` instances share data. The Lens SDK implements a principled, subscription-based model to ensure that all data exchange is intentional and secure. +फेडरेशन वह प्रक्रिया है जिसके द्वारा स्वतंत्र `साइट` उदाहरण डेटा साझा करते हैं। Lens SDK एक सिद्धांत-आधारित, सब्सक्रिप्शन मॉडल को लागू करता है ताकि सुनिश्चित किया जा सके कि सभी डेटा विनिमय जानबूझकर और सुरक्षित रूप से हो। ### The Federation Lifecycle -1. **Explicit Subscription:** The process is initiated by a user with `subscription:manage` permission (typically a `Moderator` or `Admin`). To federate, they create a `Subscription` record containing the target `Site`'s address. This action is a deliberate declaration of trust. +1. **Explicit Subscription:**यह प्रक्रिया उस उपयोगकर्ता द्वारा शुरू की जाती है जिसके पास `subscription:manage` अनुमति है (आमतौर पर एक `मॉडरेटर` या `एडमिन`)। फ़ेडरेट करने के लिए, वे एक `सब्सक्रिप्शन` रिकॉर्ड बनाते हैं जिसमें लक्ष्य `साइट` का पता शामिल होता है। यह क्रिया विश्वास की जानबूझकर घोषणा है। -2. **State Synchronization:** Upon the creation of a `Subscription`, the `FederationManager` performs two types of synchronization: - * **Historical Sync:** A one-time process that connects to the remote `Site` and replicates its existing public content (e.g., `Releases`). - * **Live Sync:** The manager subscribes to the remote `Site`'s dedicated pub/sub topic, creating a persistent, real-time communication channel for immediate updates. +2. **राज्य समकालिकीकरण:** `Subscription` के निर्माण के समय, `FederationManager` दो प्रकार के समकालिकीकरण करता है: + * **ऐतिहासिक समन्वय:** एक एकबारगी प्रक्रिया जो रिमोट `साइट` से जुड़ती है और इसके मौजूदा सार्वजनिक सामग्री (जैसे, `रिलीज़`) की नकल करती है। + * **लाइव सिंक:** प्रबंधक रिमोट `साइट` के समर्पित पब/सबसक्राइब टॉपिक को सब्सक्राइब करता है, जिससे तात्कालिक अपडेट के लिए एक स्थायी, वास्तविक समय संचार चैनल बनता है। -3. **Data Provenance:** All data received via federation is immutable and retains the cryptographic signature of its original author and the address of its originating `Site`. This guarantees that the source of all content can be verified. +3. **डेटा प्रावेनेंस:** फ़ेडरेशन के माध्यम से प्राप्त सभी डेटा अपरिवर्तनीय हैं और इसके मूल लेखक के क्रिप्टोग्राफ़िक हस्ताक्षर और इसके उत्पत्ति वाले `साइट` का पता रखते हैं। यह सुनिश्चित करता है कि सभी सामग्री का स्रोत सत्यापित किया जा सकता है। -4. **Lifecycle Termination:** If a `Subscription` is deleted, the `FederationManager` performs a cleanup operation, purging all data associated with the unsubscribed `Site` from its local databases. +4.**लाइफसाइकिल समाप्ति:** यदि कोई `Subscription` हटाया जाता है, तो `FederationManager` एक क्लीनअप ऑपरेशन करता है, जिससे सभी डेटा जो अनसब्सक्राइब किए गए `साइट` से संबंधित हैं, उसके स्थानीय डेटाबेस से हटा दिए जाते हैं। ## 4. The Access Control System (RBAC) -Security is integral to the `Site` program. The system is built on a robust and secure **Role-Based Access Control (RBAC)** model, managed by a dedicated internal `RoleBasedccessController`. This controller is the ultimate authority for all actions within a `Site`. +सुरक्षा `साइट` प्रोग्राम का अभिन्न हिस्सा है। सिस्टम एक मजबूत और सुरक्षित **रोल-आधारित एक्सेस कंट्रोल (RBAC)** मॉडल पर आधारित है, जिसे एक समर्पित आंतरिक `RoleBasedccessController` द्वारा प्रबंधित किया जाता है। यह कंट्रोलर `साइट` के भीतर सभी कार्यों के लिए अंतिम प्राधिकरण है। ### Identity and Signing -Every action that modifies a `Site` (like adding a release or assigning a role) must be cryptographically signed. The Lens SDK supports two models for this identity: +हर वह क्रिया जो किसी `साइट` को संशोधित करती है (जैसे रिलीज़ जोड़ना या रोल असाइन करना) को क्रिप्टोग्राफिक रूप से साइन किया जाना चाहिए। Lens SDK इस पहचान के लिए दो मॉडलों का समर्थन करता है: -1. **Default Node Identity:** If you initialize `LensService` without specifying a custom identity, it will use an auto-generated identity tied to the Peerbit node itself. This is suitable for server-side scripts or headless nodes where a single, consistent identity is desired. +1. **डिफ़ॉल्ट नोड पहचान:** यदि आप `एलेंस सर्विस` को किसी कस्टम पहचान निर्दिष्ट किए बिना प्रारंभ करते हैं, तो यह Peerbit नोड से जुड़ी एक स्वचालित रूप से उत्पन्न पहचान का उपयोग करेगा। यह सर्वर-साइड स्क्रिप्ट या हेडलेस नोड्स के लिए उपयुक्त है, जहाँ एक सिंगल, स्थिर पहचान आवश्यक होती है। -2. **Custom Wallet Identity:** For user-facing applications, the recommended approach is to provide a custom identity derived from the user's own wallet (e.g., MetaMask). When you instantiate `LensService` with this custom identity, **all subsequent actions are signed by the user's wallet**. This ensures that the user, not the application node, is the true owner and author of their content. This is the foundation of data sovereignty in the Lens SDK. +2.**कस्टम वॉलेट पहचान:** उपयोगकर्ता से संबंधित अनुप्रयोगों के लिए, अनुशंसित तरीका यह है कि उपयोगकर्ता के अपने वॉलेट (जैसे, MetaMask) से प्राप्त कस्टम पहचान प्रदान की जाए। जब आप इस कस्टम पहचान के साथ `एलेंस सर्विस` को प्रारंभ करते हैं, तो **सभी बाद के कार्य उपयोगकर्ता के वॉलेट द्वारा हस्ताक्षरित होते हैं**। यह सुनिश्चित करता है कि सामग्री का वास्तविक मालिक और लेखक उपयोगकर्ता ही है, न कि एप्लिकेशन नोड। यह Lens SDK में डेटा संप्रभुता का आधार है। ### The RBAC Components -* **Administrators (`TrustedNetwork`):** At the top level is a `TrustedNetwork` of administrators. Any user whose public key is in this network is considered an **Admin**. Admins have universal permissions and are the only users who can manage the RBAC system itself (e.g., create new roles, assign roles to users, or add other Admins). The initial creator of a `Site` is its first `Admin`. +* **Administrators (`TrustedNetwork`):** उच्च स्तर पर प्रशासकों का एक `TrustedNetwork` होता है। किसी भी उपयोगकर्ता जिसकी सार्वजनिक कुंजी इस नेटवर्क में है, उसे **Admin** माना जाता है। Admins के पास सार्वभौमिक अनुमतियाँ होती हैं और केवल वही उपयोगकर्ता हैं जो स्वयं RBAC सिस्टम का प्रबंधन कर सकते हैं (जैसे, नए रोल बनाना, उपयोगकर्ताओं को रोल असाइन करना, या अन्य Admins जोड़ना)। एक `साइट` का प्रारंभिक निर्माता इसका पहला `Admin` होता है। -* **Roles:** A `Role` is a named collection of specific permissions. A `Site` is initialized with a set of default roles, and Admins can create new custom roles as needed. +* **भूमिकाएँ:** एक `भूमिका` विशिष्ट अनुमतियों का नामित संग्रह होती है। एक `साइट` को डिफ़ॉल्ट भूमिकाओं के सेट के साथ आरंभ किया जाता है, और एडमिन आवश्यकतानुसार नई कस्टम भूमिकाएँ बना सकते हैं। -* **Permissions:** A `Permission` is a granular string that represents a specific action, typically in the format `"resource:action"` (e.g., `"release:delete"`). +* **अनुमतियाँ:** एक 'अनुमति' एक विस्तृत स्ट्रिंग है जो एक विशिष्ट क्रिया का प्रतिनिधित्व करती है, आमतौर पर प्रारूप में '"संसाधन: कार्रवाई"' (उदाहरण के लिए, '"रिलीज़: हटाएं")। -* **Assignments:** An `Assignment` is a verifiable link between a user's public key and a `Role`. A user gains permissions by virtue of the roles they are assigned. +* **असाइनमेंट:** एक `असाइनमेंट` एक उपयोगकर्ता की सार्वजनिक कुंजी और एक `भूमिका` के बीच सत्यापनीय लिंक है। उपयोगकर्ता उन भूमिकाओं के आधार पर अनुमति प्राप्त करता है जो उन्हें असाइन की गई हैं। ### Default Roles and Permissions Table -A `Site` comes with a clear set of default roles, providing a sensible permission structure out of the box. An **Admin** can perform all actions listed below. +एक `साइट` में स्पष्ट रूप से निर्धारित डिफ़ॉल्ट भूमिकाएँ होती हैं, जो तुरंत उपयोग के लिए एक तार्किक अनुमति संरचना प्रदान करती हैं। एक **एडमिन** नीचे सूचीबद्ध सभी क्रियाएँ कर सकता है। -| Action / Permission (`resource:action`) | Moderator | Member | Guest | Description | +| क्रिया / अनुमति (`resource:action`) | मॉडरेटर | सदस्य | अतिथि | विवरण | |-----------------------------------------|:---------:|:------:|:-----:|--------------------------------------------------------------------------| -| **`release:create`** | ✅ | ✅ | ❌ | Can publish new `Release` documents. | -| **`release:edit:own`** | ✅ | ✅ | ❌ | Can edit `Release` documents they personally posted. | -| **`release:edit:any`** | ✅ | ❌ | ❌ | Can edit `Release` documents posted by *any* user on the site. | -| **`release:delete`** | ✅ | ❌ | ❌ | Can delete any `Release` from the site. | -| **`featured:manage`** | ✅ | ❌ | ❌ | Can create, edit, or delete `FeaturedRelease` entries. | -| **`category:manage`** | ✅ | ❌ | ❌ | Can create, edit, or delete `ContentCategory` documents. | -| **`blocklist:manage`** | ✅ | ❌ | ❌ | Can create or delete `BlockedContent` entries. | -| **`subscription:manage`** | ✅ | ❌ | ❌ | Can subscribe to or unsubscribe from other sites. | - -* **Guest (Implicit Role):** This is the default status for any user who is not an Admin and has not been assigned any roles. `Guests` have read-only access and cannot perform any write operations. +| **`release:create`** | ✅ | ✅ | ❌ | नई `रिलीज़` प्रकाशित कर सकते हैं दस्तावेज़. | +| **`release:edit:own`** | ✅ | ✅ | ❌ | वे जिन `रिलीज़` दस्तावेज़ों को उन्होंने स्वयं पोस्ट किया है, उन्हें संपादित कर सकते हैं। | +| **`release:edit:any`** | ✅ | ❌ | ❌ | साइट पर किसी भी उपयोगकर्ता द्वारा पोस्ट किए गए `Release` दस्तावेज़ को संपादित कर सकते हैं. | +| **`release:delete`** | ✅ | ❌ | ❌ | साइट से किसी भी `रिलीज़` को हटाया जा सकता है. | +| **`featured:manage`** | ✅ | ❌ | ❌ | सृजन कर सकते हैं, संपादित कर सकते हैं, या हटा सकते हैं +`FeaturedRelease` प्रविष्टियाँ. | +| **`category:manage`** | ✅ | ❌ | ❌ | सृजन कर सकते हैं, संपादित कर सकते हैं, या हटा सकते हैं +`ContentCategory` दस्तावेज़. | +| **`blocklist:manage`** | ✅ | ❌ | ❌ | बना या हटाया जा सकता है +`BlockedContent` प्रविष्टियाँ. | +| **`subscription:manage`** | ✅ | ❌ | ❌ | अन्य साइटों की सदस्यता ले सकते हैं या सदस्यता समाप्त कर सकते हैं।. | + +* **अतिथि (अप्रत्यक्ष भूमिका):** यह किसी भी उपयोगकर्ता के लिए डिफ़ॉल्ट स्थिति है जो एडमिन नहीं है और जिसे कोई भूमिका नहीं सौंपी गई है। `अतिथि` केवल पढ़ सकते हैं और कोई लिखने का कार्य नहीं कर सकते। ### Federation and Permissions -The RBAC model extends intelligently to federated content. While trust is primarily based on the subscription, the Lens SDK provides a powerful override: **a local `Admin` or `Moderator` can always act on federated content** (e.g., delete a stale post from an unsubscribed site). This ensures that local site owners maintain ultimate control over the content stored in their databases. +RBAC मॉडल संघीय सामग्री तक बुद्धिमानी से विस्तारित होता है। जबकि भरोसा मुख्य रूप से सदस्यता पर आधारित होता है, Lens SDK एक शक्तिशाली अधिलेख प्रदान करता है: **एक स्थानीय `प्रशासक` या `मध्यस्थ` हमेशा संघीय सामग्री पर कार्रवाई कर सकता है** (उदा., किसी अनसदस्यित साइट से पुरानी पोस्ट हटाना)। यह सुनिश्चित करता है कि स्थानीय साइट मालिक अपने डेटाबेस में संग्रहित सामग्री पर अंतिम नियंत्रण बनाए रखें। \ No newline at end of file diff --git a/content/docs/lens-sdk/quick-start.hi.md b/content/docs/lens-sdk/quick-start.hi.md index 07aa9b6..7fec175 100644 --- a/content/docs/lens-sdk/quick-start.hi.md +++ b/content/docs/lens-sdk/quick-start.hi.md @@ -5,24 +5,24 @@ title = 'Quick Start' weight = 1 +++ -This guide provides a step-by-step walkthrough to get a basic application running with the Lens SDK. By the end of this guide, you will have initialized the service, created a new `Site`, populated it with default content categories, added content, and retrieved it. +यह गाइड Lens SDK के साथ एक मूल एप्लिकेशन चलाने के लिए चरण-दर-चरण मार्गदर्शन प्रदान करता है। इस गाइड के अंत तक, आप सेवा को प्रारंभ कर चुके होंगे, एक नया `साइट` बनाया होगा, इसे डिफ़ॉल्ट सामग्री श्रेणियों से भरा होगा, सामग्री जोड़ी होगी, और उसे पुनः प्राप्त किया होगा। -### Prerequisites +### प्रीरेक्वज़ट -* Node.js (v18 or higher recommended) -* A TypeScript-ready project environment +* Node.js (v18 या उससे ऊपर की अनुशंसित) +* एक TypeScript-तैयार प्रोजेक्ट वातावरण -### Step 1: Installation +### चरण 1: इंस्टॉलेशन -First, add the Lens SDK to your project dependencies. +पहले, अपने प्रोजेक्ट निर्भरताओं में Lens SDK जोड़ें। ```bash pnpm install @riffcc/lens-sdk ``` -### Step 2: Initializing the `LensService` +### चरण 2: `एलेंस सर्विस` शुरू करना -The `LensService` is the primary entry point for all SDK functionality. The first step is to create an instance and initialize its underlying P2P client. +`एलेंस सर्विस` सभी SDK कार्यक्षमताओं के लिए मुख्य प्रवेश बिंदु है। पहला कदम एक उदाहरण बनाना और इसके अंतर्निहित P2P क्लाइंट को प्रारंभ करना है। ```typescript import { LensService } from '@riffcc/lens-sdk'; @@ -49,9 +49,9 @@ async function main() { main().catch(console.error); ``` -### Step 3: Creating and Opening a `Site` +### चरण 3: `साइट` तैयार करना और उसे खोलना -A `Site` is your decentralized content hub. To create a new one, you instantiate the `Site` program with your public key as the root administrator and then ask the service to open it. +`साइट` आपका विकेन्द्रित सामग्री केंद्र है। नया साइट बनाने के लिए, आप `साइट` प्रोग्राम को अपने सार्वजनिक कुंजी के साथ मुख्य प्रशासक के रूप में आरंभ करते हैं और फिर सेवा से इसे खोलने के लिए कहते हैं। ```typescript // Inside your main() function, after lens.init() @@ -70,11 +70,11 @@ const siteAddress = lens.siteProgram.address; console.log(`Site created and opened successfully! Address: ${siteAddress}`); ``` -> **Using a Custom Identity:** The example above uses the default identity automatically generated for the Peerbit node. For user-facing applications, the recommended approach is to use the user's own wallet (like MetaMask) as the identity. To learn how to implement this, please see the **Using a Wallet for User Identity** section in our [Advanced Topics guide](/docs/lens-sdk/advanced-topics/#1-using-a-wallet-for-user-identity). +> **कस्टम पहचान का उपयोग करना:** ऊपर दिया गया उदाहरण Peerbit नोड के लिए स्वचालित रूप से उत्पन्न डिफ़ॉल्ट पहचान का उपयोग करता है। उपयोगकर्ता-सामना करने वाले अनुप्रयोगों के लिए, अनुशंसित तरीका यह है कि उपयोगकर्ता की अपनी वॉलेट (जैसे MetaMask) को पहचान के रूप में उपयोग किया जाए। इसे लागू करने के तरीके को जानने के लिए, कृपया हमारे [उन्नत विषय गाइड](/docs/lens-sdk/advanced-topics/#1-using-a-wallet-for-user-identity) में **उपयोगकर्ता पहचान के लिए वॉलेट का उपयोग करना** अनुभाग देखें। -### Step 4: Initializing Site Content Categories +### चरण 4: साइट सामग्री श्रेणियां आरंभ करना -A new `Site` is empty by default. As the root administrator, you should initialize it with a set of `ContentCategory` documents. This is a one-time operation that populates the site with the necessary templates for posting content. +एक नया `साइट` डिफ़ॉल्ट रूप से खाली होता है। रूट व्यवस्थापक के रूप में, आपको इसे `ContentCategory` दस्तावेज़ों के एक सेट के साथ प्रारंभ करना चाहिए। यह एक एकमुश्त ऑपरेशन है जो साइट को सामग्री पोस्ट करने के लिए आवश्यक टेम्पलेट से भर देता है। ```typescript // Inside your main() function, after lens.openSite() @@ -85,9 +85,9 @@ await lens.siteProgram.initializeDefaultContentCategories(); console.log("Default categories initialized successfully."); ``` -### Step 5: Adding Content (Creating a `Release`) +### चरण 5: सामग्री जोड़ना (`रिलीज़` बनाना) -Now that the `Site` has been initialized with categories, you can add content. Let's add your first `Release`, linking it to the default `"music"` category. +अब जब कि `Site` को श्रेणियों के साथ शुरू कर दिया गया है, आप सामग्री जोड़ सकते हैं। आइए आपका पहला `Release` जोड़ें और इसे डिफ़ॉल्ट `"music"` श्रेणी से जोड़ें। ```typescript // Inside your main() function, after initializing categories @@ -109,9 +109,9 @@ if (response.success) { } ``` -### Step 6: Retrieving Content +### चरण 6: सामग्री पुनःप्राप्त करना -Finally, let's verify that the content was saved by retrieving all releases from the site. +अंत में, आइए यह सत्यापित करें कि सामग्री सहेजी गई थी या नहीं, साइट से सभी रिलीज़ प्राप्त करके। ```typescript // Inside your main() function, after adding the release @@ -125,4 +125,4 @@ allReleases.forEach(release => { }); ``` -Congratulations! You have successfully created a decentralized `Site`, initialized it, managed permissions, added content, and retrieved it. From here, explore the [Core Concepts](./core-concepts) or consult the [API Reference](./api-reference). +बधाई हो! आपने सफलतापूर्वक एक विकेंद्रीकृत `Site` बनाई, इसे प्रारंभ किया, अनुमतियों का प्रबंधन किया, सामग्री जोड़ी, और उसे पुनः प्राप्त किया। यहां से, [मुख्य अवधारणाओं](./core-concepts) का अन्वेषण करें या [API संदर्भ](./api-reference) की सलाह लें। \ No newline at end of file From 5d3ea7dd0c61acf2418af079c6e32e69e3d1f24c Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Wed, 5 Nov 2025 07:48:57 +0530 Subject: [PATCH 4/8] translator english to hindi --- .../docs/lens-sdk/site-reference (copy).md | 85 ------------------ content/docs/lens-sdk/site-reference.hi.md | 87 +++++++++++++++++++ 2 files changed, 87 insertions(+), 85 deletions(-) delete mode 100644 content/docs/lens-sdk/site-reference (copy).md create mode 100644 content/docs/lens-sdk/site-reference.hi.md diff --git a/content/docs/lens-sdk/site-reference (copy).md b/content/docs/lens-sdk/site-reference (copy).md deleted file mode 100644 index 19e2561..0000000 --- a/content/docs/lens-sdk/site-reference (copy).md +++ /dev/null @@ -1,85 +0,0 @@ -+++ -date = '2025-07-22T06:21:22+02:00' -draft = false -title = 'Site Reference' -weight = 4 -+++ - -### Schemas - -This document provides a detailed reference for the data schemas that constitute a `Site` program. Understanding these schemas is crucial for preparing data for API calls and for interpreting the data returned by the `LensService`. - -All data objects submitted to the `LensService` for creation or editing should conform to the structures described below. - -#### Common Document Properties - -While there is no rigid base class, most documents share a set of common, fundamental properties. When creating a new content item (like a `Release`), the `id`, `postedBy`, and `siteAddress` fields are automatically handled by the `LensService`. - -| Field | Type | Description | -|---------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `id` | `string` | A unique identifier for the document. Usually a UUID, generated automatically on creation. Required when editing an existing document. | -| `postedBy` | `PublicSignKey` or `Uint8Array` | The cryptographic public key of the identity associated with the document. When creating content, this is automatically set to the current user unless specified otherwise. | -| `siteAddress` | `string` | The unique address of the `Site` where this document was originally created. This is always set by the service and is immutable. | - -> **Note on Immutability:** The `postedBy` and `siteAddress` fields are considered immutable. Once a document is created, these values cannot be changed via an `edit` operation. The SDK enforces this rule at the service layer. - ---- - -#### 1. `Release` - -The `Release` is the primary content object. It represents a single, publishable item like a music album, a video, or an article. - -| Field | Type | Required | Description | -|----------------|----------|:--------:|---------------------------------------------------------------------------| -| `name` | `string` | **Yes** | The display title of the release. | -| `categoryId` | `string` | **Yes** | The `id` of the `ContentCategory` this release belongs to (e.g., "music"). | -| `contentCID` | `string` | **Yes** | The IPFS Content Identifier (CID) of the main data file(s) for this release. | -| `thumbnailCID` | `string` | No | The IPFS CID for a thumbnail or cover image associated with the release. | -| `metadata` | `string` | No | A JSON string containing additional, category-specific metadata. | - -#### 2. `ContentCategory` - -A `ContentCategory` defines a template for a type of content, including what metadata is expected. These are typically created by a `Site` administrator or initialized from a default set. - -| Field | Type | Required | Description | -|----------------|----------|:--------:|---------------------------------------------------------------------------------------------------------------| -| `categoryId` | `string` | **Yes** | A unique, human-readable string identifier (e.g., "movies", "tv-shows"). **This field is immutable.** | -| `displayName` | `string` | **Yes** | The human-readable name for the category (e.g., "TV Shows"). | -| `featured` | `boolean`| No | A flag to indicate if this category should be prominently displayed. Defaults to `false`. | -| `description` | `string` | No | A brief explanation of what content belongs in this category. | -| `metadataSchema`| `string` | No | A JSON string defining the structure of the `metadata` field for `Releases` in this category. See [defaults.ts](https://github.com/riffcc/lens-sdk/blob/main/src/programs/site/defaults.ts) for examples. | - -> **Note on `categoryId` Immutability:** The `categoryId` field acts as a stable "business key". Once a category is created, this ID cannot be changed to ensure that all `Releases` linked to it remain valid. The SDK enforces this rule. - -#### 3. `FeaturedRelease` - -A `FeaturedRelease` acts as a "pin" or "shortcut" to an existing `Release`, allowing it to be highlighted. - -| Field | Type | Required | Description | -|-------------|-----------|:--------:|------------------------------------------------------------------------| -| `releaseId` | `string` | **Yes** | The `id` of the `Release` document that is being featured. | -| `startTime` | `string` | **Yes** | An ISO 8601 formatted date-time string indicating when the feature should become active. | -| `endTime` | `string` | **Yes** | An ISO 8601 formatted date-time string indicating when the feature should expire. | -| `promoted` | `boolean` | **Yes** | A flag for additional styling or priority in a "promoted" section. | - -#### 4. `Subscription` - -A `Subscription` represents a unilateral "follow" action, forming the basis of federation. When a `Subscription` is created, the `FederationManager` begins syncing content from the target `Site`. - -| Field | Type | Required | Description | -|---------------|----------|:--------:|-----------------------------------------------------------------------------------------------------------| -| `to` | `string` | **Yes** | The full, unique address of the remote `Site` program being subscribed to. | - ->Note: The `id` for a subscription is deterministically generated from a combination of the subscriber's and the target site's addresses to prevent duplicate subscriptions. - -#### 5. `BlockedContent` - -A `BlockedContent` record is a moderation tool used by `Site` administrators to hide or prevent content from being displayed. - -| Field | Type | Required | Description | -|-------|----------|:--------:|----------------------------------------------| -| `cid` | `string` | **Yes** | The IPFS Content Identifier (CID) to be blocked. | - ---- - -This reference provides the necessary detail for developers to correctly format data for all API interactions. For information on how to create, retrieve, or manage documents using these schemas, please consult the [**API Reference**](/docs/lens-sdk/api-reference). diff --git a/content/docs/lens-sdk/site-reference.hi.md b/content/docs/lens-sdk/site-reference.hi.md new file mode 100644 index 0000000..e832697 --- /dev/null +++ b/content/docs/lens-sdk/site-reference.hi.md @@ -0,0 +1,87 @@ ++++ +date = '2025-07-22T06:21:22+02:00' +draft = false +title = 'Site Reference' +weight = 4 ++++ + +### स्कीमाएँ + +यह दस्तावेज़ उन डेटा स्कीमाओं के लिए एक विस्तृत संदर्भ प्रदान करता है जो एक `साइट` प्रोग्राम का निर्माण करती हैं। इन स्कीमाओं को समझना API कॉल के लिए डेटा तैयार करने और `लेंस सेवा` द्वारा लौटाए गए डेटा की व्याख्या करने के लिए अत्यंत महत्वपूर्ण है। + +सभी डेटा ऑब्जेक्ट्स जिन्हें `लेंस सेवा` में निर्माण या संपादन के लिए प्रस्तुत किया जाता है, उन्हें नीचे वर्णित संरचनाओं के अनुसार होना चाहिए। + +#### सामान्य दस्तावेज़ गुण + +हालांकि कोई कठोर आधार वर्ग नहीं है, अधिकांश दस्तावेज़ कुछ सामान्य, मौलिक गुणों को साझा करते हैं। नया सामग्री आइटम (जैसे कि `रीलीस`) बनाने पर, `आइडी`, `पोस्टबी`, और `साइट पताः` फ़ील्ड स्वचालित रूप से `लेंस सेवा` द्वारा संभाले जाते हैं। + +| क्षेत्र | प्रकार | विवरण | +|---------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `आइडी` | `स्ट्रिंग` | दस्तावेज़ के लिए एक अद्वितीय पहचानकर्ता। आमतौर पर एक UUID होता है, जो निर्माण के समय स्वचालित रूप से उत्पन्न होता है। मौजूदा दस्तावेज़ को संपादित करते समय आवश्यक। +डाक्यमेन्ट. | +| `द्वारा पोस्ट` | `सार्वजनिक संकेत कुंजी` और `उंट8आर` | दस्तावेज़ से संबंधित पहचान की क्रिप्टोग्राफिक सार्वजनिक कुंजी। जब सामग्री बनाई जाती है, तो इसे स्वचालित रूप से वर्तमान उपयोगकर्ता पर सेट किया जाता है जब तक कि किसी अन्य रूप में निर्दिष्ट न किया गया हो।. | +| `साइट पता` | `स्ट्रिंग` | उस `साइट` का अद्वितीय पता जहां यह दस्तावेज़ मूल रूप से बनाया गया था। इसे हमेशा सेवा द्वारा सेट किया जाता है और यह अपरिवर्तनीय. | + +> **अपरिवर्तनीयता पर नोट:** `द्वारा पोस्ट` और `साइट पताः` फ़ील्ड्स को अपरिवर्तनीय माना जाता है। एक बार दस्तावेज़ बनाने के बाद, इन मूल्यों को `एडिट` ऑपरेशन के माध्यम से बदला नहीं जा सकता। SDK इस नियम को सेवा स्तर पर लागू करता है।. + +--- + +#### 1. `रिलीज़` + +`रिलीज़` प्राथमिक सामग्री वस्तु है। यह एक एकल, प्रकाशित करने योग्य आइटम का प्रतिनिधित्व करता है, जैसे कि एक संगीत एलबम, एक वीडियो, या एक लेख।. + +| खेत | प्रकार | आवश्यक | विवरण | +|----------------|----------|:--------:|---------------------------------------------------------------------------| +| `नाम` | `स्ट्रिंग` | **Yes** | रिलीज़ का प्रदर्शन शीर्षक. | +| `श्रेणी आईडी` | `स्ट्रिंग` | **Yes** | इस रिलीज़ से संबंधित `सामग्री श्रेणी` की `पहचान` (उदाहरण के लिए, "संगीत"). | +| `सामग्री CID` | `स्ट्रिंग` | **Yes** | इस रिलीज़ के मुख्य डेटा फ़ाइल(ओं) के लिए IPFS सामग्री पहचानकर्ता (CID). | +| `थंबनेल CID` | `स्ट्रिंग` | No | रिलीज़ से जुड़े थंबनेल या कवर इमेज के लिए IPFS CID। | +| `मेटाडेटा` | `स्ट्रिंग` | No | एक JSON स्ट्रिंग जिसमें अतिरिक्त, श्रेणी-विशेष मेटाडेटा शामिल है. | + +#### 2. `सामग्री श्रेणी` + +`सामग्री श्रेणी` किसी प्रकार की सामग्री के लिए एक टेम्प्लेट को परिभाषित करता है, जिसमें यह भी शामिल है कि किस मेटाडेटा की अपेक्षा की जाती है। इन्हें आमतौर पर एक `साइट` व्यवस्थापक द्वारा बनाया जाता है या डिफ़ॉल्ट सेट से प्रारंभ किया जाता है। + +| खेत | प्रकार | आवश्यक | विवरण | +|----------------|----------|:--------:|---------------------------------------------------------------------------------------------------------------| +| `श्रेणी आईडी` | `स्ट्रिंग` | **Yes** | एक अनूठा, मानव-पढ़ने योग्य स्ट्रिंग पहचानकर्ता (उदाहरण के लिए, "फ़िल्में, टीवी शो"). **यह फ़ील्ड अपरिवर्तनीय है.** | +| `प्रदर्शन नाम` | `स्ट्रिंग` | **Yes** |श्रेणी के लिए मानव-पठनीय नाम (उदाहरण के लिए, "टीवी शो"). | +| `फीचर्ड` | `बूलियन`| No | यह संकेत करने के लिए एक ध्वज कि इस श्रेणी को प्रमुख रूप से प्रदर्शित करना चाहिए या नहीं। डिफ़ॉल्ट रूप से`झूठा`. | +| `विवरण` | `स्ट्रिंग` | No |इस श्रेणी में कौन सा सामग्री शामिल होती है इसका संक्षिप्त विवरण. | +| `मेटाडेटा स्कीमा`| `स्ट्रिंग` | No |`रिलीज़` श्रेणी में `मेटाडेटा` फ़ील्ड की संरचना को परिभाषित करने वाली एक JSON स्ट्रिंग। उदाहरणों के लिए [डिफ़ॉल्ट्स.ts](https://github.com/riffcc/lens-sdk/blob/main/src/programs/site/defaults.ts) देखें।. | + +> **`श्रेणी आईडी` अपरिवर्तनीयता पर नोट:** `श्रेणी आईडी` फ़ील्ड एक स्थिर "बिज़नेस की" के रूप में कार्य करता है। एक बार किसी श्रेणी को बनाया जाने के बाद, इस ID को बदला नहीं जा सकता ताकि इससे जुड़े सभी `रिलीज़` वैध बने रहें। SDK इस नियम को लागू करता है। + +#### 3. `प्रदर्शित किया गया` + +`प्रदर्शित किया गया` एक मौजूदा `रिलीज़` के लिए एक 'पिन' या 'शॉर्टकट' के रूप में कार्य करता है, जिससे इसे हाइलाइट किया जा सके। + +| खेत | प्रकार | आवश्यक | +विवरण | +|-------------|-----------|:--------:|------------------------------------------------------------------------| +| `रिलीज़ आईडी` | `स्ट्रिंग` | **Yes** | उस `रिलीज़` दस्तावेज़ की `पहचान` जिसे प्रदर्शित किया जा रहा है। | +| `प्रारंभ समय` | `स्ट्रिंग` | **Yes** | एक ISO 8601 स्वरूपित तिथि-समय स्ट्रिंग जो यह दर्शाती है कि यह सुविधा कब सक्रिय हो जानी चाहिए. | +| `समाप्ति समय` | `स्ट्रिंग` | **Yes** |एक ISO 8601 प्रारूप में दिनांक-समय स्ट्रिंग जो यह संकेत देती है कि सुविधा कब समाप्त होनी चाहिए. | +| `प्रचारित` | `बूलियन` | **Yes** | "प्रमोटेड" अनुभाग में अतिरिक्त स्वरूपण या प्राथमिकता के लिए एक फ़्लैग. | + +#### 4. `सदस्यता` + +`सदस्यता` एक एकपक्षीय "अनुसरण" क्रिया का प्रतिनिधित्व करती है, जो संघ का आधार बनाती है। जब एक `सदस्यता` बनाई जाती है, तो `फेडरेशनमैनेजर` लक्ष्य `साइट` से सामग्री समन्वय करना शुरू कर देता है। + +| खेत | प्रकार | आवश्यक | विवरण | +|---------------|----------|:--------:|-----------------------------------------------------------------------------------------------------------| +| `को` | `स्ट्रिंग` | **Yes** | सदस्यता लिए जा रहे रिमोट `साइट` प्रोग्राम का पूरा, अद्वितीय पता. | + +>सूचना: किसी ग्राहक द्वारा सदस्यता के लिए `पहचान` उस ग्राहक और लक्ष्य साइट के पते के संयोजन से निर्धार्य रूप से उत्पन्न किया जाता है ताकि डुप्लिकेट सदस्यताओं को रोका जा सके। + +#### 5. `अवरुद्ध सामग्री` + +`अवरुद्ध सामग्री` रिकॉर्ड एक मॉडरेशन उपकरण है जिसका उपयोग `साइट` प्रशासक सामग्री को छिपाने या प्रदर्शित होने से रोकने के लिए करते हैं। + +| खेत | प्रकार | आवश्यक | विवरण | +|-------|----------|:--------:|----------------------------------------------| +| `सीआईडी` | `स्ट्रिंग` | **Yes** | अवरुद्ध किए जाने वाले IPFS सामग्री पहचानकर्ता (CID). | + +--- + +यह संदर्भ डेवलपर्स को सभी API इंटरैक्शन के लिए डेटा सही तरीके से स्वरूपित करने के लिए आवश्यक विवरण प्रदान करता है। इन स्कीमाओं का उपयोग करके दस्तावेज़ बनाने, प्राप्त करने, या प्रबंधित करने के तरीके की जानकारी के लिए कृपया [**एपीआई संदर्भ**](/docs/lens-sdk/api-reference) देखें। \ No newline at end of file From 110ecdd4702a3072ece850e25646149270954961 Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Mon, 10 Nov 2025 18:38:28 +0530 Subject: [PATCH 5/8] update --- content/docs/riff.cc/team.hi.md | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 content/docs/riff.cc/team.hi.md diff --git a/content/docs/riff.cc/team.hi.md b/content/docs/riff.cc/team.hi.md new file mode 100644 index 0000000..79df4c3 --- /dev/null +++ b/content/docs/riff.cc/team.hi.md @@ -0,0 +1,63 @@ ++++ +date = '2025-07-07T15:37:53+01:00' +draft = false +title = 'Team' +weight = 2 ++++ + +We have a small but passionate team of developers, engineers, and curators. + +{{< cards >}} + {{< card title="Michaela Andrus" + tag="Solutions Engineer" + subtitle="Michaela manages Riff Labs Perth. She is also a software engineer and a researcher." + >}} + {{< card title="Lucas Jovanovich" + tag="Core Engineer" + subtitle="Lucas works on the core Riff.CC platform and P2P architecture." + >}} + {{< card title="Benjamin Arntzen" + tag="Founder" + subtitle="Benjamin is the founder of Riff.CC. They are a P2P researcher and distributed systems architect." + >}} + {{< card title="Julien Malard-Adam" + tag="Core Engineer" + subtitle="Julien works on scalability and performance for the core Riff.CC platform." + >}} + {{< card title="Phoebe Sleet" + tag="TBA" + subtitle="More details to be announced soon." + >}} + {{< card title="Bill Schreckenstein" + tag="Partner Relations" + subtitle="Bill works on building partnerships with other organisations and projects." + >}} + {{< card title="Preeti Aarya" + tag="Web Developer" + subtitle="Preeti works on improving Riff.CC's frontend experience." + >}} + {{< card title="Muskan Paswan" + tag="Web Developer" + subtitle="Muskan works on improving the look and feel of Riff.CC and Lenses." + >}} + {{< card title="Evelyn Collins" + tag="P2P Librarian" + subtitle="Evelyn is a researcher and content curator. She helps build and curate the Riff.CC Library." + >}} + {{< card title="Roniel Contreras" + tag="Core Engineer" + subtitle="Roniel works on the core Riff.CC platform and UI/UX for Flagship, as well as development for our partners." + >}} + {{< card title="Gabriel Cruz" + tag="Distributed Systems Engineer" + subtitle="Gabriel works on our distributed filesystem and P2P architecture." + >}} + {{< card title="Peter Raven" + tag="Technical Execution" + subtitle="Peter is a technical execution consultant. He helps us make sure we *deliver*." + >}} + {{< card title="Ehab Fayez" + tag="Design & UX" + subtitle="Ehab is our in-house designer and UX expert. He works on the look and feel of Riff.CC and Lenses." + >}} +{{< /cards >}} \ No newline at end of file From ba018a5fec1a0d7cb4ad05a8eceb4bfe05452f23 Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Mon, 17 Nov 2025 18:14:05 +0530 Subject: [PATCH 6/8] Translation English to Hindi --- content/docs/concepts/threshold-funding.hi.md | 20 ++--- content/docs/riff.cc/_index.hi.md | 21 +++++ content/docs/riff.cc/roadmap.hi.md | 70 +++++++++++++++++ content/docs/riff.cc/team.hi.md | 78 +++++++++---------- content/docs/riff.cc/visiting-riff.hi.md | 12 +++ 5 files changed, 152 insertions(+), 49 deletions(-) create mode 100644 content/docs/riff.cc/_index.hi.md create mode 100644 content/docs/riff.cc/roadmap.hi.md create mode 100644 content/docs/riff.cc/visiting-riff.hi.md diff --git a/content/docs/concepts/threshold-funding.hi.md b/content/docs/concepts/threshold-funding.hi.md index 35b034f..29d6243 100644 --- a/content/docs/concepts/threshold-funding.hi.md +++ b/content/docs/concepts/threshold-funding.hi.md @@ -3,25 +3,25 @@ draft = false title = 'थ्रेशोल्ड फंडिंग' +++ -कल्पना कीजिए: एक बैंड एक रिकॉर्ड बनाना चाहता है। उन्हें स्टूडियो समय, मिश्रण, मास्टरिंग और उत्पादन लागत को कवर करने के लिए $50के की आवश्यकता है। पारंपरिक विकल्प? लेबल के अधिकारों पर हस्ताक्षर करें, एक क्राउडफंडिंग अभियान शुरू करें और सर्वश्रेष्ठ के लिए उम्मीद करें, या ऋण में जाएं। +कल्पना कीजिए: एक बैंड एक रिकॉर्ड बनाना चाहता है। उन्हें स्टूडियो समय, मिश्रण, मास्टरिंग और उत्पादन लागत को कवर करने के लिए $५०के की आवश्यकता है। पारंपरिक विकल्प? लेबल के अधिकारों पर हस्ताक्षर करें, एक क्राउडफंडिंग अभियान शुरू करें और सर्वश्रेष्ठ के लिए उम्मीद करें, या ऋण में जाएं। थ्रेसहोल्ड फंडिंग इस दुविधा का एक विकल्प प्रस्तुत करता है, उपयोगकर्ताओं को सीधे कलाकारों का समर्थन करने की अनुमति देता है, और ऐसा करने के लिए पुरस्कार कमाते हैं। ## यह काम किस प्रकार करता है -बैंड अपने प्रोजेक्ट को "आगामी" के रूप में रिफ़ पर पोस्ट करता है, डेमो, लाइव रिकॉर्डिंग और एल्बम के लिए अपने दृष्टिकोण को साझा करता है। प्रशंसक कलाकार की सदस्यता $10 प्रति वर्ष देकर ले सकते हैं। यहाँ दिलचस्प बात यह है: +बैंड अपने प्रोजेक्ट को "आगामी" के रूप में रिफ़ पर पोस्ट करता है, डेमो, लाइव रिकॉर्डिंग और एल्बम के लिए अपने दृष्टिकोण को साझा करता है। प्रशंसक कलाकार की सदस्यता $१० प्रति वर्ष देकर ले सकते हैं। यहाँ दिलचस्प बात यह है: -- जब पर्याप्त लोग 50 हजार डॉलर की सीमा तक पहुंच जाते हैं, तो उत्पादन शुरू हो जाता है +- जब पर्याप्त लोग ५० हजार डॉलर की सीमा तक पहुंच जाते हैं, तो उत्पादन शुरू हो जाता है - फंडिंग अवधि के दौरान सदस्यता लेने वाले प्रत्येक व्यक्ति को एल्बम रिलीज़ होने पर उच्च गुणवत्ता में स्वचालित रूप से प्राप्त होगा - बैंड पूर्ण रचनात्मक नियंत्रण और स्वामित्व बनाए रखता है ## कॉमन्स ट्विस्ट -लेकिन इसमें क्रांतिकारी बात यह है कि बैंड ने 250 हजार डॉलर की कमाई होने पर रिकॉर्ड को क्रिएटिव कॉमन्स (गैर-वाणिज्यिक) के तहत स्वतः जारी करने का वचन दिया है। +लेकिन इसमें क्रांतिकारी बात यह है कि बैंड ने २५० हजार डॉलर की कमाई होने पर रिकॉर्ड को क्रिएटिव कॉमन्स (गैर-वाणिज्यिक) के तहत स्वतः जारी करने का वचन दिया है। इसका मतलब यह है: - बैंड ने सीमा के बाद भी रिफ़ की बिक्री जारी रखी -- जब उनकी कुल कमाई 250,000 डॉलर तक पहुँच जाएगी, तो एल्बम गैर-व्यावसायिक उपयोग के लिए कानूनी रूप से मुफ़्त हो जाएगा +- जब उनकी कुल कमाई २५०,० डॉलर तक पहुँच जाएगी, तो एल्बम गैर-व्यावसायिक उपयोग के लिए कानूनी रूप से मुफ़्त हो जाएगा - संगीत आम लोगों तक पहुंचता है, हमारी साझा संस्कृति को समृद्ध करता है - बैंड को उनके काम के लिए उचित मुआवजा दिया गया है, और वे एल्बम की भौतिक और संग्रहणीय प्रतियां बेचना जारी रख सकते हैं, साथ ही भविष्य की परियोजनाओं के लिए भी इसी तरह धन जुटा सकते हैं। @@ -29,15 +29,15 @@ title = 'थ्रेशोल्ड फंडिंग' कलाकार और प्रशंसक दोनों अपनी सेटिंग्स में योगदान स्लाइडर के माध्यम से मंच का समर्थन करना चुन सकते हैं। -यह प्लेटफ़ॉर्म योगदान **वैकल्पिक** है और **स्पष्ट रूप से ऑप्ट-इन** है - डिफ़ॉल्ट रूप से, हम किसी भी कमाई का 0% लेते हैं। +यह प्लेटफ़ॉर्म योगदान **वैकल्पिक** है और **स्पष्ट रूप से ऑप्ट-इन** है - डिफ़ॉल्ट रूप से, हम किसी भी कमाई का ०% लेते हैं। **कलाकार योगदान मॉडल:** -- यदि 100 कलाकार प्रतिवर्ष 50 हजार डॉलर जुटाते हैं: कलाकार निधि में 50 मिलियन डॉलर -- यदि 5% कलाकार 5% प्लेटफ़ॉर्म योगदान निर्धारित करते हैं: $125K प्लेटफ़ॉर्म राजस्व -- इससे लगभग 1-2 मिलियन उपयोगकर्ताओं के उपयोगकर्ता समुदाय को स्थायी रूप से समर्थन मिल सकता है। +- यदि १०० कलाकार प्रतिवर्ष ५० हजार डॉलर जुटाते हैं: कलाकार निधि में ५० मिलियन डॉलर +- यदि ५% कलाकार ५% प्लेटफ़ॉर्म योगदान निर्धारित करते हैं: $१२५K प्लेटफ़ॉर्म राजस्व +- इससे लगभग १-२ मिलियन उपयोगकर्ताओं के उपयोगकर्ता समुदाय को स्थायी रूप से समर्थन मिल सकता है। **उपयोगकर्ता योगदान मॉडल:** -- 1 मिलियन उपयोगकर्ता × $50 औसत वार्षिक व्यय × 5% प्लेटफ़ॉर्म कटौती × 5% भागीदारी = अतिरिक्त $125K प्लेटफ़ॉर्म राजस्व +- १ मिलियन उपयोगकर्ता × $५० औसत वार्षिक व्यय × ५% प्लेटफ़ॉर्म कटौती × ५% भागीदारी = अतिरिक्त $१२५K प्लेटफ़ॉर्म राजस्व - कलाकारों के योगदान के साथ, यह मंच मामूली भागीदारी दरों पर पूरी तरह से टिकाऊ बन जाता है ##यह क्यों काम करता है diff --git a/content/docs/riff.cc/_index.hi.md b/content/docs/riff.cc/_index.hi.md new file mode 100644 index 0000000..5985970 --- /dev/null +++ b/content/docs/riff.cc/_index.hi.md @@ -0,0 +1,21 @@ +--- +date: '2025-07-07T15:37:53+01:00' +draft: false +title: 'Riff.CC' +weight: 1 +sidebar: + open: true +--- + +> विश्व की संस्कृति को मुक्त करो +> उनके लिए जो सृजन करते हैं। + +हम एक स्ट्रीमिंग सेवा प्रदान करते हैं जिसे Riff.CC कहा जाता है, जो उपयोगकर्ताओं को कानूनी रूप से मुफ्त मीडिया सामग्री देखने, साझा करने और चुनने की अनुमति देती है। + +हमारा प्लेटफ़ॉर्म विकेंद्रीकृत सिद्धांतों पर आधारित है, जो यह सुनिश्चित करता है कि सामग्री सुलभ बनी रहे और सेंसरशिप के खिलाफ लचीली रहे। + +यह पहली अनस्टॉपेबल लाइब्रेरी है, जो किसी को भी हमारी लाइब्रेरी से अपनी लाइब्रेरी की नकल करने और इसे दूसरों के साथ साझा करने की अनुमति देती है। आप अनस्टॉपेबल लाइब्रेरी के बारे में अधिक जानने के लिए Riff.CC को चलाने वाले सॉफ़्टवेयर [Flagship](/docs/flagship) के बारे में पढ़ सकते हैं। + +आप हमारे ओपन सोर्स सॉफ़्टवेयर का उपयोग करके अपनी खुद की स्ट्रीमिंग सेवा भी चला सकते हैं, और यहां तक कि हमारी लाइब्रेरी को अपनी सेवा में भी मिरर कर सकते हैं। + +यह देखने के लिए हमारे [लाइव डेवलपमेंट साइट](https://ftwc.xyz) को देखें कि Riff.CC के बारे में क्या है। \ No newline at end of file diff --git a/content/docs/riff.cc/roadmap.hi.md b/content/docs/riff.cc/roadmap.hi.md new file mode 100644 index 0000000..9e0dc8f --- /dev/null +++ b/content/docs/riff.cc/roadmap.hi.md @@ -0,0 +1,70 @@ ++++ +date = '2025-07-07T15:37:53+01:00' +draft = false +title = 'Roadmap' +weight = 2 ++++ + +Riff.CC के लिए आगे क्या आने वाला है, यहाँ है: + +## 📅 २०२५ +{{% कदम %}} + +### अगस्त २०२५: सार्वजनिक बीटा + +Riff.CC का प्रारंभिक सार्वजनिक बीटा + +* संगीत, फिल्में, किताबें और ऑडियोबुक स्ट्रीमिंग या डाउनलोड के लिए उपलब्ध हैं। +* उपयोगकर्ताओं को अपनी खुद की लाइब्रेरी बनाने के लिए सेल्फ-होस्टेड लेंस। + +### सितंबर २०२५: उपयोगकर्ता अपलोड करता है + +प्रत्यक्ष उपयोगकर्ता अपलोड के लिए समर्थन जोड़ें + +* उपयोगकर्ताओं को सीधे Riff.CC पर अपनी सामग्री अपलोड करने में सक्षम बनाएं +* अपने डेटा की नेटवर्क में वास्तविक समय में प्रतिकृति देखें + +### अक्टूबर २०२५: कलाकार और एलबम पेज + +कलाकार पृष्ठ और समुदाय सुविधाएँ + +* बेहतर सामग्री खोज के लिए कलाकार और एलबम पृष्ठ +* सामग्री साझा करने और व्यवस्थित करने के लिए सामुदायिक सुविधाएँ + +### नवंबर २०२५: होस्ट किए गए लेंस + +हॉस्टेड लेंस और लेंस के लिए बैकअप सेवाएं + +* उपयोगकर्ताओं के लिए होस्टेड लेंस लॉन्च करें जो स्वयं-होस्टिंग किए बिना लाइब्रेरी बनाना चाहते हैं +* उन लेंस के लिए बैकअप सेवाएँ प्रदान करें जो अपनी सामग्री की निरंतरता और उपलब्धता सुनिश्चित करना चाहते +हैं। + +### दिसंबर २०२५: पूरी सार्वजनिक लॉन्च + +Riff.CC का पूर्ण सार्वजनिक लॉन्च + +* उपयोगकर्ता द्वारा अपलोड किए गए सामग्री के साथ विस्तारित सामग्री पुस्तकालय +* सामग्री खोजने और साझा करने के लिए उन्नत खोज सुविधाएँ + +{{% /कदम %}} + +## 📅 २०२६ + +{{% कदम %}} + +### जनवरी २०२६: उपयोगकर्ता चैनल्स + +उपयोगकर्ता चैनलों और सदस्यताओं के लिए प्रारंभिक समर्थन + +* अपना खुद का चैनल बनाएं और चलाएं, जो अन्य चैनलों या लेंस से सामग्री दिखा सकता है +* चैनलों की सदस्यता के लिए समर्थन, जिससे उपयोगकर्ता अपने पसंदीदा चैनलों का अनुसरण कर सकते हैं और उनसे अपडेट प्राप्त कर सकते हैं + +### फरवरी २०२६: सीमा निधि + +थ्रेशोल्ड फंडिंग का समर्थन करने के लिए Riff.CC का विस्तार करें + +* कलाकारों को उनके आगामी कार्यों के लिए थ्रेशोल्ड फंडिंग अभियान स्थापित करने की अनुमति दें +* उपयोगकर्ताओं को सीधे कलाकारों का समर्थन करने की अनुमति दें, और ऐसा करने के लिए पुरस्कार कमाएँ +* कलाकार अपने काम से पर्याप्त पैसा कमाने के बाद अपने काम को स्वचालित रूप से क्रिएटिव कॉमन्स (गैर-लाभकारी) के अंतर्गत जारी कर देते हैं। + +{{% /कदम %}} \ No newline at end of file diff --git a/content/docs/riff.cc/team.hi.md b/content/docs/riff.cc/team.hi.md index 79df4c3..bb8f6a4 100644 --- a/content/docs/riff.cc/team.hi.md +++ b/content/docs/riff.cc/team.hi.md @@ -8,56 +8,56 @@ weight = 2 We have a small but passionate team of developers, engineers, and curators. {{< cards >}} - {{< card title="Michaela Andrus" - tag="Solutions Engineer" - subtitle="Michaela manages Riff Labs Perth. She is also a software engineer and a researcher." + {{< card title="माइकेला एंडरस" + टैग="सॉल्यूशंस इंजीनियर" + उपशीर्षक="मिखाइला रिफ लैब्स पर्थ का प्रबंधन करती हैं। वह एक सॉफ़्टवेयर इंजीनियर और शोधकर्ता भी हैं।." >}} - {{< card title="Lucas Jovanovich" - tag="Core Engineer" - subtitle="Lucas works on the core Riff.CC platform and P2P architecture." + {{< card title="लुकास जोवानोविच" + टैग="कोर इंजीनियर" + उपशीर्षक="लुकास कोर Riff.CC प्लेटफ़ॉर्म और P2P आर्किटेक्चर पर काम करते हैं." >}} - {{< card title="Benjamin Arntzen" - tag="Founder" - subtitle="Benjamin is the founder of Riff.CC. They are a P2P researcher and distributed systems architect." + {{< card title="बेंजामिन आर्न्टज़ेन" + टैग="संस्थापक" + उपशीर्षक="बेंजामिन Riff.CC के संस्थापक हैं। वह एक पी2पी शोधकर्ता और वितरित सिस्टमों के वास्तुकार हैं।." >}} - {{< card title="Julien Malard-Adam" - tag="Core Engineer" - subtitle="Julien works on scalability and performance for the core Riff.CC platform." + {{< card title="जूलियन मालार्ड-एडम" + टैग="कोर इंजीनियर" + उपशीर्षक="जूलियन कोर Riff.CC प्लेटफ़ॉर्म के लिए स्केलेबिलिटी और प्रदर्शन पर काम करते हैं." >}} - {{< card title="Phoebe Sleet" - tag="TBA" - subtitle="More details to be announced soon." + {{< card title="फोबी स्लीत" + टैग="टीबीएक" + उपशीर्षक="अधिक जानकारी जल्द ही घोषित की जाएगी." >}} - {{< card title="Bill Schreckenstein" - tag="Partner Relations" - subtitle="Bill works on building partnerships with other organisations and projects." + {{< card title="बिल शरेकेंस्टीन" + टैग="साझेदार संबंध" + उपशीर्षक="बिल अन्य संगठनों और परियोजनाओं के साथ साझेदारी बनाने पर काम करता है।." >}} - {{< card title="Preeti Aarya" - tag="Web Developer" - subtitle="Preeti works on improving Riff.CC's frontend experience." + {{< card title="प्रीति आर्य" + टैग="वेब डेवलपर" + उपशीर्षक="प्रीति Riff.CC के फ्रंटेंड अनुभव को बेहतर बनाने पर काम करती है." >}} - {{< card title="Muskan Paswan" - tag="Web Developer" - subtitle="Muskan works on improving the look and feel of Riff.CC and Lenses." + {{< card title="मुस्कान पासवान" + टैग="वेब डेवलपर" + उपशीर्षक="मुस्कान Riff.CC और Lenses की लुक और फील को बेहतर बनाने पर काम करती हैं." >}} - {{< card title="Evelyn Collins" - tag="P2P Librarian" - subtitle="Evelyn is a researcher and content curator. She helps build and curate the Riff.CC Library." + {{< card title="एवेलिन कॉलिंस" + टैग="पी2पी लाइब्रेरियन" + उपशीर्षक="एवेलिन एक शोधकर्ता और सामग्री संरक्षक हैं। वह Riff.CC लाइब्रेरी बनाने और इसकी देखभाल करने में मदद करती हैं।." >}} - {{< card title="Roniel Contreras" - tag="Core Engineer" - subtitle="Roniel works on the core Riff.CC platform and UI/UX for Flagship, as well as development for our partners." + {{< card title="रोनियल कोंत्रेरेस" + टैग="कोर इंजीनियर" + उपशीर्षक="रॉनील मुख्य Riff.CC प्लेटफ़ॉर्म और फ्लैगशिप के लिए UI/UX पर काम करते हैं, साथ ही हमारे साझेदारों के लिए विकास में भी योगदान देते हैं।." >}} - {{< card title="Gabriel Cruz" - tag="Distributed Systems Engineer" - subtitle="Gabriel works on our distributed filesystem and P2P architecture." + {{< card title="गेब्रियल क्रूज़" + टैग="वितरित प्रणाली इंजीनियर" + उपशीर्षक="गैब्रियल हमारे वितरित फ़ाइल सिस्टम और पी2पी आर्किटेक्चर पर काम करते हैं." >}} - {{< card title="Peter Raven" - tag="Technical Execution" - subtitle="Peter is a technical execution consultant. He helps us make sure we *deliver*." + {{< card title="पीटर रैवेन" + टैग="तकनीकी निष्पादन" + उपशीर्षक="पीटर एक तकनीकी कार्यान्वयन सलाहकार हैं। वह हमें यह सुनिश्चित करने में मदद करते हैं कि हम *डिलीवर करना*." >}} - {{< card title="Ehab Fayez" - tag="Design & UX" - subtitle="Ehab is our in-house designer and UX expert. He works on the look and feel of Riff.CC and Lenses." + {{< card title="एहाब फ़ायज़" + टैग="डिज़ाइन और यूएक्स" + उपशीर्षक="एहाब हमारे इन-हाउस डिज़ाइनर और UX विशेषज्ञ हैं। वह Riff.CC और Lenses की लुक और फील पर काम करते हैं।." >}} {{< /cards >}} \ No newline at end of file diff --git a/content/docs/riff.cc/visiting-riff.hi.md b/content/docs/riff.cc/visiting-riff.hi.md new file mode 100644 index 0000000..e9d6859 --- /dev/null +++ b/content/docs/riff.cc/visiting-riff.hi.md @@ -0,0 +1,12 @@ ++++ +date = '2025-07-07T15:37:53+01:00' +draft = false +title = 'Visiting Riff.CC' +weight = 1 ++++ + +आप हमारे विकास साइट [ftwc.xyz](https://ftwc.xyz) पर Riff.CC के वर्तमान विकास स्नैपशॉट का दौरा कर सकते हैं। + +![Riff.CC डेवलपमेंट साइट का स्क्रीनशॉट](/images/docs/riff.cc/home.png) + +हम Q4 2025 में पूरी सार्वजनिक Riff.CC प्लेटफ़ॉर्म लॉन्च करने की योजना बना रहे हैं। \ No newline at end of file From 5bba51a5451b275ad0dcf5ff46476f03a9b72268 Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Mon, 17 Nov 2025 18:16:06 +0530 Subject: [PATCH 7/8] update --- content/docs/riff.cc/team.hi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/riff.cc/team.hi.md b/content/docs/riff.cc/team.hi.md index bb8f6a4..101edf2 100644 --- a/content/docs/riff.cc/team.hi.md +++ b/content/docs/riff.cc/team.hi.md @@ -5,7 +5,7 @@ title = 'Team' weight = 2 +++ -We have a small but passionate team of developers, engineers, and curators. +हमारे पास डेवलपर्स, इंजीनियरों और क्यूरेटरों की एक छोटी लेकिन उत्साही टीम है। {{< cards >}} {{< card title="माइकेला एंडरस" From a8b83a613e3c5ed4ea414705a0c93f09a897c397 Mon Sep 17 00:00:00 2001 From: Muskan Paswan Date: Thu, 12 Mar 2026 14:15:06 +0530 Subject: [PATCH 8/8] Hindi translation update --- content/docs/lens-sdk/core-concepts.hi.md | 72 +++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/content/docs/lens-sdk/core-concepts.hi.md b/content/docs/lens-sdk/core-concepts.hi.md index b44c7f1..9f00bc0 100644 --- a/content/docs/lens-sdk/core-concepts.hi.md +++ b/content/docs/lens-sdk/core-concepts.hi.md @@ -23,54 +23,54 @@ graph TD ``` -* **Service Layer (``एलेंस सर्विस`):** यह sdk के लिए कैननिकल पब्लिक इंटरफेस है। किसी भी उपभोक्ता अनुप्रयोग के लिए यह एकमात्र प्रवेश बिंदु है। इसका उद्देश्य एक स्थिर, उच्च स्तर और अतुल्यकालिक एपीआई प्रदान करना है जो पूरी तरह से अंतर्निहित p2p नेटवर्क और प्रोग्राम तर्क की जटिलताओं को अमूर्त करता है। सेवा स्तर पी2पी क्लाइंट के जीवन चक्र और सक्रिय 'साइट' कार्यक्रम के प्रबंधन के लिए जिम्मेदार है।. +* **सेवा परत (``एलेंस सर्विस`):** यह sdk के लिए कैननिकल पब्लिक इंटरफेस है। किसी भी उपभोक्ता अनुप्रयोग के लिए यह एकमात्र प्रवेश बिंदु है। इसका उद्देश्य एक स्थिर, उच्च स्तर और अतुल्यकालिक एपीआई प्रदान करना है जो पूरी तरह से अंतर्निहित p2p नेटवर्क और प्रोग्राम तर्क की जटिलताओं को अमूर्त करता है। सेवा स्तर पी2पी क्लाइंट के जीवन चक्र और सक्रिय 'साइट' कार्यक्रम के प्रबंधन के लिए जिम्मेदार है।. -* **Program Layer (`साइट` Program):** यह है "ऑन-चेन" या अनुप्रयोग के विकेन्द्रीकृत बैकएण्ड.`साइट` कार्यक्रम एक राज्य है, प्रतिकृति "स्मार्ट कॉन्ट्रैक्ट" जो अनुप्रयोग के डाटा स्कीमा को परिभाषित करता है, डेटाबेस, और डेटा अभिगम को नियंत्रित करने वाले अपरिवर्तनीय नियम. यह सभी सामग्री और अनुमति के लिए एक दिए गए के भीतर सत्य का अंतिम स्रोत है `साइट`. +* **प्रोग्राम परत (`साइट` प्रोग्राम):** यह है "ऑन-चेन" या अनुप्रयोग के विकेन्द्रीकृत बैकएण्ड.`साइट` कार्यक्रम एक राज्य है, प्रतिकृति "स्मार्ट कॉन्ट्रैक्ट" जो अनुप्रयोग के डाटा स्कीमा को परिभाषित करता है, डेटाबेस, और डेटा अभिगम को नियंत्रित करने वाले अपरिवर्तनीय नियम. यह सभी सामग्री और अनुमति के लिए एक दिए गए के भीतर सत्य का अंतिम स्रोत है `साइट`. -* **Federation Layer (`FederationManager`):** यह एक विशेषीकृत है, आंतरिक घटक द्वारा प्रबंधित`एलेंस सर्विस`.यह सभी इंटर-प्रोग्राम संचार को व्यवस्थित करता है.जबकि प्रोग्राम * क्या डेटा मौजूद है,`FederationManager` को परिभाषित करता है कि डेटा की खोज की गई है, तुल्यकालिक, और विभिन्न उदाहरणों के बीच साझा। `साइट`. +* **संघीय परत (`संघीय प्रबंधक`):** यह एक विशेषीकृत है, आंतरिक घटक द्वारा प्रबंधित`एलेंस सर्विस`.यह सभी इंटर-प्रोग्राम संचार को व्यवस्थित करता है.जबकि प्रोग्राम * क्या डेटा मौजूद है,`संघीय प्रबंधक` को परिभाषित करता है कि डेटा की खोज की गई है, तुल्यकालिक, और विभिन्न उदाहरणों के बीच साझा। `साइट`. -* **P2P Framework Layer (Peerbit):**मूलभूत परत जो पीयर-टू-पीयर नेटवर्किंग, डेटाबेस निर्माण के लिए आवश्यक प्राइमिटिव प्रदान करता है, डेटा प्रतिकृति, और क्रिप्टोग्राफिक पहचान. लेंस एसडीके इस मजबूत ढांचे पर सीधे बनाया गया है. +* **पी2पी फ्रेमवर्क लेयर (पीयरबिट):**मूलभूत परत जो पीयर-टू-पीयर नेटवर्किंग, डेटाबेस निर्माण के लिए आवश्यक प्राइमिटिव प्रदान करता है, डेटा प्रतिकृति, और क्रिप्टोग्राफिक पहचान. लेंस एसडीके इस मजबूत ढांचे पर सीधे बनाया गया है. -## 2. The `साइट` Program: A Sovereign Digital Entity +## 2.`साइट` प्रोग्राम: एक सॉवरेन डिजिटल एंटिटी लेंस इकोसिस्टम में केंद्रीय निर्माण है `साइट`. कन्सेप्चूअल्ली,एक `साइट` एक संप्रभु, पता योग्य और स्व-निहित डिजिटल स्थान है। यह एक विकेंद्रीकृत एप्लिकेशन इंस्टेंस के रूप में कार्य करता है, जिसमें अपनी स्वयं की डेटाबेस और पहुँच नियंत्रण प्रणाली होती है। -### Key Characteristics of a `साइट` +### एक की मुख्य विशेषताएं `साइट` -* **Unique, Verifiable Address:**हर `साइट` को उसके मालिक की सार्वजनिक कुंजी और उसकी प्रारंभिक पैरामीटर्स से निकाले गए स्थायी, क्रिप्टोग्राफिक पते द्वारा पहचाना जाता है। इस पते का उपयोग नेटवर्क पर `साइट` को ढूँढने, खोलने और उसके साथ इंटरैक्ट करने के लिए किया जाता है। -* **Structured Data Stores:**`साइट` विभिन्न, विशेष उद्देश्य के लिए बनाए गए डेटा स्टोर्स का संग्रह है, जैसे कि `Releases`, `ContentCategories`, `Subscriptions` और अन्य। यह संरचित दृष्टिकोण डेटा की अखंडता और संगठनात्मक स्पष्टता सुनिश्चित करता है। -* **स्पष्ट अनुमतियाँ:** `साइट` तक पहुँच डिफ़ॉल्ट रूप से सार्वजनिक नहीं होती है। सभी लेखन अनुमतियाँ स्पष्ट रूप से एक **प्रशासक** द्वारा एक मजबूत Role-Based Access Control (RBAC) प्रणाली के माध्यम से प्रदान की जाती हैं। -## 3. The Federation Model: Principled Data Exchange +* **अद्वितीय, सत्यापन योग्य पता:**हर `साइट` को उसके मालिक की सार्वजनिक कुंजी और उसकी प्रारंभिक पैरामीटर्स से निकाले गए स्थायी, क्रिप्टोग्राफिक पते द्वारा पहचाना जाता है। इस पते का उपयोग नेटवर्क पर `साइट` को ढूँढने, खोलने और उसके साथ इंटरैक्ट करने के लिए किया जाता है। +* **संरचित डेटा स्टोर:**`साइट` विभिन्न, विशेष उद्देश्य के लिए बनाए गए डेटा स्टोर्स का संग्रह है, जैसे कि `विज्ञप्ति`, `सामग्री श्रेणियाँ`, `सदस्यता` और अन्य। यह संरचित दृष्टिकोण डेटा की अखंडता और संगठनात्मक स्पष्टता सुनिश्चित करता है। +* **स्पष्ट अनुमतियाँ:** `साइट` तक पहुँच डिफ़ॉल्ट रूप से सार्वजनिक नहीं होती है। सभी लेखन अनुमतियाँ स्पष्ट रूप से एक **प्रशासक** द्वारा एक मजबूत भूमिका-आधारित पहुँच नियंत्रण (आरबीएसी) प्रणाली के माध्यम से प्रदान की जाती हैं। +## 3. फेडरेशन मॉडल: सिद्धांत आधारित डेटा एक्सचेंज फेडरेशन वह प्रक्रिया है जिसके द्वारा स्वतंत्र `साइट` उदाहरण डेटा साझा करते हैं। Lens SDK एक सिद्धांत-आधारित, सब्सक्रिप्शन मॉडल को लागू करता है ताकि सुनिश्चित किया जा सके कि सभी डेटा विनिमय जानबूझकर और सुरक्षित रूप से हो। -### The Federation Lifecycle +### संघ जीवनचक्र -1. **Explicit Subscription:**यह प्रक्रिया उस उपयोगकर्ता द्वारा शुरू की जाती है जिसके पास `subscription:manage` अनुमति है (आमतौर पर एक `मॉडरेटर` या `एडमिन`)। फ़ेडरेट करने के लिए, वे एक `सब्सक्रिप्शन` रिकॉर्ड बनाते हैं जिसमें लक्ष्य `साइट` का पता शामिल होता है। यह क्रिया विश्वास की जानबूझकर घोषणा है। +1. **स्पष्ट सदस्यता:**यह प्रक्रिया उस उपयोगकर्ता द्वारा शुरू की जाती है जिसके पास `सदस्यता:प्रबंधित करना` अनुमति है (आमतौर पर एक `मॉडरेटर` या `एडमिन`)। फ़ेडरेट करने के लिए, वे एक `सब्सक्रिप्शन` रिकॉर्ड बनाते हैं जिसमें लक्ष्य `साइट` का पता शामिल होता है। यह क्रिया विश्वास की जानबूझकर घोषणा है। -2. **राज्य समकालिकीकरण:** `Subscription` के निर्माण के समय, `FederationManager` दो प्रकार के समकालिकीकरण करता है: +2. **राज्य समकालिकीकरण:** `सदस्यता` के निर्माण के समय, `फेडरेशन मैनेजर` दो प्रकार के समकालिकीकरण करता है: * **ऐतिहासिक समन्वय:** एक एकबारगी प्रक्रिया जो रिमोट `साइट` से जुड़ती है और इसके मौजूदा सार्वजनिक सामग्री (जैसे, `रिलीज़`) की नकल करती है। * **लाइव सिंक:** प्रबंधक रिमोट `साइट` के समर्पित पब/सबसक्राइब टॉपिक को सब्सक्राइब करता है, जिससे तात्कालिक अपडेट के लिए एक स्थायी, वास्तविक समय संचार चैनल बनता है। 3. **डेटा प्रावेनेंस:** फ़ेडरेशन के माध्यम से प्राप्त सभी डेटा अपरिवर्तनीय हैं और इसके मूल लेखक के क्रिप्टोग्राफ़िक हस्ताक्षर और इसके उत्पत्ति वाले `साइट` का पता रखते हैं। यह सुनिश्चित करता है कि सभी सामग्री का स्रोत सत्यापित किया जा सकता है। -4.**लाइफसाइकिल समाप्ति:** यदि कोई `Subscription` हटाया जाता है, तो `FederationManager` एक क्लीनअप ऑपरेशन करता है, जिससे सभी डेटा जो अनसब्सक्राइब किए गए `साइट` से संबंधित हैं, उसके स्थानीय डेटाबेस से हटा दिए जाते हैं। +4.**लाइफसाइकिल समाप्ति:** यदि कोई `सदस्यता` हटाया जाता है, तो `फेडरेशन मैनेजर` एक क्लीनअप ऑपरेशन करता है, जिससे सभी डेटा जो अनसब्सक्राइब किए गए `साइट` से संबंधित हैं, उसके स्थानीय डेटाबेस से हटा दिए जाते हैं। -## 4. The Access Control System (RBAC) +## 4.एक्सेस कंट्रोल सिस्टम (आरबीएसी) -सुरक्षा `साइट` प्रोग्राम का अभिन्न हिस्सा है। सिस्टम एक मजबूत और सुरक्षित **रोल-आधारित एक्सेस कंट्रोल (RBAC)** मॉडल पर आधारित है, जिसे एक समर्पित आंतरिक `RoleBasedccessController` द्वारा प्रबंधित किया जाता है। यह कंट्रोलर `साइट` के भीतर सभी कार्यों के लिए अंतिम प्राधिकरण है। +सुरक्षा `साइट` प्रोग्राम का अभिन्न हिस्सा है। सिस्टम एक मजबूत और सुरक्षित **रोल-आधारित एक्सेस कंट्रोल (आरबीएसी)** मॉडल पर आधारित है, जिसे एक समर्पित आंतरिक `भूमिका-आधारित एक्सेस नियंत्रक` द्वारा प्रबंधित किया जाता है। यह कंट्रोलर `साइट` के भीतर सभी कार्यों के लिए अंतिम प्राधिकरण है। -### Identity and Signing +### पहचान और हस्ताक्षर -हर वह क्रिया जो किसी `साइट` को संशोधित करती है (जैसे रिलीज़ जोड़ना या रोल असाइन करना) को क्रिप्टोग्राफिक रूप से साइन किया जाना चाहिए। Lens SDK इस पहचान के लिए दो मॉडलों का समर्थन करता है: +हर वह क्रिया जो किसी `साइट` को संशोधित करती है (जैसे रिलीज़ जोड़ना या रोल असाइन करना) को क्रिप्टोग्राफिक रूप से साइन किया जाना चाहिए। लेंस एसडीके इस पहचान के लिए दो मॉडलों का समर्थन करता है: -1. **डिफ़ॉल्ट नोड पहचान:** यदि आप `एलेंस सर्विस` को किसी कस्टम पहचान निर्दिष्ट किए बिना प्रारंभ करते हैं, तो यह Peerbit नोड से जुड़ी एक स्वचालित रूप से उत्पन्न पहचान का उपयोग करेगा। यह सर्वर-साइड स्क्रिप्ट या हेडलेस नोड्स के लिए उपयुक्त है, जहाँ एक सिंगल, स्थिर पहचान आवश्यक होती है। +1. **डिफ़ॉल्ट नोड पहचान:** यदि आप `एलेंस सर्विस` को किसी कस्टम पहचान निर्दिष्ट किए बिना प्रारंभ करते हैं, तो यह पीयरबिट नोड से जुड़ी एक स्वचालित रूप से उत्पन्न पहचान का उपयोग करेगा। यह सर्वर-साइड स्क्रिप्ट या हेडलेस नोड्स के लिए उपयुक्त है, जहाँ एक सिंगल, स्थिर पहचान आवश्यक होती है। -2.**कस्टम वॉलेट पहचान:** उपयोगकर्ता से संबंधित अनुप्रयोगों के लिए, अनुशंसित तरीका यह है कि उपयोगकर्ता के अपने वॉलेट (जैसे, MetaMask) से प्राप्त कस्टम पहचान प्रदान की जाए। जब आप इस कस्टम पहचान के साथ `एलेंस सर्विस` को प्रारंभ करते हैं, तो **सभी बाद के कार्य उपयोगकर्ता के वॉलेट द्वारा हस्ताक्षरित होते हैं**। यह सुनिश्चित करता है कि सामग्री का वास्तविक मालिक और लेखक उपयोगकर्ता ही है, न कि एप्लिकेशन नोड। यह Lens SDK में डेटा संप्रभुता का आधार है। +2.**कस्टम वॉलेट पहचान:** उपयोगकर्ता से संबंधित अनुप्रयोगों के लिए, अनुशंसित तरीका यह है कि उपयोगकर्ता के अपने वॉलेट (जैसे, मेटामास्क) से प्राप्त कस्टम पहचान प्रदान की जाए। जब आप इस कस्टम पहचान के साथ `एलेंस सर्विस` को प्रारंभ करते हैं, तो **सभी बाद के कार्य उपयोगकर्ता के वॉलेट द्वारा हस्ताक्षरित होते हैं**। यह सुनिश्चित करता है कि सामग्री का वास्तविक मालिक और लेखक उपयोगकर्ता ही है, न कि एप्लिकेशन नोड। यह लेंस एसडीके में डेटा संप्रभुता का आधार है। -### The RBAC Components +### आरबीएसी घटक -* **Administrators (`TrustedNetwork`):** उच्च स्तर पर प्रशासकों का एक `TrustedNetwork` होता है। किसी भी उपयोगकर्ता जिसकी सार्वजनिक कुंजी इस नेटवर्क में है, उसे **Admin** माना जाता है। Admins के पास सार्वभौमिक अनुमतियाँ होती हैं और केवल वही उपयोगकर्ता हैं जो स्वयं RBAC सिस्टम का प्रबंधन कर सकते हैं (जैसे, नए रोल बनाना, उपयोगकर्ताओं को रोल असाइन करना, या अन्य Admins जोड़ना)। एक `साइट` का प्रारंभिक निर्माता इसका पहला `Admin` होता है। +* **व्यवस्थापकों (`विश्वसनीय नेटवर्क`):** उच्च स्तर पर प्रशासकों का एक `विश्वसनीय नेटवर्क` होता है। किसी भी उपयोगकर्ता जिसकी सार्वजनिक कुंजी इस नेटवर्क में है, उसे **व्यवस्थापक** माना जाता है। व्यवस्थापक के पास सार्वभौमिक अनुमतियाँ होती हैं और केवल वही उपयोगकर्ता हैं जो स्वयं RBAC सिस्टम का प्रबंधन कर सकते हैं (जैसे, नए रोल बनाना, उपयोगकर्ताओं को रोल असाइन करना, या अन्य व्यवस्थापक जोड़ना)। एक `साइट` का प्रारंभिक निर्माता इसका पहला `व्यवस्थापक` होता है। * **भूमिकाएँ:** एक `भूमिका` विशिष्ट अनुमतियों का नामित संग्रह होती है। एक `साइट` को डिफ़ॉल्ट भूमिकाओं के सेट के साथ आरंभ किया जाता है, और एडमिन आवश्यकतानुसार नई कस्टम भूमिकाएँ बना सकते हैं। @@ -78,26 +78,26 @@ graph TD * **असाइनमेंट:** एक `असाइनमेंट` एक उपयोगकर्ता की सार्वजनिक कुंजी और एक `भूमिका` के बीच सत्यापनीय लिंक है। उपयोगकर्ता उन भूमिकाओं के आधार पर अनुमति प्राप्त करता है जो उन्हें असाइन की गई हैं। -### Default Roles and Permissions Table +### डिफ़ॉल्ट भूमिकाएँ और अनुमतियाँ तालिका एक `साइट` में स्पष्ट रूप से निर्धारित डिफ़ॉल्ट भूमिकाएँ होती हैं, जो तुरंत उपयोग के लिए एक तार्किक अनुमति संरचना प्रदान करती हैं। एक **एडमिन** नीचे सूचीबद्ध सभी क्रियाएँ कर सकता है। -| क्रिया / अनुमति (`resource:action`) | मॉडरेटर | सदस्य | अतिथि | विवरण | +| क्रिया / अनुमति (`संसाधन:कार्रवाई`) | मॉडरेटर | सदस्य | अतिथि | विवरण | |-----------------------------------------|:---------:|:------:|:-----:|--------------------------------------------------------------------------| -| **`release:create`** | ✅ | ✅ | ❌ | नई `रिलीज़` प्रकाशित कर सकते हैं दस्तावेज़. | -| **`release:edit:own`** | ✅ | ✅ | ❌ | वे जिन `रिलीज़` दस्तावेज़ों को उन्होंने स्वयं पोस्ट किया है, उन्हें संपादित कर सकते हैं। | -| **`release:edit:any`** | ✅ | ❌ | ❌ | साइट पर किसी भी उपयोगकर्ता द्वारा पोस्ट किए गए `Release` दस्तावेज़ को संपादित कर सकते हैं. | -| **`release:delete`** | ✅ | ❌ | ❌ | साइट से किसी भी `रिलीज़` को हटाया जा सकता है. | -| **`featured:manage`** | ✅ | ❌ | ❌ | सृजन कर सकते हैं, संपादित कर सकते हैं, या हटा सकते हैं -`FeaturedRelease` प्रविष्टियाँ. | -| **`category:manage`** | ✅ | ❌ | ❌ | सृजन कर सकते हैं, संपादित कर सकते हैं, या हटा सकते हैं -`ContentCategory` दस्तावेज़. | -| **`blocklist:manage`** | ✅ | ❌ | ❌ | बना या हटाया जा सकता है -`BlockedContent` प्रविष्टियाँ. | -| **`subscription:manage`** | ✅ | ❌ | ❌ | अन्य साइटों की सदस्यता ले सकते हैं या सदस्यता समाप्त कर सकते हैं।. | +| **`मुक्त करना:create`** | ✅ | ✅ | ❌ | नई `रिलीज़` प्रकाशित कर सकते हैं दस्तावेज़. | +| **`मुक्त करना:संपादित करें:स्वयं`** | ✅ | ✅ | ❌ | वे जिन `रिलीज़` दस्तावेज़ों को उन्होंने स्वयं पोस्ट किया है, उन्हें संपादित कर सकते हैं। | +| **`मुक्त करना:संपादित करें: कोई भी`** | ✅ | ❌ | ❌ | साइट पर किसी भी उपयोगकर्ता द्वारा पोस्ट किए गए `Release` दस्तावेज़ को संपादित कर सकते हैं. | +| **`मुक्त करना:मिटाना`** | ✅ | ❌ | ❌ | साइट से किसी भी `रिलीज़` को हटाया जा सकता है. | +| **`प्रदर्शित:प्रबंधित करना`** | ✅ | ❌ | ❌ | सृजन कर सकते हैं, संपादित कर सकते हैं, या हटा सकते हैं +`फीचर्डरिलीज़` प्रविष्टियाँ. | +| **`वर्ग:प्रबंधित करना`** | ✅ | ❌ | ❌ | सृजन कर सकते हैं, संपादित कर सकते हैं, या हटा सकते हैं +`सामग्री श्रेणी` दस्तावेज़. | +| **`ब्लॉकलिस्ट:प्रबंधित करना`** | ✅ | ❌ | ❌ | बना या हटाया जा सकता है +`अवरुद्ध सामग्री` प्रविष्टियाँ. | +| **`सदस्यता:प्रबंधित करना`** | ✅ | ❌ | ❌ | अन्य साइटों की सदस्यता ले सकते हैं या सदस्यता समाप्त कर सकते हैं।. | * **अतिथि (अप्रत्यक्ष भूमिका):** यह किसी भी उपयोगकर्ता के लिए डिफ़ॉल्ट स्थिति है जो एडमिन नहीं है और जिसे कोई भूमिका नहीं सौंपी गई है। `अतिथि` केवल पढ़ सकते हैं और कोई लिखने का कार्य नहीं कर सकते। -### Federation and Permissions +### संघ और अनुमतियाँ RBAC मॉडल संघीय सामग्री तक बुद्धिमानी से विस्तारित होता है। जबकि भरोसा मुख्य रूप से सदस्यता पर आधारित होता है, Lens SDK एक शक्तिशाली अधिलेख प्रदान करता है: **एक स्थानीय `प्रशासक` या `मध्यस्थ` हमेशा संघीय सामग्री पर कार्रवाई कर सकता है** (उदा., किसी अनसदस्यित साइट से पुरानी पोस्ट हटाना)। यह सुनिश्चित करता है कि स्थानीय साइट मालिक अपने डेटाबेस में संग्रहित सामग्री पर अंतिम नियंत्रण बनाए रखें। \ No newline at end of file