<?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>Forem: Sig</title>
    <description>The latest articles on Forem by Sig (@sigcoding).</description>
    <link>https://forem.com/sigcoding</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%2Forganization%2Fprofile_image%2F7174%2Fab7a8d21-bf48-46c4-a4e6-9992298287dd.png</url>
      <title>Forem: Sig</title>
      <link>https://forem.com/sigcoding</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sigcoding"/>
    <language>en</language>
    <item>
      <title>Como coletar e dividir pagamentos com a API do Stripe</title>
      <dc:creator>Igor Duca</dc:creator>
      <pubDate>Sun, 19 Nov 2023 02:43:45 +0000</pubDate>
      <link>https://forem.com/sigcoding/como-coletar-e-dividir-pagamentos-com-a-api-do-stripe-3ee2</link>
      <guid>https://forem.com/sigcoding/como-coletar-e-dividir-pagamentos-com-a-api-do-stripe-3ee2</guid>
      <description>&lt;h2&gt;
  
  
  Antes de tudo: o que é o &lt;a href="https://biome.sigcoding.com" rel="noopener noreferrer"&gt;Biome&lt;/a&gt;?
&lt;/h2&gt;

&lt;p&gt;O Biome é um marketplace de aplicações web criado por desenvolvedores, para desenvolvedores. Nós da &lt;a href="https://dev.to/sigcoding"&gt;Sig&lt;/a&gt; tivemos a ideia de criar um novo ambiente onde qualquer desenvolvedor possa publicar as suas novas aplicações e monetizá-las ou não, gerando assim uma nova oportunidade para novas pessoas criarem credibilidade no seu portfolio, conseguindo usar as suas vendas e métricas como parâmetro para a sua confiabilidade como um profissional da tecnologia -- ou uma pessoa com hobbie de criar coisas boas.&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%2Fmjkhhrks4w9dygu5ndr2.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%2Fmjkhhrks4w9dygu5ndr2.png" alt="Biome"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Prefácio
&lt;/h2&gt;

&lt;p&gt;Um dos maiores desafios que tivemos durante o desenvolvimento do nosso marketplace de aplicações web (Biome) foi como desenvolver um pagamento confiável e resiliente para que os nossos usuários tenham certeza de que serão corretamente monetizados por suas criações. Durante o processo de pesquisa e entendimento de gateways de pagamento, chegamos à conclusão de que o gateway que melhor atendia as nossas necessidades e expectativas agora a nível de MVP foi o Stripe, pelos seguintes motivos que serão explicados durante esta publicação:&lt;/p&gt;

&lt;p&gt;1 - Comunidade &lt;br&gt;
2 - Certificação de documentos&lt;br&gt;
3 - Pagamento parcelado&lt;br&gt;
4 - Split Payment &lt;br&gt;
5 - API&lt;/p&gt;

&lt;h2&gt;
  
  
  Opiniões da comunidade sobre o Stripe
&lt;/h2&gt;

&lt;p&gt;A documentação do Stripe é elogiada por todos os desenvolvedores que precisam implementarem os seus serviços em uma de suas criações.&lt;/p&gt;


&lt;blockquote&gt;
&lt;p&gt;eu daria muito um premio pra um dev do stripe por ter criado o MELHOR dashboard de todos os tempos &lt;a href="https://t.co/XTPxzu1AYR" rel="noopener noreferrer"&gt;pic.twitter.com/XTPxzu1AYR&lt;/a&gt;&lt;/p&gt;— igor duca (@ducaswtf) &lt;a href="https://twitter.com/ducaswtf/status/1724488056667857273?ref_src=twsrc%5Etfw" rel="noopener noreferrer"&gt;November 14, 2023&lt;/a&gt;
&lt;/blockquote&gt; 


&lt;blockquote&gt;
&lt;p&gt;e a melhor documentação tbm, padrão rubista de qualidade&lt;/p&gt;— cherry 🏳️‍⚧️🍒 (@cherry_ramatis) &lt;a href="https://twitter.com/cherry_ramatis/status/1724581852663451721?ref_src=twsrc%5Etfw" rel="noopener noreferrer"&gt;November 15, 2023&lt;/a&gt;
&lt;/blockquote&gt; 

&lt;p&gt;&lt;a href="https://dev.to/cherryramatis"&gt;Confiram os artigos da Cherry&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Tendo isso em mente, foi ainda mais fácil tomar a decisão de usar o Stripe como principal gateway de pagamento, mesmo sabendo sobre o seu principal ponto negativo: a falta de suporte a Pix.&lt;/p&gt;

&lt;h3&gt;
  
  
  Não tem Pix????
&lt;/h3&gt;

&lt;p&gt;Por ser um gateway de pagamento usado globalmente, mas, principalmente nos Estados Unidos, o Stripe tende a ter mais suporte para tecnologias americanas do que a queridinha brasileira, mas, de qualquer forma, temos alguns outros pontos que fazem a falta de suporte a Pix ser apenas um "dá pra esperar lançar".&lt;/p&gt;

