<?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: Paulo</title>
    <description>The latest articles on DEV Community by Paulo (@madroneropaulo).</description>
    <link>https://dev.to/madroneropaulo</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%2F132619%2Fde95fdd4-ebb0-457f-b9e1-c269c2f85afb.jpeg</url>
      <title>DEV Community: Paulo</title>
      <link>https://dev.to/madroneropaulo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/madroneropaulo"/>
    <language>en</language>
    <item>
      <title>¿Qué es Farcaster y cómo sacarle provecho?</title>
      <dc:creator>Paulo</dc:creator>
      <pubDate>Tue, 07 May 2024 20:01:20 +0000</pubDate>
      <link>https://dev.to/madroneropaulo/que-es-farcaster-y-como-sacarle-provecho-245g</link>
      <guid>https://dev.to/madroneropaulo/que-es-farcaster-y-como-sacarle-provecho-245g</guid>
      <description>&lt;p&gt;Farcaster es un protocolo para la creación de redes sociales "suficientemente" descentralizadas. Es decir, no todo es descentralizado.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Cómo funciona?
&lt;/h2&gt;

&lt;p&gt;La parte crypto de Farcaster está creada sobre la red Optimism. Ahí se manejan las cuentas de usuario y firmas para poder interactuar con la red.&lt;/p&gt;

&lt;p&gt;La parte de la red social se maneja en Hubs, que son servidores conectados entre si que tienen TODO el estado de la red farcaster. Los hubs utilizan las firmas para validar que un mensaje proviene de un usuario autenticado y escriben cambios en la red como casts (posts o "tweets", en farcaster se llaman casts).&lt;/p&gt;

&lt;p&gt;Para poder usar farcaster es necesario pagar alrededor de $5 dólares anuales. Esto te da derecho a almacenar en la red 5000 casts, 2500 seguidores y 2500 reacciones (likes, etc). Se pueden comprar más. Para que sigan existiendo en la red debes pagar anualmente este precio, de lo contrario se borran.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Qué ventajas tiene?
&lt;/h2&gt;

&lt;p&gt;Es un protocolo descentralizado y open source, es decir, tu puedes acceder a TODA la data de forma gratuita y crear tus propias aplicaciones con esta data. Es decir, si quieres crear tu propio twitter con usuarios y datos de farcaster lo puedes hacer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Características y cómo usarlas
&lt;/h2&gt;

&lt;p&gt;Los tres componentes básicos de farcaster son el vector social, los casts y los frames.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vector social
&lt;/h3&gt;

&lt;p&gt;El vector social es la red de contactos y autenticación de usuarios para poder interactuar con la red. Se puede usar como un sistema de autenticación en apps externas para saber que el usuario es realmente quien dice ser (algo así como login con google o facebook). Al ser firmas criptográficas, los desarrolladores tienen la certeza de que el usuario que viene de farcaster es el usuario real. Se pueden construir apps con sólo esta funcionalidad y ya son suficientemente poderosas teniendo en cuenta que cada cuenta de farcaster está asociada a un wallet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Casts
&lt;/h3&gt;

&lt;p&gt;El segundo componente importante son los casts, también están a nivel del protocolo y son básicamente los "posts" que otras personas pueden ver. Son públicos y cualquiera puede tener acceso a ellos. Las apps pueden leer casts de canales específicos y mostrarlos en sus vistas o incluso pueden agregar posts si cuentan con la firma del usuario. Esto quiere decir que un usuario puede crear su propia red social en este protocolo y hacerla parecer a Facebook por ejemplo, y  desde cero tendría acceso a casts de muchas personas en la red. Tambíen puede permitirle a usuarios existentes ingresar y estos conservarían los mismos seguidores y casts de otras redes sociales en el mismo protocolo. Estos tipos de aplicaciones se llaman clientes. Clientes de farcaster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frames
&lt;/h3&gt;

