<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Daniel Cordova - Blog</title>
    <link rel="self" type="application/atom+xml" href="https://danielcordova.me/blog/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://danielcordova.me/blog/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-28T00:00:00+00:00</updated>
    <id>https://danielcordova.me/blog/atom.xml</id>
    <entry xml:lang="en">
        <title>Replacing Systemd with OpenRC in Debian</title>
        <published>2026-06-24T00:00:00+00:00</published>
        <updated>2026-06-28T00:00:00+00:00</updated>
        
        <author>
          <name>
            Daniel Cordova
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://danielcordova.me/blog/debian-openrc/"/>
        <id>https://danielcordova.me/blog/debian-openrc/</id>
        
        <content type="html" xml:base="https://danielcordova.me/blog/debian-openrc/">&lt;h2 id=&quot;tl-dr&quot;&gt;TL;DR&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;m not a fan of &lt;strong&gt;systemd&lt;&#x2F;strong&gt; but I&#x27;m not against its use either. AKA if it works for you then it&#x27;s ok.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;My case&lt;&#x2F;em&gt; though is more of a mix between &lt;strong&gt;curiosity and discomfort&lt;&#x2F;strong&gt;. &lt;em&gt;Curiosity&lt;&#x2F;em&gt; of how init systems works and &lt;em&gt;discomfort&lt;&#x2F;em&gt; of how &lt;em&gt;systemd&lt;&#x2F;em&gt; integrates things or new features.I&#x27;m aware that it works well for most of its use cases (I&#x27;ve been using it since its early days) and also I agree that &lt;em&gt;systemd&lt;&#x2F;em&gt; breaks all &lt;strong&gt;KISS&lt;&#x2F;strong&gt; philosphy principles, but other projects do it as well, right?&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;So why the discomfort?&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Well it began a while ago, when I was reading some news of how the project started to grab more and more responsibilities that belongs to other projects and how some &lt;strong&gt;prod deployments&lt;&#x2F;strong&gt; failed so bad because of a breaking change that could&#x27;ve been prevented if that responsibility wasn&#x27;t part of &lt;em&gt;systemd&lt;&#x2F;em&gt;. Nothing too worrying for me though, in any case the first real kick of discomfort came when &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;BryanLunduke&#x2F;DoesItAgeVerify&quot;&gt;&lt;strong&gt;age verification law&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; was cooking and my innocent thought was &lt;code&gt;Ok, Windows and Mac will integrate it, but Linux and other OpenSource OSs and projects will &quot;fight&quot; against this ridiculous law!!&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Then my next thought was &lt;code&gt;Wait what?, the law is not even approved on some states&#x2F;countries and systemd already integrated it, why?, what happened with the usual &quot;fight&quot; against non-sense laws?&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;I got pretty mad about it, I know, I&#x27;m not a contributor of that project and &lt;em&gt;it&#x27;s only an optional field&lt;&#x2F;em&gt; but &lt;strong&gt;it didn&#x27;t feel right at all&lt;&#x2F;strong&gt;. All the hate that the dev got wasn&#x27;t right either.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Then the second kick of discomfort came while I was reading tech news and I found this one &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.muylinux.com&#x2F;2026&#x2F;06&#x2F;22&#x2F;systemd-261&#x2F;&quot;&gt;systemd integrates sys-install&lt;&#x2F;a&gt; &lt;code&gt;systemd integrates it&#x27;s own &quot;system installer&quot; called &#x27;systemd-sysinstall&#x27; among other things&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;All right, one thing is to have tons of responsibilities for an init system. But another one is going from being PID 1 to being the sys installer too, and no matter how you want to sell that idea there&#x27;s an ocean of difference on what you can call &lt;strong&gt;&quot;Init system responsibilities&quot;&lt;&#x2F;strong&gt; and &lt;strong&gt;&quot;Systemd&#x27;s weird responsibilities and wishes&quot;&lt;&#x2F;strong&gt;. So the &lt;strong&gt;curiosity&lt;&#x2F;strong&gt; entered the game and decided to try to install &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;OpenRC&quot;&gt;&lt;strong&gt;OpenRC&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; on my &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;linux-x13s-snapdragon&#x2F;&quot;&gt;&lt;em&gt;Thinkpad X13s Snapdragon&lt;&#x2F;em&gt;&lt;&#x2F;a&gt; which I use for home hacking, testing stuff, etc. Laptop is running &lt;strong&gt;Debian&lt;&#x2F;strong&gt; BTW.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h2&gt;