&lt;h2&gt;
  
  
  Certificação de Documentos
&lt;/h2&gt;

&lt;p&gt;A responsabilidade de programar um marketplace do zero é muito grande, e é por isso que temos que fazer ótimas escolhas pensando principalmente na UX e confiança dos nossos usuários. Um dos nossos maiores receios era o de acontecerem calotes ou falhas de pagamento na plataforma, e, uma das saídas que encontramos foi a certificação de documentos (RG, CNPJ, CNH) dentro da implementação de uma conta de parceiro do Biome -- usando a API de pagamentos do Stripe.&lt;/p&gt;

&lt;h3&gt;
  
  
  Por trás do código da criação de uma conta de parceiro
&lt;/h3&gt;

&lt;p&gt;O Stripe tem essa funcionalidade muito legal chamada Stripe Connect. O Stripe Connect te permite a criar uma conta para o seu negócio e cadastrar parceiros que vão receber uma certa porcentagem (programática) por cada uma das suas vendas. No código abaixo está sendo demonstrada a forma mais simples de se criar uma conta de parceiro no Stripe:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;

&lt;span class="c1"&gt;// createStripeAccount.ts&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Stripe&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stripe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createAccountLink&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./createAccountLink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Stripe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STRIPE_SECRET_KEY&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2023-08-16&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createStripeAccount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;youremail@email.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;card_payments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;requested&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;transfers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;requested&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;A única funcionalidade do código acima é registrar uma conta para o usuário parceiro da sua empresa no Stripe usando apenas o seu email como referência. Para que o usuário consiga receber os pagamentos, ele precisa preencher alguns outros dados obrigatórios, mas, para isso, você deve gerar um &lt;code&gt;accountLink&lt;/code&gt; para que ele forneça as outras informações para o próprio Stripe.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;

&lt;span class="c1"&gt;// createStripeAccountLink.ts&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Stripe&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stripe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Stripe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STRIPE_SECRET_KEY&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2023-08-16&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createAccountLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;returnUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;accountLinks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;account&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;refresh_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://biome.sigcoding.com/reauth&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;return_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;returnUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;account_onboarding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;O account link deve ser enviado para o usuário -- ou o usuario também pode ser redirecionado para ele, que é a forma como eu lido com esse link -- e nele, serão pedidas as outras informações sobre endereço e documentação.&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%2F7h8dl9c8qjn9z7jz63oz.jpeg" 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%2F7h8dl9c8qjn9z7jz63oz.jpeg" alt="Tela de configuração para ser parceiro do Biome"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  FAQ: Tentei fazer uma cobrança com o usuário criado com o código acima e não funcionou por conta de falta de requerimentos
&lt;/h3&gt;

&lt;p&gt;A falta de requerimento pode significar uma lista de coisas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;O usuário não preencheu todos os documentos necessários&lt;/li&gt;
&lt;li&gt;Você não especificou os requerimentos na função de criação do usuário e então não foram requisitadas as informações&lt;/li&gt;
&lt;li&gt;Os documentos ainda estão em tempo de análise&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A última observação foi algo que aprendi enquanto debugava os pagamentos do Biome: o Stripe não especifica nos retornos quanto tempo demorará para que eles consigam confirmar os documentos do seu usuário e assim fazer com que ele esteja elegível para receber ou para ser cobrado, mas, você ainda pode conferir isso pelo CMS do próprio Stripe:&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%2Fnmc2ueg8c1bdwn1cch2s.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%2Fnmc2ueg8c1bdwn1cch2s.png" alt="Tela de usuários cadastrados no Stripe Connect"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dashboard.stripe.com/test/connect/accounts/overview" rel="noopener noreferrer"&gt;Aqui está o link que te leva para a tela de overview das contas do Stripe Connect&lt;/a&gt;. Esse link vai te ajudar a ter uma noção de quantos usuários parceiros estão cadastrados hoje na sua plataforma.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tenho usuários cadastrados, como faço para receber um pagamento e repassar uma parte do pagamento para essas pessoas?
&lt;/h3&gt;

&lt;p&gt;Se você quer criar uma espécie de marketplace e repassar valores de compras para usuários, a solução de transferências do Stripe resolve muito bem o seu problema, e tudo o que você precisa é da seguinte implementação:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;

&lt;span class="c1"&gt;// Código retirado da própria documentação do Stripe&lt;/span&gt;