&lt;p&gt;Los frames son una novedosa invención que únicamente existe en esta red. Son pequeños programas que se ejecutan como casts, y que permiten funcionalidades básicas SIN salir de la red, por ejemplo, se puede vender productos desde un frame. Se configura un botón con una transacción, y los usuarios pueden pagar sin tener que salir a una tienda ecommerce aparte.&lt;/p&gt;

&lt;p&gt;Si quieren saber más detalles y más técnicos, déjenme saber en los comentarios o síganme en &lt;a href="https://warpcast.com/llamafacts.eth"&gt;farcaster&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Nota: El link a mi perfil que acabo de compartir lleva a Warpcast, ¿por qué? ¿Qué es warpcast?. Warpcast es el cliente más popular de farcaster, es a estilo twitter, pero así como existe ese cliente, existen otros clientes, hay clientes similares a tiktok o incluso instagram&lt;/p&gt;

</description>
      <category>farcaster</category>
      <category>web3</category>
      <category>degen</category>
      <category>español</category>
    </item>
    <item>
      <title>How to publish a website to IPFS using Pinata</title>
      <dc:creator>Paulo</dc:creator>
      <pubDate>Fri, 24 Mar 2023 13:34:20 +0000</pubDate>
      <link>https://dev.to/madroneropaulo/how-to-publish-a-website-to-ipfs-using-pinata-4o14</link>
      <guid>https://dev.to/madroneropaulo/how-to-publish-a-website-to-ipfs-using-pinata-4o14</guid>
      <description>&lt;p&gt;Hosting a website on the IPFS protocol (rather than HTTP) ensures that your website will be secure and always available. Rather than fetching content from the website’s server, it can be fetched faster and more reliably from IPFS, regardless of where the content is stored. However, building on IPFS can be complicated. Unlike regular websites that are rendered in a server, IPFS can only host static generated websites, requiring a decent amount of development experience to build all pages and code before publishing.&lt;/p&gt;

&lt;p&gt;Today I want to help you build faster and learn a new skill, while still creating an amazing product. By the end of this 4-step tutorial, you’ll be able to use Pinata to build a fully functional website hosted on IPFS. And this website will be a production-ready web application, unlike the landing pages and hobby projects you’re used to seeing—simply by combining the power of Pinata and a good idea.&lt;/p&gt;

&lt;p&gt;So you have a better idea of what you’re building, here is the result of this tutorial: &lt;a href="https://cyan-realistic-heron-820.mypinata.cloud" rel="noopener noreferrer"&gt;https://cyan-realistic-heron-820.mypinata.cloud&lt;/a&gt;. Notice that the navigation works just fine, even after a page refresh.&lt;/p&gt;

&lt;h4&gt;
  
  
  Here are the steps we’ll follow to build your IPFS website:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Create a React app and install dependencies&lt;/li&gt;
&lt;li&gt;Building a basic app with routing&lt;/li&gt;
&lt;li&gt;Building the project statically&lt;/li&gt;
&lt;li&gt;Uploading the project to IPFS&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Note:
&lt;/h3&gt;

&lt;p&gt;If you already have a working app and are looking for steps on configuring your app, steps one and two can be skipped. However, keep in mind the configuration provided in this tutorial works only with apps built with Create React App 5. If you’re interested in building with NextJs, you may run into problems when it comes to navigation when creating IPFS static sites. The exception would be building a landing page that doesn’t have any routing, but that's for another time.&lt;/p&gt;

&lt;p&gt;Ready to start building? Let’s get into it.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Creating the app
&lt;/h4&gt;

&lt;p&gt;First, let’s create a react app that is going to serve as the base for your website. We are going to use the Create React App in this tutorial, as it is the easiest way to get started. &lt;/p&gt;