&lt;p&gt;Installing &lt;strong&gt;OpenRC&lt;&#x2F;strong&gt; in &lt;strong&gt;Debian Testing&lt;&#x2F;strong&gt; is not hard but isn&#x27;t a trivial operation either. I faced a few challenges and issues regarding to how apt-get and apt works with &lt;strong&gt;essential packages&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;challenges&quot;&gt;Challenges&lt;&#x2F;h3&gt;
&lt;p&gt;I faced two major challenges while trying to install &lt;em&gt;OpenRC&lt;&#x2F;em&gt; at the same time as uninstalling &lt;em&gt;Systemd&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;apt-get&lt;&#x2F;em&gt; can&#x27;t uninstall &lt;em&gt;systemd&lt;&#x2F;em&gt; at all and only errors out that is not possible&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;apt&lt;&#x2F;em&gt; shows a better error of why it can&#x27;t uninstall systemd&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;After digging a bit about it and reading a few pages on the internet, I learned that i need to pass an argument to &lt;strong&gt;apt&lt;&#x2F;strong&gt; thus it can uninstall an &lt;strong&gt;essential&lt;&#x2F;strong&gt; package. So for uninstalling it&#x27;ll be something like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; apt purge --allow-remove-essential systemd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don&#x27;t copy and paste it yet.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Before deleting &lt;em&gt;systemd&lt;&#x2F;em&gt;, need to be sure that &lt;em&gt;OpenRC&lt;&#x2F;em&gt; will be installed, to so the command will be&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; apt purge --allow-remove-essential systemd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; apt install openrc sysvinit-core&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;That command will uninstall systemd and install some dependencies that might not be needed in the future.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;issues&quot;&gt;Issues&lt;&#x2F;h3&gt;
&lt;p&gt;After installing &lt;em&gt;OpenRC&lt;&#x2F;em&gt; and uninstalling &lt;em&gt;systemd&lt;&#x2F;em&gt;, system didn&#x27;t boot properly, so I had to go to &lt;strong&gt;recovery mode&lt;&#x2F;strong&gt; and hit &lt;strong&gt;Ctrl-D&lt;&#x2F;strong&gt; to allow me to fix the error.&lt;&#x2F;p&gt;
&lt;p&gt;Issue itself was that while uninstalling &lt;em&gt;systemd&lt;&#x2F;em&gt; somehow &lt;em&gt;OpenRC&lt;&#x2F;em&gt; was removed too or not installed at all. So I went to &lt;em&gt;recovery mode&lt;&#x2F;em&gt;, then I connected to my wifi network and installed &lt;em&gt;OpenRC&lt;&#x2F;em&gt; again with &lt;code&gt;apt install openrc sysvinit-core&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;So far so good. But neither &lt;strong&gt;Battery Status nor Audio&lt;&#x2F;strong&gt; worked. I knew that &lt;em&gt;battery status&lt;&#x2F;em&gt; was due to the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;lwn.net&#x2F;ml&#x2F;linux-kernel&#x2F;20240115135249.296822-1-arnaud.pouliquen@foss.st.com&#x2F;&quot;&gt;kernel&#x27;s regression&lt;&#x2F;a&gt; I faced while installing &lt;strong&gt;Debian Testing&lt;&#x2F;strong&gt; on the laptop. So I converted my &lt;em&gt;systemd&lt;&#x2F;em&gt; service to a script and put it in &lt;code&gt;&#x2F;etc&#x2F;init.d&#x2F;&lt;&#x2F;code&gt;, thus &lt;em&gt;OpenRC&lt;&#x2F;em&gt; can start it or enable it. It worked. I think audio needs a different service related to pipewire and wireplumber, or to launch them on login. I&#x27;ll test them later on.&lt;&#x2F;p&gt;
&lt;p&gt;Systemd Service:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;Unit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Description&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; Qualcomm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; remoteprocs&lt;&#x2F;span&gt;&lt;span&gt; (SLPI&#x2F;ADSP&#x2F;CDSP)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DefaultDependencies&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;no&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;After&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;initrd-root-fs.target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; local-fs.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Before&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;sysinit.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;Service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;oneshot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RemainAfterExit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ExecStart&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; -c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;echo start &amp;gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc0&#x2F;state; echo start &amp;gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc1&#x2F;state; echo start &amp;gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc2&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;Install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;WantedBy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;sysinit.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;OpenRC Script&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;#!&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc0&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc1&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc2&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;I need to convert it into a proper &lt;strong&gt;OpenRC&lt;&#x2F;strong&gt; script&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;future&quot;&gt;Future&lt;&#x2F;h2&gt;
&lt;p&gt;Currently &lt;strong&gt;OpenRC&lt;&#x2F;strong&gt; does the work. I&#x27;m not sure if it&#x27;ll be my default &lt;strong&gt;Init system&lt;&#x2F;strong&gt; for the comming ages, but I feel that my experiment was successful.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ll continue testing &lt;strong&gt;OpenRC&lt;&#x2F;strong&gt; on my &lt;em&gt;&quot;Home Hacking Laptop&quot;&lt;&#x2F;em&gt; for the next days, maybe weeks, and if I feel comfortable enough I&#x27;ll migrate my work laptop (which runs Debian Testing too and has the same dotfiles in it) to &lt;strong&gt;OpenRC&lt;&#x2F;strong&gt; as well.&lt;&#x2F;p&gt;
&lt;p&gt;Even though changing &lt;em&gt;Init System&lt;&#x2F;em&gt; on a working &lt;strong&gt;Linux&lt;&#x2F;strong&gt; installation has its quirks and challenges and might not be the best idea, I&#x27;m happy with my current results.&lt;&#x2F;p&gt;
&lt;p&gt;If this works for you too, then I&#x27;ll be happier to know that you&#x27;re ditching &lt;em&gt;systemd&lt;&#x2F;em&gt; in favor of &lt;em&gt;OpenRC&lt;&#x2F;em&gt; as well, &lt;em&gt;aside from jokes&lt;&#x2F;em&gt;, in the end that&#x27;s part of the unix freedom &lt;strong&gt;to use whatever you want and whatever works for you.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Happy Hacking!!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;links&quot;&gt;Links&lt;&#x2F;h2&gt;
&lt;p&gt;Some links if you&#x27;re interested in &lt;strong&gt;OpenRC&lt;&#x2F;strong&gt; too&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;lecorbeausvault.wordpress.com&#x2F;2022&#x2F;02&#x2F;07&#x2F;debian-switching-init-system-easily-openrc-sysvinit-runit&#x2F;&quot;&gt;Debian: Switching Init System Easily (OpenRC, Sysvinit, Runit)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;linux-digest.com&#x2F;beyond-systemd-a-technical-deep-dive-into-openrc-for-modern-linux-systems&quot;&gt;Beyond systemd: A Technical Deep Dive into OpenRC for Modern Linux Systems&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.foxipex.com&#x2F;2024&#x2F;11&#x2F;15&#x2F;introduction-to-openrc-managing-services-with-ease&#x2F;&quot;&gt;Introduction to OpenRC: Managing Services with Ease&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;members.loria.fr&#x2F;EJeandel&#x2F;posts&#x2F;openrc&#x2F;&quot;&gt;OpenRC on debian&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Lessons learned from a SQLite to MariaDB migration</title>
        <published>2026-05-21T00:00:00+00:00</published>
        <updated>2026-05-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            Daniel Cordova
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://danielcordova.me/blog/sqlite-to-mariadb-migration/"/>
        <id>https://danielcordova.me/blog/sqlite-to-mariadb-migration/</id>
        
        <content type="html" xml:base="https://danielcordova.me/blog/sqlite-to-mariadb-migration/">&lt;p&gt;I started a while ago a small app called &lt;strong&gt;Anicap&lt;&#x2F;strong&gt; for saving which animes and series I was watching at that time. Sadly I forgot to work on it for quite long time. Last year I resumed the work on it, added a frontend built on VueJS, improved REST API, etc. Until I found myself in a crossroad by using SQLite.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;problem&quot;&gt;Problem&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;idea&quot;&gt;Idea&lt;&#x2F;h3&gt;