&lt;span class="c1"&gt;// Set your secret key. Remember to switch to your live secret key in production.&lt;/span&gt;
&lt;span class="c1"&gt;// See your keys here: https://dashboard.stripe.com/apikeys&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stripe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sk_test_51O4brBKOx2aErhkvVXzbwdtFk99FvB1M94fbbvwnJPJDMUNs97SATizCSqjSosH9CfBOcwEVVSJeckuabmcBiM3K003TXv4Rdr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sessions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payment&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;line_items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;{{PRICE_ID}}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;payment_intent_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;application_fee_amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;transfer_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;{{CONNECTED_ACCOUNT_ID}}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;success_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com/success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;cancel_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com/cancel&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;O código acima foi retirado &lt;a href="https://dashboard.stripe.com/test/connect/accounts/overview" rel="noopener noreferrer"&gt;dessa documentação do Stripe&lt;/a&gt;. Basicamente o que está acontecendo aí é que esse código gera um checkout -- ou seja, esse código gera uma tela onde os seus usuários podem fazer um pagamento com o cartão de crédito -- e quando a compra é completa, um valor automaticamente é transferido para uma conta do Stripe.&lt;/p&gt;

&lt;h4&gt;
  
  
  FAQ: Mas e se meus usuários não tiverem uma conta no Stripe?
&lt;/h4&gt;

&lt;p&gt;Não tem problema nenhum, por isso você vai apenas usar a conta do Stripe Connect criada com um dos códigos citados anteriormente aqui para fazer essa função, já que você cria uma conta pro usuário, independente se ele tiver uma conta ou não, evitando assim que pessoas tenham de "perder tempo" criando uma conta do Stripe só para receber o dinheiro delas no seu app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Algumas outras perguntas legais:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  FAQ: Quando os usuários são pagos?
&lt;/h3&gt;

&lt;p&gt;O Stripe Connect paga os usuários diariamente, mas você pode ter mais informações sobre isso &lt;a href="https://stripe.com/br/connect/payouts" rel="noopener noreferrer"&gt;aqui&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  FAQ: Quanto de taxa o Stripe tem?
&lt;/h4&gt;

&lt;p&gt;O Stripe Connect tem uma taxa de 0,25% + USD 0,25 por transação enviada. Você pode ter mais detalhes &lt;a href="https://stripe.com/pt-br-us/connect/pricing" rel="noopener noreferrer"&gt;aqui&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  FAQ: Funciona localmente?
&lt;/h4&gt;

&lt;p&gt;A API do Stripe é bem amigável com devs, então você pode não só testar pagamentos e cobranças localmente (ou em prod, se estiver com coragem) usando as chaves de teste mas eles também te deixam testar webhooks usando o Stripe CLI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stripe.com/docs/connect" rel="noopener noreferrer"&gt;Documentação do Stripe&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Sig Coding&lt;br&gt;
Sig is a community-first DAO startup that produces SaaS applications powered by its own community. We spend time thinking on how to make things better and how to make tech be more environment-friendly.&lt;/p&gt;




&lt;p&gt;Thumbnail feita por &lt;a href="https://twitter.com/ducaswtf" rel="noopener noreferrer"&gt;Igor Duca&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Test? When to test?</title>
      <dc:creator>Igor Duca</dc:creator>
      <pubDate>Thu, 20 Jul 2023 12:19:51 +0000</pubDate>
      <link>https://forem.com/sigcoding/test-when-to-test-6kb</link>
      <guid>https://forem.com/sigcoding/test-when-to-test-6kb</guid>
      <description>&lt;p&gt;Everyone now and then talked about the importance of writing unitary or implementation tests, but not everyone tried to explain to you what do you need to test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test? When to test?
&lt;/h2&gt;

&lt;p&gt;First things first I need to explain to you deep down in the basics: "what is the purpose of testing?". Testing is trying to predict a mistake from the user before it happened. As a scientist or an engineer, your job is to prevent the final user to fail in what you have built.&lt;/p&gt;

&lt;h2&gt;
  
  
  Front-end tests
&lt;/h2&gt;

&lt;p&gt;Front-end tests are sort of more unusual than the back-end ones are.&lt;br&gt;
There are some architectures like &lt;strong&gt;microfrontend&lt;/strong&gt;, &lt;strong&gt;componentization&lt;/strong&gt; or &lt;strong&gt;atomic design&lt;/strong&gt; that could help you creating tests for your websites or front-end applications. Basically, in front-end, you may test the steps that the user will take during his exploration through the website. So, you may want to test things like: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is the register working?&lt;/li&gt;
&lt;li&gt;Is the login working?&lt;/li&gt;
&lt;li&gt;Is the document upload working?&lt;/li&gt;
&lt;li&gt;Is the payment gateway working?&lt;/li&gt;
&lt;li&gt;Are my emails being sent?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And there are also a lot other kind of tests that not even everyone knows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Testing page contrast&lt;/li&gt;
&lt;li&gt;Testing page analytics

&lt;ul&gt;
&lt;li&gt;How much time does the page needs to load?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Back-end tests
&lt;/h2&gt;

&lt;p&gt;Back-end tests are kind of &lt;strong&gt;required&lt;/strong&gt; to build an application that can scale this days. This tests may be also related to what the user can, and will do, while he is using your services, so back-end tests must test &lt;strong&gt;YOUR&lt;/strong&gt; code, not the code from the libraries you are using.&lt;/p&gt;