&lt;p&gt;Run these commands to begin: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app ipfs-site&lt;/code&gt; &lt;br&gt;
&lt;code&gt;cd ipfs-site&lt;/code&gt;&lt;br&gt;
&lt;code&gt;npm start&lt;/code&gt;&lt;br&gt;
To create and verify that the React App is working, navigate to &lt;code&gt;localhost:3000&lt;/code&gt; in your browser. From here, you should be able to see the rotating react logo. It should look like this:&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%2Ffxkidj1lml933kyc7z19.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%2Ffxkidj1lml933kyc7z19.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Building a basic app with routing
&lt;/h4&gt;

&lt;p&gt;Let’s start here with installing some dependencies. These dependencies will help us build our platform faster, making it so we don’t have to build everything from scratch. We'll need react-router and the react MUI library to help our UI look good too. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install react-router-dom @mui/material @emotion/react @emotion/styled&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, let's create some pages. You can label these pages as anything you’d like - they’ll be used to test the navigation of the app we’re building. In this example, we’ll create the three pages key to any new business: a home page, an about page, and a pricing page. Create a folder called pages inside your project's [src] directory, and put in it three files named [home.js] [about.js] and [pricing.js] with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// src/pages/home.js
import {Box, Typography} from "@mui/material";

export default function Home() {
  return (
    &amp;lt;Box sx={{p:2}}&amp;gt;
      &amp;lt;Typography variant={"h2"}&amp;gt;
        This is the Home page
      &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  )
}

// src/pages/about.js
import {Box, Typography} from "@mui/material";

export default function About() {
  return (
    &amp;lt;Box sx={{p:2}}&amp;gt;
      &amp;lt;Typography variant={"h2"}&amp;gt;
        This is the About page
      &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  )
}

// src/pages/pricing.js
import {Box, Typography} from "@mui/material";