&lt;p&gt;I wanted to add types and categories to a serie to help me search by them, aka types (anime, ova, movie, etc), categories (sci-fi, horror, comedy, etc). Something Like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Name: The wheel of time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type: Serie&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Categories: Fantasy, Drama, Action&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;tracing-cause&quot;&gt;Tracing cause&lt;&#x2F;h3&gt;
&lt;p&gt;After adding a section for types and categories, I found myself fighting with my own lazyness to not doing third tables to add those types and categories to a serie&#x2F;anime, meaning doing a many to many relation. Thus I wanted to add only a column on &lt;em&gt;serie&lt;&#x2F;em&gt; table to add an array of &lt;em&gt;categoriesIds&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The problem is that SQLite doesn&#x27;t support arrays as data type for columns. So I decided to migrate the entire app to MariaDB.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;solution&quot;&gt;Solution&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Anicap&lt;&#x2F;strong&gt; uses &lt;em&gt;diesel&lt;&#x2F;em&gt; as ORM for mapping objects to SQL queries which allows to change between SQLite, MariaDB&#x2F;MySQL, PostgreSQL with relative ease.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;update-depencendy-to-use-mariabd&quot;&gt;Update depencendy to use MariaBD&lt;&#x2F;h3&gt;
&lt;p&gt;Inside &lt;code&gt;Cargo.toml&lt;&#x2F;code&gt; diesel dependency must be updated from this &lt;code&gt;diesel = { version = &quot;2.3.9&quot;, features = [&quot;sqlite&quot;, &quot;r2d2&quot;, &quot;chrono&quot;] }&lt;&#x2F;code&gt; to this &lt;code&gt;diesel = { version = &quot;2.3.9&quot;, features = [&quot;mysql&quot;, &quot;r2d2&quot;, &quot;chrono&quot;] }&lt;&#x2F;code&gt; thus all code references to SQLite will be unavailable and MySQL ones becomes available.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;update-pool&quot;&gt;Update Pool&lt;&#x2F;h3&gt;
&lt;p&gt;After update depndency I needed to change &lt;code&gt;database_utils.rs&lt;&#x2F;code&gt; to update &lt;code&gt;pub type SqlConnection&lt;&#x2F;code&gt; to MariaDB, this&lt;code&gt;SqlPool&lt;&#x2F;code&gt; can use the new database&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; diesel&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;mysql&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Mysql&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; MysqlConnection&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SqlConnection&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; MysqlConnection&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Basically that was the necessary changes to make the app usable with a diff DB.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;issues-found&quot;&gt;Issues found&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;In a utopian world that should be it. But in our world shit happens.&lt;&#x2F;strong&gt; So here&#x27;s a list of the problems I faced while updating the Database&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Didn&#x27;t want to force users to run schema init from SQL scripts
&lt;ul&gt;
&lt;li&gt;I improved my &lt;code&gt;migrator.rs&lt;&#x2F;code&gt; to add a function called &lt;code&gt;initialize_database&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Previous versions ran migrations all the time by checking them if exist or not on DB.
&lt;ul&gt;
&lt;li&gt;That wasn&#x27;t the best approach and after adding &lt;code&gt;initialize_database&lt;&#x2F;code&gt; I had to add a way of handling those operations. Now app receive arguments to init or migrate&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;No good way of having a working instance of &lt;em&gt;MariaDB&lt;&#x2F;em&gt;
&lt;ul&gt;
&lt;li&gt;Added a &lt;code&gt;docker-compose.yml&lt;&#x2F;code&gt; to initialize &lt;em&gt;MariaDB&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;My &lt;code&gt;schema.sql&lt;&#x2F;code&gt; script had a quite horrible problem that SQLite just allow it
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;app_user&lt;&#x2F;code&gt; table had id as &lt;strong&gt;INT AUTO_INCREMENT&lt;&#x2F;strong&gt; and &lt;code&gt;serie&lt;&#x2F;code&gt; table had &lt;em&gt;user_id&lt;&#x2F;em&gt; releation as &lt;strong&gt;SMALLINT&lt;&#x2F;strong&gt;. Somehow SQLite allow this relation. But MariaDB didn&#x27;t, I spent like 3 crazy hours looking at a couple of tables not knowing what was it until I found some message on stackoverflow related to issues with diff types on relations.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;note&quot;&gt;Note&lt;&#x2F;h3&gt;
&lt;p&gt;On a side note no app can be executed with arguments&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;anicap&lt;&#x2F;span&gt;&lt;span&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; just runs backend&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;anicap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; init&lt;&#x2F;span&gt;&lt;span&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; initialize DB schema on a Database&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;anicap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; migrate&lt;&#x2F;span&gt;&lt;span&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; look for all migrations and run them if DB is outdated.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;anicap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; -h&lt;&#x2F;span&gt;&lt;span&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; print help menu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;anicap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; --help&lt;&#x2F;span&gt;&lt;span&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; print help menu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;Even when that &lt;strong&gt;SMALLINT -&amp;gt; INT&lt;&#x2F;strong&gt; SQL problem gave me a 3 hours headache it was a fun exercise to do the migration from SQLite to MariaDB on a working app, and now it feels like the app starts to be more like a good portfolio app rather than a forgotten toy.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Install Linux on a Thinkpad X13s Snapdragon</title>
        <published>2026-05-10T00:00:00+00:00</published>
        <updated>2026-05-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            Daniel Cordova
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://danielcordova.me/blog/linux-x13s-snapdragon/"/>
        <id>https://danielcordova.me/blog/linux-x13s-snapdragon/</id>
        
        <content type="html" xml:base="https://danielcordova.me/blog/linux-x13s-snapdragon/">&lt;h2 id=&quot;quick-intro&quot;&gt;Quick Intro&lt;&#x2F;h2&gt;