&lt;p&gt;For example, a tweet of mine motivated me searching for better explanations about testing, and consequently, made me write this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xap6o9poft920wouobr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xap6o9poft920wouobr.png" alt="Tweet" width="800" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you guys can see, this is an example about &lt;strong&gt;WHAT NOT TO TEST&lt;/strong&gt;, but first let me explain why not to write tests like this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Only test your code
&lt;/h3&gt;

&lt;p&gt;There are not any problems in the code, the code is pretty clean though. The real problem is: I am only testing Jest's code, not mine.&lt;br&gt;
This test case below only tests if mongoose save method is working, not integrating my application into it.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to test back-end
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://woovi.com"&gt;Woovi.com&lt;/a&gt; have a pretty great article that explains how and when you can test your back-end, you can see it &lt;a href="https://dev.to/woovi/what-to-test-in-the-backend--1l44"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But, basically, you should test your code and the integrations that it may establish with external APIs for instance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test if API version match to the one you are waiting for&lt;/li&gt;
&lt;li&gt;Test if your credentials are still active&lt;/li&gt;
&lt;li&gt;Test if your controllers are working&lt;/li&gt;
&lt;li&gt;Test if your services are working&lt;/li&gt;
&lt;li&gt;Test if your recent migration is still compatible with your expected interfaces&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Finally
&lt;/h2&gt;

&lt;p&gt;Test your own code.&lt;/p&gt;




&lt;p&gt;Sig Coding&lt;br&gt;
Sig is a community-first DAO startup that produces SaaS applications powered by its own community. We spend time thinking on how to make things better and how to make tech be more environment-friendly.&lt;/p&gt;




&lt;p&gt;Thumbnail by Wu Yi at &lt;a href="https://unsplash.com/photos/Bfrk9RCOhRE"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jest</category>
      <category>testing</category>
      <category>debug</category>
    </item>
    <item>
      <title>The origin of App Router - A Next.Js Rewind</title>
      <dc:creator>Igor Duca</dc:creator>
      <pubDate>Sat, 15 Jul 2023 16:11:33 +0000</pubDate>
      <link>https://forem.com/sigcoding/the-origin-of-app-router-a-nextjs-rewind-564m</link>
      <guid>https://forem.com/sigcoding/the-origin-of-app-router-a-nextjs-rewind-564m</guid>
      <description>&lt;h2&gt;
  
  
  Preface
&lt;/h2&gt;

&lt;p&gt;There are many controversial opinions about Next.js 13 App Router, some of them say that this routing method is slow and created a lot of unnecessary weight in the project, but in the other side, many people says that managing your routes using the App Router is the best way to improve productivity while building with Vercel's very own Next.js&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Next was created?
&lt;/h2&gt;

&lt;p&gt;In one of &lt;a href="https://www.youtube.com/lucasmontano"&gt;Lucas Montano&lt;/a&gt;'s videos — this particular one featured &lt;a href="https://www.youtube.com/@DevSoutinho"&gt;Mario Souto&lt;/a&gt; they did a retrospective moment talking about the purpose of Next.js's existence.&lt;br&gt;
When &lt;a href="https://twitter.com/rauchg"&gt;Guillermo Rauch&lt;/a&gt;, CEO of Vercel, first launched Next.js back in 2017, he mentioned that Next was created in a try to make an framework that would build application as PHP was merged with JavaScript.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Think about how webapps are created with PHP. You create some files, write PHP code, then simply deploy it. We don't have to worry about routing much, and the app is rendered on the server by default.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4bvboe5ljt74ahso2y53.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4bvboe5ljt74ahso2y53.png" alt="NextJS o Marketing da Vercel, from Lucas Montano" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Watch the video &lt;a href="https://www.youtube.com/watch?v=miQmyAQ9KNE&amp;amp;t"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing AppRouter to PHP router
&lt;/h2&gt;

&lt;p&gt;Starting with PHP, where the idea of Next came from.&lt;br&gt;
In PHP, there are many ways to route your application, just as it works at React, you can install some routing library and work with a custom &lt;code&gt;routes.php&lt;/code&gt; file or you can choose for building a folder structure that will be responsible for routing your entire application&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F79otf4gdgtgym6rgm53l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F79otf4gdgtgym6rgm53l.png" alt="PHP Routing" width="777" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, each one of the files inside this source directory is assigned to a route, so &lt;code&gt;404.php&lt;/code&gt; would be the &lt;code&gt;/404&lt;/code&gt; route, the same way &lt;code&gt;home.php&lt;/code&gt; would be the &lt;code&gt;/&lt;/code&gt; route.&lt;/p&gt;

&lt;p&gt;Pretty simple, right? Next uses an almost identical folder structure to route applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb81kjhuh0jg69x4z9pk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb81kjhuh0jg69x4z9pk0.png" alt="Page Router" width="730" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above there is Next.js original routing, that was based in the &lt;code&gt;pages&lt;/code&gt; folder. A &lt;code&gt;pages&lt;/code&gt; folder needed to exist in the app in order to create routes.&lt;br&gt;
The structure consisted on a page inside the pages folder and a &lt;code&gt;index.tsx&lt;/code&gt; file inside of the subfolder.&lt;/p&gt;

