<?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: Nicolas Leal</title>
    <description>The latest articles on Forem by Nicolas Leal (@nicolasleal570).</description>
    <link>https://forem.com/nicolasleal570</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%2F366463%2F89b2b899-8adc-44fa-9b4d-52e2c846c924.jpg</url>
      <title>Forem: Nicolas Leal</title>
      <link>https://forem.com/nicolasleal570</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nicolasleal570"/>
    <language>en</language>
    <item>
      <title>Digesto: A Lightning-Fast Way to Build Backends with YAML</title>
      <dc:creator>Nicolas Leal</dc:creator>
      <pubDate>Thu, 09 Jan 2025 12:00:00 +0000</pubDate>
      <link>https://forem.com/nicolasleal570/digesto-a-lightning-fast-way-to-build-backends-with-yaml-3bob</link>
      <guid>https://forem.com/nicolasleal570/digesto-a-lightning-fast-way-to-build-backends-with-yaml-3bob</guid>
      <description>&lt;p&gt;I’ve been there—spending hours setting up a backend when all I wanted was to focus on the frontend. Enter &lt;strong&gt;Digesto&lt;/strong&gt;, a tool that lets you define your data model in a YAML file and watch as it does the heavy lifting, spinning up a backend for you. &lt;/p&gt;

&lt;p&gt;Let’s explore how this experimental Node.js library simplifies backend development for frontend devs like you. You can find the project on GitHub at &lt;a href="https://github.com/nicolasleal570/digesto" rel="noopener noreferrer"&gt;Digesto&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Digesto?
&lt;/h2&gt;

&lt;p&gt;At its core, &lt;strong&gt;Digesto&lt;/strong&gt; is a time-saver. It’s designed for frontend developers who’d rather not wrestle with backend complexities. By writing a simple YAML file, you can auto-generate RESTful APIs for your app in just a few steps. No boilerplate, no fuss—just results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should You Care?
&lt;/h2&gt;

&lt;p&gt;Here’s the deal: Digesto takes care of the backend so you can focus on what you’re good at—creating beautiful, functional frontends. With features like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;One-Command Backend Creation:&lt;/strong&gt; Provide a YAML file, and Digesto will generate a fully functional backend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CRUD API Generation:&lt;/strong&gt; From listing to deleting records, it’s all automated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation Made Simple:&lt;/strong&gt; Add rules like &lt;code&gt;min&lt;/code&gt;, &lt;code&gt;max&lt;/code&gt;, or &lt;code&gt;required&lt;/code&gt; directly into your YAML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Readable Configurations:&lt;/strong&gt; Keep it all in one straightforward YAML file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Future-Ready Design:&lt;/strong&gt; With upcoming features like relationships and authentication, your app can grow without limitations.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Step 1: Define Your Model
&lt;/h4&gt;

&lt;p&gt;Create a YAML file in &lt;code&gt;backend/api.yml&lt;/code&gt; that describes your data. Ensure the &lt;code&gt;backend&lt;/code&gt; folder is located at the root of your project, alongside &lt;code&gt;package.json&lt;/code&gt;. This file serves as the central configuration for your backend. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;My App&lt;/span&gt;
&lt;span class="na"&gt;tables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;User&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;tableName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;users&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;int&lt;/span&gt;
        &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;generated&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;varchar&lt;/span&gt;
      &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;number&lt;/span&gt;
        &lt;span class="na"&gt;validation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;min&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2: Set Up Environment Variables
&lt;/h4&gt;

&lt;p&gt;Before running Digesto, ensure you have a &lt;code&gt;.env&lt;/code&gt; file in your project root with the following variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;DIGESTO_DATABASE_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"localhost"&lt;/span&gt;
&lt;span class="nv"&gt;DIGESTO_DATABASE_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"5432"&lt;/span&gt;
&lt;span class="nv"&gt;DIGESTO_DATABASE_USERNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"username"&lt;/span&gt;
&lt;span class="nv"&gt;DIGESTO_DATABASE_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"password"&lt;/span&gt;
&lt;span class="nv"&gt;DIGESTO_DATABASE_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"test"&lt;/span&gt;
&lt;span class="nv"&gt;DIGESTO_SERVER_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These settings configure your database connection and server. Once set up, you’re ready to launch.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Launch with a Command
&lt;/h4&gt;

&lt;p&gt;Run the CLI tool with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx digesto
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s it. Digesto sets up the database, configures the endpoints, and gives you a working backend in minutes.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: Focus on Your Frontend
&lt;/h4&gt;

&lt;p&gt;You’re now free to build your app without worrying about server-side code. Digesto handles the backend while you concentrate on crafting a stellar UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next for Digesto?
&lt;/h2&gt;

&lt;p&gt;As an experimental project, Digesto is constantly evolving. Here’s what the team has planned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Relationships Between Entities&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Authentication and Permissions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Admin Interfaces&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Database Migration Tools&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s early days, so expect some hiccups—but that’s also the exciting part. By trying it out now, you can help shape its development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Digesto is all about making backend development as painless as possible. Whether you’re prototyping or building something for production, its YAML-first approach lets you hit the ground running. If you’re a frontend developer who’s tired of spinning wheels on backend setup, give Digesto a shot. I’d love to hear your thoughts—what will you build with it?&lt;/p&gt;

</description>
      <category>api</category>
      <category>node</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