&lt;p&gt;My previous laptop got damaged after a couple of years of normal usage, to be exact after 4 years. I had an ASUS ROG G14 AMD in 2020 and GPU got fried, then I bought an ASUS ROG Zephyrus M15 in 2021 and last summer its display started to fail, replacement was kinda expensive for that model, becuase it&#x27;s a 240hz display. So I was looking to buy either a Slimbook or a Tuxedo because they are Linux compatible and they support FOSS projects. But in the end I decided to go with the brand I always wanted a &lt;strong&gt;Thinkpad&lt;&#x2F;strong&gt;. So I bought a Lenovo &lt;em&gt;Thinkpad P14s Gen 6 AMD&lt;&#x2F;em&gt;, it&#x27;s a small monster, way too powerfull and nice, I use it as my main machine though.&lt;&#x2F;p&gt;
&lt;p&gt;But having a &lt;em&gt;Thinkpad&lt;&#x2F;em&gt; is like an addiction you want more. I was looking on &lt;em&gt;eBay&lt;&#x2F;em&gt; and other stores for a &lt;strong&gt;Home Hacking Laptop&lt;&#x2F;strong&gt; specifically for one of the Thinkpads I ever wanted &lt;strong&gt;X230&lt;&#x2F;strong&gt; or &lt;strong&gt;X61&#x2F;X61s&lt;&#x2F;strong&gt;, sadly didn&#x27;t found a &lt;em&gt;X61&#x2F;X61s&lt;&#x2F;em&gt;, I found a &lt;em&gt;X230&lt;&#x2F;em&gt; with Libreboot 512 GB of SSD and 16Gb of ram for about $180. But during my small adeventure inside &lt;em&gt;eBay&lt;&#x2F;em&gt; pages I found this lovely piece of technology an &lt;strong&gt;ARM&lt;&#x2F;strong&gt; Thinkpad for $280 it wasn&#x27;t cheap but it clicked really fast, an &lt;em&gt;ARM&lt;&#x2F;em&gt; laptop, it&#x27;s a &lt;em&gt;Thinkpad&lt;&#x2F;em&gt; and it&#x27;s not expensive as &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.lenovo.com&#x2F;us&#x2F;en&#x2F;p&#x2F;laptops&#x2F;thinkpad&#x2F;thinkpadt&#x2F;lenovo-thinkpad-t14s-gen-6-14-inch-snapdragon&#x2F;len101t0099&quot;&gt;&lt;em&gt;T14s Gen 6 ARM Snapdragon X Elite&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;. So I decided to go with it becuase my other &lt;em&gt;ARM&lt;&#x2F;em&gt; option was the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;argon40.com&#x2F;products&#x2F;argon-one-up-cm5-laptop-core-system&quot;&gt;&lt;em&gt;Argon One Up Laptop&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;, but it&#x27;s quite expensive for a &lt;em&gt;Home Hacking Laptop&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I dig a bit on the internet to check if it&#x27;s possible to install linux in it, I didn&#x27;t care if it&#x27;s easy or not, just if it&#x27;s possible, and I found some guides for Ubuntu, openSUSE, Debian, Gentoo, NixOS and ArchLinux, didn&#x27;t found for FreeBSD though.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specs&quot;&gt;Specs&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.lenovo.com&#x2F;us&#x2F;en&#x2F;p&#x2F;laptops&#x2F;thinkpad&#x2F;thinkpadx&#x2F;thinkpad--x13s-(13-inch-snapdragon)&#x2F;len101t0019&quot;&gt;&lt;strong&gt;Thinkpad X13s Snapdargon&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; has the following specs&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Display: 13&quot;&lt;&#x2F;li&gt;
&lt;li&gt;Touchscreen: Yes&lt;&#x2F;li&gt;
&lt;li&gt;CPU: Qualcomm Snapdragon 8cx Gen 3 (8) @ 3.00 GHz&lt;&#x2F;li&gt;
&lt;li&gt;GPU: Qualcomm Turnip Adreno (TM) 690&lt;&#x2F;li&gt;
&lt;li&gt;RAM: 16 GB&lt;&#x2F;li&gt;
&lt;li&gt;SSD: 512 GB&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h2&gt;
&lt;p&gt;Most of the guides if not all of them mention that you need to keep windows in the smallest partition possible because of a &lt;strong&gt;DTB&lt;&#x2F;strong&gt; file that it&#x27;s necessary to make it possible to boot Linux.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;installation-steps&quot;&gt;Installation Steps&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Download &lt;code&gt;sc8280xp-lenovo-thinkpad-x13s.dtb&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Boot Ubuntu live or openSuSe live for ARM&lt;&#x2F;li&gt;
&lt;li&gt;Probably you need this kernel params at boot, so edit on grub and continue booting &lt;code&gt;arm64.nopauth clk_ignore_unused pd_ignore_unused&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Remove all partitions&lt;&#x2F;li&gt;
&lt;li&gt;Create a new partition table&lt;&#x2F;li&gt;
&lt;li&gt;Add a bootable partition any size&lt;&#x2F;li&gt;
&lt;li&gt;Copy &lt;code&gt;sc8280xp-lenovo-thinkpad-x13s.dtb&lt;&#x2F;code&gt; to bootable partition&lt;&#x2F;li&gt;
&lt;li&gt;Boot Debian for ARM, use same params at boot time &lt;code&gt;arm64.nopauth clk_ignore_unused pd_ignore_unused&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Install debian as you wish, you can remove bootable partition with &lt;code&gt;dtb&lt;&#x2F;code&gt; file&lt;&#x2F;li&gt;
&lt;li&gt;Don&#x27;t finish installation (otherwise it won&#x27;t boot becuase there&#x27;s no &lt;code&gt;dtb&lt;&#x2F;code&gt; file)&lt;&#x2F;li&gt;
&lt;li&gt;Press Ctrl-Alt-F2 and follow debian instructions to add some software&lt;&#x2F;li&gt;
&lt;li&gt;Copy &lt;code&gt;sc8280xp-lenovo-thinkpad-x13s.dtb&lt;&#x2F;code&gt; to your boot partition&lt;&#x2F;li&gt;
&lt;li&gt;Press Ctrl-Alt-F1 to go back to installation screen&lt;&#x2F;li&gt;
&lt;li&gt;Press Continue to Reboot&lt;&#x2F;li&gt;
&lt;li&gt;Enjoy!&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;notes-related-to-installation&quot;&gt;Notes related to installation&lt;&#x2F;h3&gt;
&lt;p&gt;Somehow Ubuntu and openSuSe boot and audio and battery works properly during live session, but after installation there&#x27;s no audio nor battery information, this applies to Debian as well.
It seems like it&#x27;s a kernel &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;lwn.net&#x2F;ml&#x2F;linux-kernel&#x2F;20240115135249.296822-1-arnaud.pouliquen@foss.st.com&#x2F;&quot;&gt;&lt;strong&gt;regression&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; that makes &lt;code&gt;&#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc0&#x2F;state&lt;&#x2F;code&gt; not updatable at boot time, thus no audio and no battery information.
Luckily the solution is quite easy, run the following as root:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc0&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc1&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc2&#x2F;state&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It&#x27;s necessary to run this all the time after boot, so it can be a &lt;del&gt;systemd&lt;&#x2F;del&gt; service. Here&#x27;s the sample for that service&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;Unit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Description&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; Qualcomm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; remoteprocs&lt;&#x2F;span&gt;&lt;span&gt; (SLPI&#x2F;ADSP&#x2F;CDSP)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DefaultDependencies&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;no&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;After&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;initrd-root-fs.target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; local-fs.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Before&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;sysinit.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;Service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;oneshot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RemainAfterExit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ExecStart&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; -c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;echo start &amp;gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc0&#x2F;state; echo start &amp;gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc1&#x2F;state; echo start &amp;gt; &#x2F;sys&#x2F;class&#x2F;remoteproc&#x2F;remoteproc2&#x2F;state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;Install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;WantedBy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;sysinit.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Save the new service as &lt;code&gt;x13s-remoteprocs.service&lt;&#x2F;code&gt; and copy it to &lt;code&gt;&#x2F;etc&#x2F;systemd&#x2F;system&#x2F;&lt;&#x2F;code&gt;, then do a &lt;code&gt;sudo systemctl enable x13s-remoteprocs.service&lt;&#x2F;code&gt;.
Now audio and battery should work properly&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;&lt;strong&gt;Don&#x27;t forget to copy &lt;code&gt;dtb&lt;&#x2F;code&gt; file otherwise debian won&#x27;t boot and it&#x27;ll be necessary to boot from Ubuntu to copy it again&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;My installation wasn&#x27;t with Swap partition but with Swap file, you can do it with the following steps&lt;&#x2F;p&gt;
&lt;p&gt;Create a file with your desired size&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; fallocate -l 16G &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Give proper permissions to it&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt; 600&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Format to make it usable for Swap&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; mkswap &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable it as Swap for current session&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt; swapon &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To make swapfile permanent it should be placed on &lt;code&gt;&#x2F;etc&#x2F;fstab&lt;&#x2F;code&gt;, it&#x27;ll be like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;# &amp;lt;file system&amp;gt;                                 &amp;lt;mount point&amp;gt;   &amp;lt;type&amp;gt;          &amp;lt;options&amp;gt;                     &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UUID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;705b4fc2-ec70-4318-858f-64b81865aa00&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;       &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;               ext4    noatime,nodiratime,errors=remount-ro&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt;    0       1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UUID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;34e933cc-7b2d-48cd-95fd-93c7b6f0a9a9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;       &#x2F;boot&#x2F;efi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;       vfat    umask=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt;0077                              0       1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UUID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;8b983b7f-88e9-4dab-b2cd-55f0e1b0b838&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;       &#x2F;home&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;           ext4    noatime,nodiratime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt;                      0       2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;# Add Swapfile to your fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;&#x2F;swapfile&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;                                       none            swap    sw&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt;                                      0       0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Check this guide for better explanation &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-add-swap-space-on-debian-11&quot;&gt;Swapfile on Debian&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;what-works&quot;&gt;What works&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Display&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Touchscreen&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Keyboard&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Trackpad and Trackpoint&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Bluetooth&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Wifi&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Audio speakers&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Audio via jack 3.5mm&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Audio via bluetooth&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Audio via USB-C - HDMI (aka you can see a video on tv but audio come out from laptop)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Battery information&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Camera (seems like it needs a patch, don&#x27;t need it for home hacking though)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
HUB USB-C with HDMI and Power&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
HDMI Monitor&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Sensors Read (SSD Temp, CPU Temp, etc)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;screenshots&quot;&gt;Screenshots&lt;&#x2F;h2&gt;
&lt;p&gt;Debian with XFCE showing desktop


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Debian Xfce&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;thinkpad-x13s.bb66e94570e46a96.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;p&gt;Terminal screenshot with Btop and Fastfetch


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Debian Btop and Fastfetch&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;thinkpad-x13s-terminal.f9cfc04985b6e5a8.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;strong&gt;Thinkpad X13s ARM Snapdragon&lt;&#x2F;strong&gt; has been a lovely laptop for doing pretty much every task I wanted to do, battery last a lot (didn&#x27;t make too many tests though, but at least 5 to 6 hours). Didn&#x27;t try to do my job setup there, becuase the architecture I work on at my job is a resource eater (Something like 32gb of ram when running all tests and CPU cores to the top when compiling).&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m really happy with my decision, working on an &lt;em&gt;ARM&lt;&#x2F;em&gt; Laptop is quite a journey and  I&#x27;ll continue doing some tests and developing some stuff in it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;related-guides&quot;&gt;Related guides&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ab.sleepymonkey.uk&#x2F;blog&#x2F;tinkpadx13s&#x2F;&quot;&gt;Absolute Beginer - Thinkpad X13s&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ahoneybun.net&#x2F;posts&#x2F;thinkpad-x13s-review&#x2F;&quot;&gt;A review of the Thinkpad X13s with Ubuntu Linux&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.debian.org&#x2F;InstallingDebianOn&#x2F;Thinkpad&#x2F;X13s&quot;&gt;Thinkdpad X13s - Debian&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.opensuse.org&#x2F;HCL:ThinkpadX13s&quot;&gt;Thinkdpad X13s - openSuSe&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;fedoraproject.org&#x2F;wiki&#x2F;Thinkpad_X13s&quot;&gt;Thinkdpad X13s - Fedora&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>My Journey to Fullstack Dev</title>
        <published>2025-08-12T00:00:00+00:00</published>
        <updated>2025-08-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            Daniel Cordova
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://danielcordova.me/blog/fullstack-dev/"/>
        <id>https://danielcordova.me/blog/fullstack-dev/</id>
        
        <content type="html" xml:base="https://danielcordova.me/blog/fullstack-dev/">&lt;p&gt;I&#x27;ve decided a few weeks ago to invest some time on learning new things, work on some tools that I wanted to build for quite a long time but never gave them the proper time to do it. So I started with an app that I wanted to write a while ago but never started with it, because I didn&#x27;t have time, I didn&#x27;t have a VPS to host it, and specially I didn&#x27;t have a strong commitment to work on it.&lt;&#x2F;p&gt;