&lt;p&gt;For example: the directory &lt;code&gt;pages/users/duca.tsx&lt;/code&gt; would create the route &lt;code&gt;users/duca&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  New routing method: AppRouter
&lt;/h3&gt;

&lt;p&gt;In order to make Next route even more succinct, Vercel developed the App Router. &lt;br&gt;
Now the routes look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41nsisxzgamr4vmzm2sf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41nsisxzgamr4vmzm2sf.png" alt="App Router" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The app does not need anymore the folder &lt;code&gt;pages&lt;/code&gt; to work. Now, it follows this structure: &lt;code&gt;app/users/duca/page.tsx&lt;/code&gt; to generate the &lt;code&gt;/users/duca&lt;/code&gt; route. In this example, the routing seems to be static, once always will exist just one &lt;code&gt;/duca&lt;/code&gt; route and you can not change the user without creating or renaming the existent folder.&lt;/p&gt;

&lt;p&gt;But, let's try a new perspective: If you want to create a dynamic route that reads the name of a user by its url and then display it on screen, you can do something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpb6l42unc2sjigmopnk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpb6l42unc2sjigmopnk0.png" alt="Dynamic Route - App Router" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final considerations
&lt;/h2&gt;

&lt;p&gt;Guillermo had successfully created a file-based routing system that I am afraid to say that works better than the one from PHP.&lt;/p&gt;

&lt;p&gt;Now it is up to you. Based on your application, which routing system would serve you better? Page routing (the deprecated one) or the newer App Router?&lt;/p&gt;

&lt;p&gt;Would you be affected by a system that is more needed of folders but has a succinct nomenclature or would you prefer keep using the &lt;code&gt;pages&lt;/code&gt; folder on exchange of using fewer folders to route your app?&lt;/p&gt;




&lt;p&gt;Sig Coding&lt;br&gt;
&lt;a href="https://sigcoding.com"&gt;Sig&lt;/a&gt; is a community-first DAO startup that produces SaaS applications powered by its own community. We spend time thinking on how to make things better and how to make tech be more environment-friendly.&lt;/p&gt;

</description>
      <category>vercel</category>
      <category>nextjs</category>
      <category>routing</category>
      <category>approuter</category>
    </item>
    <item>
      <title>People Should Follow Ideas - Sig's Walkthrough</title>
      <dc:creator>Igor Duca</dc:creator>
      <pubDate>Wed, 12 Jul 2023 14:50:13 +0000</pubDate>
      <link>https://forem.com/sigcoding/people-should-follow-ideas-sigs-walkthrough-3ee8</link>
      <guid>https://forem.com/sigcoding/people-should-follow-ideas-sigs-walkthrough-3ee8</guid>
      <description>&lt;h2&gt;
  
  
  Preface
&lt;/h2&gt;

&lt;p&gt;Once you are trying to make an idea become true and be proud of yourself to make it work that well, you need to make right decisions and meet the right people to take your idea off of the blueprint.&lt;/p&gt;

&lt;p&gt;In this personal article, I will explain how I took the ones that made my company be where we are today. So, we need to set some points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What makes you unique?&lt;/li&gt;
&lt;li&gt;Does your team believe in your idea?&lt;/li&gt;
&lt;li&gt;You have no money. How make your company still running?
During this article I will explain how I answered each one of this three questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What makes you unique?
&lt;/h2&gt;

&lt;p&gt;Sig was born after an idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Software must not look into people with more experience, once making something work says more about passion than knowledge. Everyone can learn, but you can not force anyone to fall in love with your idea&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In order to follow what I wanted my startup to be based on, my first colleagues and employees were my friend that I made in college and his friend that lived in other state. They were finishing a programming school course and were also looking for an opportunity as a trainee in some small tech company in Brazil.&lt;/p&gt;

&lt;h3&gt;
  
  
  My first steps
&lt;/h3&gt;

&lt;p&gt;At first, Sig were an agency that received freelancing jobs from another companies and had its profit shared between us three. A few days after our start, I would say in less than four days, I found our first design chief, specialized on UI/UX and with a lot more work experience than anyone in the company, he was the one that created our new visual identity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5czdzwr6y20z57wci3yu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5czdzwr6y20z57wci3yu.png" alt="Sig logo versions" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right after having our new team composed by 3 developers and 3 designers, our first customer and partner came: an crypto bank that were developed by a &lt;em&gt;carioca&lt;/em&gt; developer, and we needed to help him with his mobile app visual identity and design. The owner of this bank became a personal friend of mine after our first talks, and so, he helped me sketching Sig's first remuneration model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sig's first steps to become a Startup
&lt;/h3&gt;

