<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alok Sahay</title>
    <description>The latest articles on DEV Community by Alok Sahay (@aloksahay).</description>
    <link>https://dev.to/aloksahay</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2163389%2F1a7b6ae4-e66f-4646-bda4-f58fb03e5c15.png</url>
      <title>DEV Community: Alok Sahay</title>
      <link>https://dev.to/aloksahay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aloksahay"/>
    <language>en</language>
    <item>
      <title>Decentralized Firebase Remote Config</title>
      <dc:creator>Alok Sahay</dc:creator>
      <pubDate>Mon, 14 Oct 2024 02:59:42 +0000</pubDate>
      <link>https://dev.to/aloksahay/decentralized-firebase-remote-config-237n</link>
      <guid>https://dev.to/aloksahay/decentralized-firebase-remote-config-237n</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/pinata"&gt;The Pinata Challenge &lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a decentralized version of the popular Firebase Remote Config. You can use RemoteConfig to define parameters in your app and update their values in the cloud, allowing you to modify the appearance and behavior of your app without distributing an app update.&lt;/p&gt;

&lt;p&gt;The landing screen shows your current Project (Pinata) and the number of configurations saved.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fma8vm3dusd24f18s76r6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fma8vm3dusd24f18s76r6.png" alt="Image description" width="750" height="1334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The detail configuration screen shows your current configuration and also lets you copy the signed URL that your client application will use to point to the configuration.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flq8h7oicj75vd08iw3q1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flq8h7oicj75vd08iw3q1.png" alt="Image description" width="750" height="1334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The app developer can set certain parameters like API endpoint, app version, API version etc. They can also set certain custom tags and a switch for hot-fixing and turning features on/off the go. You can use this to make a feature live for example without any updates.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3715dj087hcjvvnfp7fs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3715dj087hcjvvnfp7fs.png" alt="Image description" width="750" height="1334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Easily compare the edits from your previous configurations. Like what features were changed, any broken endpoints etc. Old config is shown in blue.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpvnp5xnel21fuo531a1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpvnp5xnel21fuo531a1u.png" alt="Image description" width="750" height="1334"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Link to Demo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cyan-genetic-barracuda-339.mypinata.cloud/ipfs/QmabGvzA3zxEFWGvEhpFSSF2BaLAZsRDtYkzPBgHdQJKyK" rel="noopener noreferrer"&gt;IPFS:&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1LkQmFy71eeCdl4Uia1Pol5TQxAF6TBFW/view?usp=drive_link" rel="noopener noreferrer"&gt;Google Drive:&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/aloksahay/remote-config" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  More Details
&lt;/h2&gt;

&lt;p&gt;The Configurator is built in Swift using Files SDK. &lt;br&gt;
Here are some of the APIs used in the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://docs.pinata.cloud/api-reference/endpoint/list-files 
https://docs.pinata.cloud/api-reference/endpoint/upload-a-file
https://docs.pinata.cloud/api-reference/endpoint/get-signed-url
https://docs.pinata.cloud/api-reference/endpoint/add-swap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's a rough flow for the project:&lt;/p&gt;

&lt;p&gt;Dashboard app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate DB and upload to Files, DB is kept private and a signed URL is generated to fetch DB.&lt;/li&gt;
&lt;li&gt;When a configuration is added, the DB contents will change, and so will the CID. We perform a hot swap for the CIDs so the DB is always pointed by the first instance.&lt;/li&gt;
&lt;li&gt;The signed URL for the DB is passed to the client app, where a config instance is fetched that always points to the latest config. The SDK manages all configuration tasks so the user doesnt have to.&lt;/li&gt;
&lt;li&gt;An instance of configuration is stored locally on device and it is refreshed every 30 seconds (variable in the future).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using the parameters of the remote config instance, a developer can future proof updates for their app.&lt;/p&gt;

&lt;p&gt;This is a solo submission.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>pinatachallenge</category>
      <category>webdev</category>
      <category>api</category>
    </item>
  </channel>
</rss>