&lt;p&gt;The app is a very simple application to handle series that I&#x27;m currently watching or wish to watch, since always my main workflow for this puny task a spreadsheet in Libreoffice Calc and lately (around 2 years) I added a Python-GTK app that I wrote en execute it from my taskbar. So it&#x27;s a chaotic way of doing things, handle a spreadsheet with series and their season, chapter and in the Python app handle those that I want to see.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-chaos&quot;&gt;The Chaos&lt;&#x2F;h2&gt;
&lt;h4 id=&quot;using-a-spreadsheet&quot;&gt;Using a spreadsheet&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Calc Spreadsheet&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-1.609a8e1e3df1a452.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;using-my-python-notes-app&quot;&gt;Using my Python Notes App&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Python GTK Notes App&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-2.167d41d20d0fa0bf.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;As I explained on my previous post about Actix Web and Swagger&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;I wanted my own app to track chapters of series, doramas and animes I watch, I know that streaming platforms has this feature integrated, but I prefer to have it completely separated since I tend change from an anime to a dorama or to a thriller or action serie from diff platforms and tracking them on one platform helps me to avoid some &lt;em&gt;zapping&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The &lt;em&gt;main motivation&lt;&#x2F;em&gt; was to have a way to track series&#x2F;animes&#x2F;doramas chapters that could be used from my laptop&#x2F;tablet&#x2F;phone, the &lt;em&gt;second motivation&lt;&#x2F;em&gt; was to learn different things from different areas and increase my dev skills (&lt;em&gt;I feel them a little bit rusty after working for some years on the same app&#x2F;solution&lt;&#x2F;em&gt;).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;technical-decision&quot;&gt;Technical decision&lt;&#x2F;h2&gt;
&lt;p&gt;My main skills are on top of JVM langs such as &lt;em&gt;Java and Kotlin&lt;&#x2F;em&gt;. So I have to say that my experience with &lt;em&gt;Frontend&lt;&#x2F;em&gt; technolgies was a startpage for my browser called &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dcdaz&#x2F;caratula&quot;&gt;&lt;strong&gt;Caratula&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; wich was badly written in &lt;em&gt;VueJS&lt;&#x2F;em&gt;, and this static site. For &lt;em&gt;Backend&lt;&#x2F;em&gt; technologies apart from JVM ones I have some experience with &lt;em&gt;Rust, Python and a little bit of C++&lt;&#x2F;em&gt; and I have some love for those languages, so the choice was almost obvious to me, &lt;strong&gt;No&lt;&#x2F;strong&gt; JVM technologies.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;C++&lt;&#x2F;strong&gt; is great but I never did a &lt;em&gt;REST&lt;&#x2F;em&gt; Api with it and I didn&#x27;t want to lose time learning a &lt;em&gt;C++ REST Framework&lt;&#x2F;em&gt; and remembering how to do things on that language. For &lt;em&gt;Rust and Python&lt;&#x2F;em&gt; I did some toy projects with &lt;em&gt;Flask, Django and Actix Web&lt;&#x2F;em&gt;, in fact the original &lt;em&gt;API&lt;&#x2F;em&gt; was written in &lt;em&gt;Python + Flask&lt;&#x2F;em&gt; around 7 years ago.&lt;&#x2F;p&gt;
&lt;p&gt;After some time thinking about &lt;strong&gt;Python + Flask&lt;&#x2F;strong&gt; or &lt;strong&gt;Rust + Actix&lt;&#x2F;strong&gt; for backend I decided to go with &lt;strong&gt;Rust&lt;&#x2F;strong&gt; considering that building the binary for a &lt;strong&gt;ARM64 VPS&lt;&#x2F;strong&gt; could be harder than deploying a &lt;strong&gt;Python&lt;&#x2F;strong&gt; app.&lt;&#x2F;p&gt;
&lt;p&gt;Then it comes the Frontend side, I never liked &lt;em&gt;React&lt;&#x2F;em&gt; but I had put it in the list of the possible technologies, so they were &lt;em&gt;VueJS, React and Svelte&lt;&#x2F;em&gt; as Frameworks and &lt;em&gt;Bulma, TailwindCSS&lt;&#x2F;em&gt; for &lt;em&gt;CSS&lt;&#x2F;em&gt;. Considering my previous &quot;experience&quot; with &lt;em&gt;VueJS&lt;&#x2F;em&gt; I decided to use it for my frontend along with &lt;em&gt;Bulma&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Strange choice &lt;strong&gt;Rust + VueJS&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;A backend dev with no knowledge on how to build frontends&#x2F;webapps&#x2F;SPAs is like an ape trying to use measuring tape&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;the-journey&quot;&gt;The Journey&lt;&#x2F;h2&gt;
&lt;p&gt;After work a few days on the backend and make a decent &lt;em&gt;API&lt;&#x2F;em&gt;, I started with frontend and it was a nice experience seeing how different parts start to fit as a one solution. I want split this journey into 6 sections that will explain how was it until now&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;fullstack-dev&#x2F;#learning-vuejs&quot;&gt;Learning VueJS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;fullstack-dev&#x2F;#learning-vue-router&quot;&gt;Learning Vue Router&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;fullstack-dev&#x2F;#learning-pinia-store&quot;&gt;Learning Pinia Store&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;fullstack-dev&#x2F;#learning-ky&quot;&gt;Learning KY&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;fullstack-dev&#x2F;#learning-typescript&quot;&gt;Learning Typescript&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;fullstack-dev&#x2F;#project-organization&quot;&gt;Project organization&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;learning-vuejs&quot;&gt;Learning VueJS&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;the-beginning&quot;&gt;The beginning&lt;&#x2F;h4&gt;
&lt;p&gt;As I said i had a teeny experience with Frontend, I wrote a few things on JS for this static site and the components for &lt;strong&gt;Caratula&lt;&#x2F;strong&gt; startpage, so the the frontend for my app started in the same way as &lt;strong&gt;Caratula&lt;&#x2F;strong&gt;. A sample of how i started&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;lt;script&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;import &lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span&gt; ref&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; }&lt;&#x2F;span&gt;&lt;span&gt; from &amp;#39;vue&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export default &lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;  setup&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    const count&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; ref&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;    &#x2F;&#x2F; expose to template and other options API hooks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    return &lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      count&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;  },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;  mounted&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    console.log(this.count) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;&#x2F;&#x2F; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;lt;&#x2F;script&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;lt;template&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;  &amp;lt;button&lt;&#x2F;span&gt;&lt;span style=&quot;background-color: #BF616A;&quot;&gt; @click=&amp;quot;count++&amp;quot;&amp;gt;{{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; count&lt;&#x2F;span&gt;&lt;span style=&quot;background-color: #BF616A;&quot;&gt; }}&amp;lt;&#x2F;button&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;background-color: #BF616A;&quot;&gt;&amp;lt;&#x2F;template&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;But something didn&#x27;t feel completely right with how script section is written, it felt confusing and disconected. In any case i was working in the login page with this kind of code until I saw a different way of write the script section wich it looked more coherent to me, so I started to use it and then things started to feel right.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;lt;script&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; setup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; variable&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;const msg = &amp;#39;Hello!&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;&#x2F; functions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function log() &lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  console&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;log&lt;&#x2F;span&gt;&lt;span&gt;(msg)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;lt;&#x2F;script&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;lt;template&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;  &amp;lt;button&lt;&#x2F;span&gt;&lt;span style=&quot;background-color: #BF616A;&quot;&gt; @click=&amp;quot;log&amp;quot;&amp;gt;{{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; msg&lt;&#x2F;span&gt;&lt;span style=&quot;background-color: #BF616A;&quot;&gt; }}&amp;lt;&#x2F;button&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;background-color: #BF616A;&quot;&gt;&amp;lt;&#x2F;template&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;script setup&amp;gt;&lt;&#x2F;code&gt; is a blessing to someone who understands only backends.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h4 id=&quot;reactivity-and-other-quirks&quot;&gt;Reactivity and other Quirks&lt;&#x2F;h4&gt;
&lt;p&gt;Understand &lt;em&gt;r&lt;&#x2F;em&gt;ef and reactive** and how they can hold value from a html tag and&#x2F;or update it was a challenge to me, because i couldn&#x27;t connect the idea in my head. But once I understood it, evertyhing was way easier specially handle the data I got from &lt;em&gt;API&lt;&#x2F;em&gt; and show it on web browser.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;onMounted&lt;&#x2F;strong&gt; was a super easy concept to understand what it does and how to use it. About &lt;strong&gt;watch&lt;&#x2F;strong&gt;, is something that I still need to review on documentation to not forget how it works. And one thing that troubles me a lot was to pass Global variables such as backend URL, at the begining I wrote them on the &lt;code&gt;main.js&lt;&#x2F;code&gt; file but lately I learned how &lt;code&gt;.env&lt;&#x2F;code&gt;, &lt;code&gt;.env.local&lt;&#x2F;code&gt; and &lt;code&gt;.env.production.local&lt;&#x2F;code&gt; works on &lt;em&gt;VueJS&lt;&#x2F;em&gt; and it was kinda a &lt;strong&gt;Eureka&lt;&#x2F;strong&gt; feeling. I used those files on other langs&#x2F;projects such as &lt;em&gt;Python&lt;&#x2F;em&gt; but didn&#x27;t know how they work with &lt;em&gt;VueJS&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;learning-vue-router&quot;&gt;Learning Vue Router&lt;&#x2F;h3&gt;
&lt;p&gt;After having a successfull login and create the component for the &lt;code&gt;dashboard&lt;&#x2F;code&gt; I couldn&#x27;t connect the idea of go from one component to another and&#x2F;or move between screens in my frontend. The concept itself was elusive to me. A frined of mine explained a little bit how a router works and that I should search for some router for my &lt;em&gt;VueJS&lt;&#x2F;em&gt; app. Vue-Router was the solution but I had some difficulties to understand how it works until I saw it as sequence or as a &lt;strong&gt;stack&lt;&#x2F;strong&gt; of pages like:&lt;&#x2F;p&gt;
&lt;script src=&quot;https:&#x2F;&#x2F;cdn.jsdelivr.net&#x2F;npm&#x2F;mermaid@11.6.0&#x2F;dist&#x2F;mermaid.min.js&quot;&gt;&lt;&#x2F;script&gt;
&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;mermaid.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;pre class=&quot;mermaid&quot; onclick=&quot;openModal(this)&quot;&gt;
        flowchart TD
    PageA--&gt;PageB
    PageB--&gt;PageA
    PageB--&gt;PageC
    PageC--&gt;PageB
    &lt;&#x2F;pre&gt;