&lt;p&gt;After some talks, I realized that Sig needed money to survive, so if we have not had any customers in the month, I would still paying for the developers and the company infrastructure. Said that, I booked a meeting with the entire team and built our first job description model: Each one of the components of the team that were present at that moment would have a % of the company while our idea was starting to expand, and, after some time and work model changes, their % would be changed by executive roles in the company board.&lt;/p&gt;

&lt;h3&gt;
  
  
  CFO enters the game
&lt;/h3&gt;

&lt;p&gt;I was studying finances as fast as I could, learning about how to build up strategies to make sure that my team would be paid in day and at the same time be excited for the new projects that were coming to the startup. Then, I started to look for people that could help me managing the finances of my company, since I figured out that coding were my strong point and I should keep focusing on being a leader and improving my coding skills.&lt;br&gt;
At this point, I remembered that my cousin were working at an investor consultant at &lt;em&gt;XP Investimentos&lt;/em&gt; and I invited him to be a part of the company and take care of our finances, because I would not be able to make that work all alone.&lt;/p&gt;
&lt;h3&gt;
  
  
  Let us start being a Startup
&lt;/h3&gt;

&lt;p&gt;After we had already our Chief of Design, Chief Executive Officer and Chief Financial Officer, we could really take a step forward to start being a startup.&lt;br&gt;
After our first weeks with a larger team, our first big customer appeared out of the blue: now XP was our customer. We started taking some meetings with the guys from XP and it was time to bring more developers to the game, since only three of us — me as senior and my two friends that were learning their first commercial experiencies working alongside me.&lt;/p&gt;
&lt;h3&gt;
  
  
  Your team must be powered by an idea
&lt;/h3&gt;

&lt;p&gt;At this point, my team was with almost 10 people and I needed to think how I was supposed to make their work for my idea without paying, since our contract with XP were about to start and we did not had money to hire other developers.&lt;br&gt;
That was the point that made me think about a trade-off: I am going to purpose to juniors an opportunity to be close to XP team and learn with me how to be a part of a professional tech team and be prepared to be launched at the tech market when they feel they were ready. This way, my teams would be temporary but I would be helped with those guys to make my idea become true.&lt;/p&gt;
&lt;h3&gt;
  
  
  SCRUM or Kanbam?
&lt;/h3&gt;

&lt;p&gt;Demand were coming hot and we needed to start creating boards to make sure anyone would be lost in the process and our team potential would not be wasted without a good task management.&lt;br&gt;
After making some researches and also remembering what I did in the other companies I worked, this list of needs was created:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We need a free tool&lt;/li&gt;
&lt;li&gt;We need a good integration with github&lt;/li&gt;
&lt;li&gt;We need to create sprints — so, this way I would be able to follow my juniors much closer and help them with their doubts&lt;/li&gt;
&lt;li&gt;We need to create a board for each project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, we started to use &lt;a href="https://www.atlassian.com/software/jira"&gt;JIRA&lt;/a&gt;. Our sprints lasted 15 days each and we had two meetings per sprint, one to be a kickoff meeting and the other one to take a look at our progress and make a general code review of the concluded tasks.&lt;/p&gt;
&lt;h3&gt;
  
  
  Wait... more people are coming?
&lt;/h3&gt;

&lt;p&gt;More developers started to come after me asking about our project and how they could work in exchange of experiencing how it is to work on a team of professional developers. That was the moment I realized my idea was starting to be something, a lot of people were looking forward to enter in the team and we had a lot of good feedbacks since the very beginning.&lt;/p&gt;
&lt;h2&gt;
  
  
  Does your team believe in your idea?
&lt;/h2&gt;

&lt;p&gt;After our team started expanding in a way that would be difficult for me to take look of every developer in the company, I started our new model: &lt;strong&gt;shared leadership&lt;/strong&gt;.&lt;br&gt;
I booked a call with my oldest developers and asked them some questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our team is much bigger that when you guys came in. Be in the team still make sense for you two?
I had a positive feedback&lt;/li&gt;
&lt;li&gt;I need you two to help me take care of everyone in the team, this is when you become team leaders, it is OK for you two?
They started to be very excited with the idea of being leaders and accepted my offer.
With this conversation, I had the confidence that my team believed in my idea and they were up to anything that we would need to deal in the future.
After that call, both of them started to be leaders of two teams with 3 developers each.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Our big squad
&lt;/h3&gt;

&lt;p&gt;At that moment of the company, our squad had almost 12 members, 9 developers and 3 designers.&lt;br&gt;
That was the moment I figured out we needed to start paying our team as fast as possible or it would start shrinking and people would become unsatisfied with the startup.&lt;/p&gt;
&lt;h3&gt;
  
  
  First earthquake
&lt;/h3&gt;

&lt;p&gt;Our first earthquake was when my design chief needed to take a break of the company since his other job was needing too much of him because of some emergencies that happened that very same week.&lt;br&gt;
After the designer dropped the team, his team of two other designers also needed to take a break so they could focus on their jobs, because they did not had their leader on the team anymore.&lt;/p&gt;
&lt;h3&gt;
  
  
  Putting the team together