export default function Pricing() {
  return (
    &amp;lt;Box sx={{p:2}}&amp;gt;
      &amp;lt;Typography variant={"h2"}&amp;gt;
        This is the Pricing page
      &amp;lt;/Typography&amp;gt;
    &amp;lt;/Box&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's replace the App content with the router. Replace the [App.js] content with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// src/App.js
import {Container} from "@mui/material";
import {Routes, Route} from "react-router-dom";
import Home from "./pages/home";
import About from "./pages/about";
import Pricing from "./pages/pricing";

function App() {
  return (
    &amp;lt;Container sx={{py: 2}}&amp;gt;
      &amp;lt;Routes&amp;gt;
        &amp;lt;Route path="/" element={&amp;lt;Home /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="about" element={&amp;lt;About /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="pricing" element={&amp;lt;Pricing /&amp;gt;} /&amp;gt;
      &amp;lt;/Routes&amp;gt;
    &amp;lt;/Container&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we'll need to add the HashRouter wrapper, the main configuration trick in this tutorial. The function of that router is to put a hash # after the main route of our website, so whenever we navigate to our website, we don't call a page refresh from the server. This step is vital as files served through IPFS don't have a server, so we want to avoid refreshing the page every time you change a route. &lt;/p&gt;

&lt;p&gt;Let's edit index.js (or whatever root file you use as the initial point for your entire application). It should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { HashRouter } from "react-router-dom";

const root = ReactDOM.createRoot(
  document.getElementById('root')
);

root.render(
  &amp;lt;React.StrictMode&amp;gt;
    &amp;lt;HashRouter&amp;gt;
      &amp;lt;App /&amp;gt;
    &amp;lt;/HashRouter&amp;gt;
  &amp;lt;/React.StrictMode&amp;gt;
);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, navigate to &lt;code&gt;localhost:3000/#/about&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You should be able to see the content of your 'about' page, the same for 'pricing'. Next, we’ll let's add some navigation components so you can directly click and navigate. We are going to use three of the most common ways of using the react-router navigation - NavLink, Link, and a regular Button. &lt;/p&gt;

&lt;p&gt;Modify your App.js code so it looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {Button, Container, Paper} from "@mui/material";
import {Routes, Route, useNavigate, NavLink, Link} from "react-router-dom";
import Home from "./pages/home";
import About from "./pages/about";
import Pricing from "./pages/pricing";

function App() {
  const navigate = useNavigate();
  return (
    &amp;lt;Container sx={{py: 2}}&amp;gt;
      &amp;lt;Paper sx={{p: 2, display: 'flex', justifyContent: 'space-between'}}&amp;gt;
        &amp;lt;NavLink to={"/about"}&amp;gt;About Us &amp;lt;/NavLink&amp;gt;
        &amp;lt;Link to={"/pricing"}&amp;gt;Pricing&amp;lt;/Link&amp;gt;
        &amp;lt;Button
          variant={"contained"}
          onClick={() =&amp;gt; {navigate("/")}}
        &amp;gt;
          Home
        &amp;lt;/Button&amp;gt;
      &amp;lt;/Paper&amp;gt;
      &amp;lt;Routes&amp;gt;
        &amp;lt;Route path="/" element={&amp;lt;Home /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="/about" element={&amp;lt;About /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="/pricing" element={&amp;lt;Pricing /&amp;gt;} /&amp;gt;
      &amp;lt;/Routes&amp;gt;
    &amp;lt;/Container&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Building the project statically
&lt;/h4&gt;

&lt;p&gt;Now, it's time to build the static project for production and get ready to deploy to IPFS. But before that, we need to add one last configuration to our project. &lt;/p&gt;

&lt;p&gt;Add this to your [package.json] file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"homepage": "."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that the navigation will work for files served from a static location.&lt;br&gt;
Now, run the [npm run build]. This command will build your project to the /build folder by default.&lt;/p&gt;

&lt;p&gt;You can now test out your static project!  &lt;/p&gt;

&lt;p&gt;Drag the index.html file from the /build folder and drop it into your browser tabs - It will then open the static version of your website. &lt;/p&gt;

&lt;p&gt;Now, we have a website that has great navigation and was statically generated, so it can be served from IPFS.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Upload the project to IPFS
&lt;/h4&gt;

&lt;p&gt;For this tutorial, we will use Pinata not only as our IPFS provider but also for their Dedicated Gateways. Pinata’s gateways are efficient, secure, and easy to use - making it ideal to serve content to the audience of your choice quickly and reliably.  &lt;/p&gt;

&lt;p&gt;First, log in or create an account on the Pinata website. Next, upload the /build folder that we created from the previous step and click ‘Add Files’, then select the ‘Folder’ option. You can name your folder however you like.&lt;/p&gt;

&lt;p&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%2Fb7q06mzwiudtsi8e6gdp.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%2Fb7q06mzwiudtsi8e6gdp.png" alt="Upload your folder to Pinata"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once your folder is uploaded, select the ‘more’ options for that folder in the list, click on 'Set as gateway root', then choose a gateway from the list. &lt;/p&gt;

&lt;p&gt;By this point, you should already have a gateway created automatically. If that's not the case, you can create a gateway from the gateways page in the platform.&lt;/p&gt;

&lt;p&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%2Fham1fp69qkch0pjh9cld.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%2Fham1fp69qkch0pjh9cld.png" alt="Select folder as gateway root"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, copy and paste the gateway's name into a browser tab, and voila! Your static site is now live and on IPFS! &lt;/p&gt;

&lt;p&gt;If you followed this tutorial, it should look a little something like this. Try a complex routing scenario (like refreshing any page or typing the exact URL) and your static page will still work just fine.&lt;/p&gt;

&lt;p&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%2Fndlffedc7guhgitb2wvz.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%2Fndlffedc7guhgitb2wvz.png" alt="Select gateway"&gt;&lt;/a&gt;&lt;br&gt;
That’s it - you have successfully created your own working web application! 🎉&lt;/p&gt;

&lt;p&gt;Happy pinning!&lt;/p&gt;

</description>
      <category>ipfs</category>
      <category>pinata</category>
      <category>react</category>
    </item>
  </channel>
</rss>