&lt;&#x2F;div&gt;

&lt;div id=&quot;mermaid-modal&quot; class=&quot;modal has-text-centered&quot;&gt;
  &lt;div class=&quot;modal-background&quot;&gt;&lt;&#x2F;div&gt;
  &lt;div class=&quot;modal-content&quot;&gt;
    &lt;figure id=&quot;mermaid-figure&quot; class=&quot;image is-4by3&quot;&gt;&lt;&#x2F;figure&gt;
  &lt;&#x2F;div&gt;
  &lt;button id=&quot;mermaid-close&quot; class=&quot;modal-close is-large&quot; aria-label=&quot;close&quot;&gt;&lt;&#x2F;button&gt;
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;learning-pinia-store&quot;&gt;Learning Pinia Store&lt;&#x2F;h3&gt;
&lt;p&gt;I need it a way of dealing with credentials and didn&#x27;t know how to use &lt;strong&gt;localStorage&lt;&#x2F;strong&gt; or any other storage on browser, so I looked on some places and It was obvious that hold credentials on &lt;em&gt;localStorage&lt;&#x2F;em&gt; wasn&#x27;t the best idea. &lt;em&gt;VueJS&lt;&#x2F;em&gt; fellas recommended &lt;strong&gt;Pinia&lt;&#x2F;strong&gt;, so I started with a small tutorial, eveything worked flawlesly but I had this weird behavior when I hit &lt;code&gt;F5&#x2F;Ctrl-R&lt;&#x2F;code&gt; keys and the session got lost, that thing drove me crazy for a couple of days until I understood that pinia didn&#x27;t persit data on the store. Then using a plugin for persiting data on the store was super wasy and felt it natural.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;learning-ky&quot;&gt;Learning KY&lt;&#x2F;h3&gt;
&lt;p&gt;This is a wonderfull library, I started to use with really simple calls, but recently I discover its more power with &lt;strong&gt;hooks&lt;&#x2F;strong&gt; that made a huge difference in how I deal with the call to the &lt;em&gt;API&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;learning-typescript&quot;&gt;Learning Typescript&lt;&#x2F;h3&gt;
&lt;p&gt;Javascript is kinda weird to me, it doesn&#x27;t feel like I&#x27;m writing an entire application, it feels like I&#x27;m writing some scripts for specific things&#x2F;actions. So I heard about the benefits of using Typescript and decided to convert my entire application from JS to TS. The transition was natural to me, having types for everything makes the code strong and easy to read. I can have classes and handle them as I use to in the backend. But most &lt;strong&gt;important&lt;&#x2F;strong&gt; now I feel like I&#x27;m writing an entire app and not a bunch of loose files that connects with &lt;strong&gt;magic&lt;&#x2F;strong&gt;. So Typescript was a great choice.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;project-organization&quot;&gt;Project Organization&lt;&#x2F;h3&gt;
&lt;p&gt;When the app started to grow like dashboards, adding a new serie, edit a serie, change some color, search bar, etc. I saw the need of having a good organization of my files. Having all &lt;strong&gt;Typescript&lt;&#x2F;strong&gt; code on the same &lt;code&gt;.vue&lt;&#x2F;code&gt; file didn&#x27;t feel right, so I started to &lt;strong&gt;extract&lt;&#x2F;strong&gt; code, &lt;strong&gt;split&lt;&#x2F;strong&gt; responsibilites and &lt;strong&gt;move&lt;&#x2F;strong&gt; things where I think they belong. This organization is not something that I searched on the web but it&#x27;s based on my backend experience, so it could be &lt;strong&gt;not&lt;&#x2F;strong&gt; ideal but it works. I have a files and filders &lt;em&gt;hierarchy&lt;&#x2F;em&gt; like the following:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;strong&gt;Folder&lt;&#x2F;strong&gt;&lt;&#x2F;th&gt;&lt;th&gt;&lt;strong&gt;Purpose&lt;&#x2F;strong&gt;&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;components&lt;&#x2F;td&gt;&lt;td&gt;All visual HTML components with small TS code&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;services&lt;&#x2F;td&gt;&lt;td&gt;TS files where logic and magic happens&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;utils&lt;&#x2F;td&gt;&lt;td&gt;Some stuff that doesn&#x27;t belong to a service like a theme switcher&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;router&lt;&#x2F;td&gt;&lt;td&gt;Just the router for my app and possibly other routers if need to&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;stores&lt;&#x2F;td&gt;&lt;td&gt;Just the store for my app and possibly other stores if need to&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;types&lt;&#x2F;td&gt;&lt;td&gt;Complex types similar to DTO&#x27;s on backend&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;static&lt;&#x2F;td&gt;&lt;td&gt;Custom CSS&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h2 id=&quot;screenshots&quot;&gt;Screenshots&lt;&#x2F;h2&gt;
&lt;h4 id=&quot;login-page&quot;&gt;Login page&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Login&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-3.ac0d91b57f454070.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;dashboard&quot;&gt;Dashboard&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Dashboard&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-4.786b9e64b57afe15.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;dashboard-search&quot;&gt;Dashboard Search&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Dashboard Search&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-5.be46f47d139521c2.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;serie-editor&quot;&gt;Serie Editor&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Serie Editor&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-6.6652ac7a10f6e9f4.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;new-serie&quot;&gt;New Serie&lt;&#x2F;h4&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;New Serie&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-7.11f74c48102c4ff5.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;dark-theme&quot;&gt;Dark Theme&lt;&#x2F;h4&gt;
&lt;p&gt;