&lt;/h3&gt;

&lt;p&gt;After the shock that we had, I needed to start searching for new designers, and that was when I started searching for intelligent people at twitter.&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1667688885361557506-452" src="https://platform.twitter.com/embed/Tweet.html?id=1667688885361557506"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1667688885361557506-452');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1667688885361557506&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;In less than two weeks we already had our new design team, composed by three designers: our new chief of design — that showed to be so much excited to work with us and he helped me understanding more about UI/UX.&lt;/p&gt;

&lt;h3&gt;
  
  
  A new potential?
&lt;/h3&gt;

&lt;p&gt;One of our new designers is a specialist in cognitive research and psychology applied to interfaces, and after she entered the team, I realized that our startup could finally take a step forward and stop producing just websites and start being a strong SaaS builder.&lt;/p&gt;

&lt;p&gt;## You have no money. How make your company still running?&lt;br&gt;
XP was starting to pay us and our team was on its bigger size — bigger that the team we have today.&lt;br&gt;
That was when I started putting together a system of remuneration based on challenges and demand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sibelius Seraphini
&lt;/h3&gt;

&lt;p&gt;I sent a twitter direct message to Sibelius asking for a position as trainee in &lt;a href="https://woovi.com"&gt;Woovi&lt;/a&gt; in order to learn with my major inspiration in the brazilian developer community to improve my coding skills.&lt;br&gt;
After a chit-chat he sent me some bounties that are running on Woovi so I could solve one of them and prove if I was really intelligent enough to enter his team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let me start looking for really good people
&lt;/h3&gt;

&lt;p&gt;After collaborating with Woovi in some of their projects and starting to be a part of the team, I saw that Sig walks in the same path as Woovi: we want to be quick, inclusive and automatized.&lt;br&gt;
And, this is when I put together our new business modal: Sig were starting to be a community-first DAO company.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why a DAO?
&lt;/h3&gt;

&lt;p&gt;I need my team to be as much engaged with the project as possible, and my solution to this issue was giving them the possibility to work as they want and when they wanted to, as long as they delivered the tasks on time, it would work just fine.&lt;br&gt;
Alongside the DAO model, I started to make my startup as much horizontal as possible: I started writing more essays, more documentations and more papers so they could learn how I think and how I expect things to be done at Sig — this paper will also serve as a direction to them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Community-first
&lt;/h3&gt;

&lt;p&gt;Our &lt;a href="https://discord.gg/k7tKxaHZBu"&gt;discord community&lt;/a&gt; started to grow after Sibelius started to support Sig as a mentor and consultant. We merged our communities and his followers also started to look forward to learn more about my business model.&lt;br&gt;
At this time, I am taking the next steps of the company: Enlarge our community and start to look for bounties where they can work on and feel like they are inside of the team and helping the company to climb through new levels.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leaf
&lt;/h2&gt;

&lt;p&gt;I think Leaf is the part of Sig that I am most proud of. Leaf is our &lt;em&gt;technology to sustainability&lt;/em&gt; module, where we can build applications and services that helps the environment through &lt;em&gt;green technology&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  GAMBA
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://gamba.org.br/"&gt;GAMBA&lt;/a&gt; — Grupo Ambientalista da Bahia&lt;/em&gt; is the first NGO that we worked with. Together we created a project to help native people of brazilian poor regions though geographic location applications that shoots massive alerts to different channels. You can learn more about the project at &lt;a href="https://sigcoding.com/sig-gamba"&gt;our website&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  doebem
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://doebem.org.br/"&gt;doebem&lt;/a&gt; is a fundraiser NGO that collects donations from people and then redirect them to other causes in the country, so this way our money is taken care by competent organizations. This project also was the one that helped us be recognized by Woovi and build a direct partnership between the startups.&lt;/p&gt;

&lt;h2&gt;
  
  
  My next steps
&lt;/h2&gt;

&lt;p&gt;All I wanted to say its said during this article, I hope you can learn with my thoughts how to help your idea to become real and start being something real.&lt;br&gt;
In the next few days, this is what I will working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Woovi and OpenPix &lt;/li&gt;
&lt;li&gt;doebem&lt;/li&gt;
&lt;li&gt;Growing our community&lt;/li&gt;
&lt;li&gt;Being recognized for my ideas at Twitter&lt;/li&gt;
&lt;li&gt;Make Sig bigger and more valuable&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Sig Coding&lt;br&gt;
Sig is a community-first DAO startup that produces SaaS applications powered by its own community. We spend time thinking on how to make things better and how to make tech be more environment-friendly.&lt;/p&gt;

</description>
      <category>startup</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why not to have meetings</title>
      <dc:creator>Igor Duca</dc:creator>
      <pubDate>Mon, 10 Jul 2023 22:09:33 +0000</pubDate>
      <link>https://forem.com/sigcoding/why-not-to-have-meetings-4ikc</link>
      <guid>https://forem.com/sigcoding/why-not-to-have-meetings-4ikc</guid>
      <description>&lt;p&gt;At Sig we spend a lot of time thinking how to not spend more time taking decisions in the future.&lt;/p&gt;