&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Dark Theme&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;fullstack-journey-8.1531527fb98bc7cd.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;

&lt;br &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;You can found the code for this project on &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dcdaz&#x2F;anicap&quot;&gt;Anicap&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;Working on frontend was a nice journey to me a little bit stressful, though. That&#x27;s becuase some concepts are completely different than I thougt and also I didn&#x27;t understood some of them until I was searching on the internet how to do A or B thing in VueJS. Concepts like KY hooks, reactivity or stores were not in my mind when I was starting with this Journey.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m still considering myself as a newbie on the &lt;em&gt;frontend&lt;&#x2F;em&gt; world, but so far, I like it.&lt;&#x2F;p&gt;
&lt;p&gt;My recomendation for those &lt;strong&gt;backend devs&lt;&#x2F;strong&gt; who wants to start in the &lt;em&gt;frontend&lt;&#x2F;em&gt; world and become &lt;strong&gt;fullstack devs&lt;&#x2F;strong&gt; is to &lt;em&gt;Study about concepts of the frontend world before learning about A&#x2F;B framework or how building using npm, pnpm, yarn, etc. And when you understand about how some things work a good start is to use &lt;code&gt;AlpineJS&lt;&#x2F;code&gt; rather than complex stuff like VueJS or React&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Swagger on Actix Web</title>
        <published>2025-07-04T00:00:00+00:00</published>
        <updated>2025-07-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            Daniel Cordova
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://danielcordova.me/blog/swagger-actix-web/"/>
        <id>https://danielcordova.me/blog/swagger-actix-web/</id>
        
        <content type="html" xml:base="https://danielcordova.me/blog/swagger-actix-web/">&lt;p&gt;I&#x27;ve been toying with &lt;strong&gt;Rust&lt;&#x2F;strong&gt; for quite a few time, but never take it seriously due to several reasons such as work, work and more work and other as not having spare time to work on my own projects.&lt;&#x2F;p&gt;
&lt;p&gt;Anywway I decided to start again with &lt;strong&gt;Rust&lt;&#x2F;strong&gt; but hopefully this time more seriously than ever and started again with an old &lt;em&gt;API&lt;&#x2F;em&gt; of my own to track chapters of series and animes I watch, I know that streaming platforms has this feature integrated, but I prefer to have it completely separated since I tend change from an Isekai anime to a dorama or to a thriller or action serie from diff platforms and having them on one platform helps me to avoid some &lt;em&gt;zapping&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;So, I&#x27;ve been working on a &lt;em&gt;REST API&lt;&#x2F;em&gt; written on &lt;strong&gt;Rust&lt;&#x2F;strong&gt; with &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;actix.rs&#x2F;&quot;&gt;&lt;em&gt;Actix Web&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;, everything worked well, but I had this feelling that I need to do it right even though this project currently serves to my own needs (Hopefully it helps other fellas in the future). That&#x27;s why I wanted to add &lt;em&gt;Swagger&lt;&#x2F;em&gt; to it, and want to share my thoughts on how to implement it on a simple API.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;steps&quot;&gt;Steps&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;swagger-actix-web&#x2F;#add-dependency&quot;&gt;Add dependency&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;swagger-actix-web&#x2F;#create-configuration&quot;&gt;Create configuration&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;swagger-actix-web&#x2F;#add-swagger-to-routes&quot;&gt;Add Swagger to routes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;swagger-actix-web&#x2F;#document-endpoints&quot;&gt;Document endpoints&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;swagger-actix-web&#x2F;#add-security&quot;&gt;Add Security&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;blog&#x2F;swagger-actix-web&#x2F;#results&quot;&gt;Results&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;add-dependency&quot;&gt;Add dependency&lt;&#x2F;h2&gt;
&lt;p&gt;For adding Swagger and OpenAPI on the API, I choose &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;utoipa&quot;&gt;Utoipa&lt;&#x2F;a&gt; it has tons of documentation and there are several places to get some quick guides or tutorials like this one. There are 2 dependencies for this purpose, &lt;em&gt;Utoipa&lt;&#x2F;em&gt; itself and its &lt;em&gt;Swagger&lt;&#x2F;em&gt; implementation.&lt;&#x2F;p&gt;
&lt;p&gt;Add the following dependencies to your &lt;code&gt;Cargo.toml&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;utoipa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;5.4.0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;utoipa-swagger-ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; = {&lt;&#x2F;span&gt;&lt;span&gt; version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;9.0.2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;span&gt; features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; = [&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;actix-web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Swagger implementation for Utoipa can be used in actix, rocket, axum , etc.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;create-configuration&quot;&gt;Create configuration&lt;&#x2F;h2&gt;
&lt;p&gt;In order to have an ordered code I don&#x27;t want to add config in the same files&#x2F;modules as handlers&#x2F;controllers&#x2F;endpoints, so just create a different rust file named &lt;code&gt;openapi_config.rs&lt;&#x2F;code&gt; with the following content&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; utoipa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;OpenApi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;OpenApi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[openapi(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    paths(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Here you can add you endpoint functions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::register,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::login,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::logout,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::insert_serie,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::search_series,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::get_serie_by_id,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        controllers::update_serie,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ApiDoc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Struct that contains our open api docs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-swagger-to-routes&quot;&gt;Add Swagger to routes&lt;&#x2F;h2&gt;
&lt;p&gt;Actix web has a &lt;em&gt;configure&lt;&#x2F;em&gt; function that allows to add every route we want to be exposed on the &lt;em&gt;API&lt;&#x2F;em&gt;, this method uses a &lt;code&gt;ServiceConfig&lt;&#x2F;code&gt; struct where we can add our routes. Below there&#x27;s a sample of how to have your routes configured in your API&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;route_config.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; actix_web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;&#x2F;&#x2F; Endpoints registration config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; routes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;: &amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;ServiceConfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    use crate::&lt;&#x2F;span&gt;&lt;span&gt;controllers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        search_series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; get_serie_by_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; insert_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; login&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; logout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; register&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; update_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;    };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Config is passed from &amp;quot;configure&amp;quot; function in main.rs file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;register&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Each endpoins is a service so they&amp;#39;re added manually here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;login&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;logout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;insert_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;search_series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;get_serie_by_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;update_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;main.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;mod&lt;&#x2F;span&gt;&lt;span&gt; configuration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; configuration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;routes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[actix_web::main]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;lt;()&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;    HttpServer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        App&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;wrap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;Logger&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;default&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;configure&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;routes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Add routes functions which contiains all endpoints registered&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;    })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;bind&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;server_url&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;run&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    .await&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;So, our configuration goes into &lt;code&gt;route_config.rs&lt;&#x2F;code&gt; by adding Swagger to allowed routes, file wile be as follows&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use super::&lt;&#x2F;span&gt;&lt;span&gt;openapi_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;ApiDoc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; actix_web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; utoipa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;OpenApi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #616E88;&quot;&gt;&#x2F;&#x2F; Endpoints registration config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; routes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;: &amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;ServiceConfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    use crate::&lt;&#x2F;span&gt;&lt;span&gt;controllers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        search_series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; get_serie_by_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; insert_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; login&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; logout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; register&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; update_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;    };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    use&lt;&#x2F;span&gt;&lt;span&gt; utoipa_swagger_ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;SwaggerUi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;register&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;login&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;logout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;insert_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;search_series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;get_serie_by_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;update_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;service&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Here the new route contains swagger and openapi json file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            SwaggerUi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;swagger&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;_:.*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;                .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;url&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;api-docs&#x2F;openapi.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;span&gt; ApiDoc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;openapi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;        );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;document-endpoints&quot;&gt;Document Endpoints&lt;&#x2F;h2&gt;
&lt;p&gt;Every endpoint should contain its own documentation, so in this section there are some documentation about the basic operations&lt;&#x2F;p&gt;
&lt;h3 id=&quot;get&quot;&gt;GET&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[utoipa::path(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    get,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    path = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    tag = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    description = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Get a serie by its id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    params((&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; i16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;, description = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Id of a serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    responses(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 200, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SerieResponse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 401, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 404, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[get(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; get_serie_by_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    authenticated_request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; AuthenticatedRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;lt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;i16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,)&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;post&quot;&gt;POST&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[utoipa::path(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    post,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    path = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    tag = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    description = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Add a new serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    request_body(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        content =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SerieRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        example = json!({&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Sample Serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;season&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: 2, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;chapter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: 0, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;score&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: 0})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    ),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    responses(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 201),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 400, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 401, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[post(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; insert_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    authenticated_request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; AuthenticatedRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;SerieRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;put&quot;&gt;PUT&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[utoipa::path(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    put,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    path = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    tag = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    description= &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Update a serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    params((&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; i16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;, description = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Id of a serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    request_body(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        content =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SerieRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        example = json!({&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Sample Serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;season&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: 2, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;chapter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: 0, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;score&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;: 0})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    ),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    responses(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 204),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 400, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;        (status = 401, body =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[put(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; update_serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    authenticated_request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; AuthenticatedRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;lt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;i16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,)&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;SerieRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-security&quot;&gt;Add Security&lt;&#x2F;h2&gt;
&lt;p&gt;If our &lt;em&gt;API&lt;&#x2F;em&gt; has security, we can add it to our &lt;strong&gt;OpenAPI&lt;&#x2F;strong&gt; struct and then to our endpoints, so starting from improving our &lt;strong&gt;OpenAPI&lt;&#x2F;strong&gt; struct we need to create a new struct that will hold security features&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SecurityAddon&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; New Struct&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; Modify&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SecurityAddon&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; Implement Modify for our struct&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; modify&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;&amp;amp;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; openapi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;: &amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; utoipa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;openapi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;OpenApi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        openapi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;components&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;as_mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;add_security_scheme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;            &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;token&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; This name could be anything, will be used on API documentation.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            SecurityScheme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;Http&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                HttpBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;                    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;scheme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;utoipa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;openapi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;security&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;HttpAuthScheme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Bearer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;                    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;bearer_format&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;JWT&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;                    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;build&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;            ),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;        );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After create our &lt;em&gt;Security&lt;&#x2F;em&gt; struct we need to add it to out &lt;strong&gt;OpenAPI&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;OpenApi&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[openapi(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    paths(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::register,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::login,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::logout,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::insert_serie,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::search_series,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::get_serie_by_id,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;        crate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;::controllers::update_serie,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    ),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    modifiers(&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;SecurityAddon&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; SecurityAddon is placed here, as a modifier&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ApiDoc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now it&#x27;s the time to add authorization to our endpoint documentation, by adding &lt;code&gt;security((&quot;token&quot; = [])),&lt;&#x2F;code&gt; to &lt;strong&gt;Utoipa&lt;&#x2F;strong&gt; documentation, like the following&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[utoipa::path(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    get,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    path = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    tag = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Series&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    description = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Get a serie by its id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    params((&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; i16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;, description = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;Id of a serie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;    security((&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;token&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot; = []&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #616E88;&quot;&gt; &#x2F;&#x2F; &amp;quot;token&amp;quot; is the name we used on SecurityAddon config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt;    responses&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;        (&lt;&#x2F;span&gt;&lt;span&gt;status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt; 200&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; body&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; SerieResponse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;        (&lt;&#x2F;span&gt;&lt;span&gt;status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt; 401&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; body&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;        (&lt;&#x2F;span&gt;&lt;span&gt;status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B48EAD;&quot;&gt; 404&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; body&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; ErrorMessage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;    )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;#[get(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;&#x2F;serie&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A3BE8C;&quot;&gt;serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EBCB8B;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5E81AC;&quot;&gt;&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;pub async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88C0D0;&quot;&gt; get_serie_by_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    authenticated_request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt; AuthenticatedRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    serie_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #81A1C1;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;&amp;lt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8FBCBB;&quot;&gt;i16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;,)&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #ECEFF4;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After that you can have security added on your Swagger page&lt;&#x2F;p&gt;
&lt;h2 id=&quot;results&quot;&gt;Results&lt;&#x2F;h2&gt;
&lt;p&gt;To check our results just go to your &lt;em&gt;API&lt;&#x2F;em&gt; URL + &lt;code&gt;&#x2F;swagger&#x2F;&lt;&#x2F;code&gt;, like: &lt;code&gt;http:&#x2F;&#x2F;127.0.0.1:8085&#x2F;swagger&#x2F;&lt;&#x2F;code&gt;, you&#x27;ll see a screen similar to the following.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;swagger-screen&quot;&gt;Swagger Screen&lt;&#x2F;h3&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Swagger Screen&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;swagger-actix-1.af68644478ec5924.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;swagger-screen-get&quot;&gt;Swagger Screen GET&lt;&#x2F;h3&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Swagger Screen GET&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;swagger-actix-2.49bfd9759e95c846.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;swagger-screen-post&quot;&gt;Swagger Screen POST&lt;&#x2F;h3&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Swagger Screen POST&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;swagger-actix-3.1df7eae459110127.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;swagger-screen-put&quot;&gt;Swagger Screen PUT&lt;&#x2F;h3&gt;


&lt;script src=&quot;https:&#x2F;&#x2F;danielcordova.me&#x2F;js&#x2F;images.js&quot;&gt;&lt;&#x2F;script&gt;

&lt;div class=&quot;content has-text-centered&quot;&gt;
    &lt;img alt=&quot;Swagger Screen PUT&quot; src=&quot;https:&amp;#x2F;&amp;#x2F;danielcordova.me&amp;#x2F;processed_images&amp;#x2F;swagger-actix-4.460ea4636c286f4b.png&quot; onclick=&quot;openImage(this)&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;If you want to check source code for this you can check &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dcdaz&#x2F;anicap&quot;&gt;Anicap&lt;&#x2F;a&gt; project.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