&lt;p&gt;First things first, our company had flexible meetings and SCRUM boards with the purpose to track and be aware of when and where – in which project – our devs were working, but, with time, I figured out that &lt;strong&gt;this was not the answer to our concerns&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bad part of meeting
&lt;/h2&gt;

&lt;p&gt;Everyone had already worked on a company that used a lot of meetings to talk about meaningless stuff, got away from the meeting subject and started talking about bullshit or some other worse experience.&lt;/p&gt;

&lt;p&gt;The main point of meeting someone to talk about business is: to solve a problem without misunderstandings, wasting of time and one of its major advantages: &lt;strong&gt;consensus&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Said that, we need to start thinking about a way to solve the problems mentioned above and spending less time and money to make it work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx9aainm0v9npc2t1pb4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx9aainm0v9npc2t1pb4.png" alt="Comparing the conventional method to the Async Fist Method" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A-sync first
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DO NOT WAIT FOR ANYONE TO GET SHIT DONE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need to know what will be the next step that you need to take to evolve the product you are working on. That is why all of your decision making patterns, project scope, client meeting minutes and dev specs are available on our documentation.&lt;br&gt;
All you need to know is written, not spoken nor recorded.&lt;/p&gt;

&lt;p&gt;Do you have some issue? Send a message to your squad&lt;br&gt;
The business rule is too hard for you to understand? Get in touch with one of your colleagues and ask&lt;/p&gt;

&lt;p&gt;Are you afraid of asking? &lt;a href="https://www.amazon.com.br/Just-Ask-Different-Brave-You/dp/0525514120"&gt;Just ask!&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frib9mjnlm9egrkd7402o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frib9mjnlm9egrkd7402o.png" alt="Rafael Lopez - Just Ask!" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How things work at Sig
&lt;/h2&gt;

&lt;p&gt;First things fist, we avoid having meetings.&lt;br&gt;
It does not imply that we NEVER have meetings, it means that we talk, think and make decisions by forums or messages.&lt;br&gt;
For example: Our mainstream communication system is Discord, if a developer has a doubt, we create a thread and make conversations until his problems are solved.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does non-verbal conversations reduces cognitive potential?
&lt;/h3&gt;

&lt;p&gt;Shout-out to &lt;a href="https://twitter.com/samsantosb"&gt;Sam&lt;/a&gt; for bringing this issue to the table.&lt;br&gt;
It actually does reduces cognitive potential, and that is why we need to understand that there are moments that we need to have meetings. &lt;br&gt;
Those moments are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new member enters the team – if he knows nothing about your company, you are obligated to introduce him to how things work at your environment;&lt;/li&gt;
&lt;li&gt;Kickoff meetings – the initial thoughts of a project are the ones that carves how it will be in the future, so you need to humanize the decision making and Search &amp;amp; Discover process so everyone can get to know which problems are we going to face;&lt;/li&gt;
&lt;li&gt;1v1 meetings – you must understand that each people had different mentalities and different approaches to daily problems, and this also implies in the way they are going to solve your problems. So, if you like things the way I do, solving problems via text, running off of meetings, you must open an exception to your colleague that is having trouble with its tasks.&lt;/li&gt;
&lt;li&gt;Personal issues – the best part of a blazing fast company must be its humanity. If one of your team workers are having personal issues or difficulties to perform their work, take a bit of your time to understand why are things hard to them. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conversation at Discord&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg5ghmccwt8eceyl1qwy7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg5ghmccwt8eceyl1qwy7.png" alt="Discord conversation" width="768" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Documentation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsb6gxhb8jfb9dialog4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsb6gxhb8jfb9dialog4d.png" alt="Docuentation" width="800" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final considerations
&lt;/h2&gt;

&lt;p&gt;After all, you need to find which way do your processes work better. &lt;br&gt;
Maybe depending less on people is one of them.&lt;br&gt;
&lt;a href="https://sibelius.github.io/zettelkasten/do-not-answer-twice"&gt;Do not answer twice&lt;/a&gt; and make sure your teams have the knowledge to take their own decisions. When you depends less on other people to solve your problems, you become more valuable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sig is a blazing fast startup, but it does not imply that we are not humans.
&lt;/h3&gt;




&lt;p&gt;Sig Coding&lt;br&gt;
&lt;a href="https://sigcoding.com/about-us"&gt;Sig&lt;/a&gt; is a community-first DAO startup that produces SaaS applications powered by its &lt;a href="https://discord.gg/k7tKxaHZBu"&gt;own community&lt;/a&gt;. We spend time thinking on how to make things better and how to make tech be more &lt;a href="https://sigcoding.com/sig-gamba"&gt;environment-friendly&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>sig</category>
      <category>scrum</category>
      <category>kanbam</category>
      <category>development</category>
    </item>
  </channel>
</rss>
