<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jannis</title>
    <description>The latest articles on DEV Community by Jannis (@jannisdev).</description>
    <link>https://dev.to/jannisdev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F850435%2F1dbe993a-2f85-4adf-a0dc-2ab2a89cb9d2.png</url>
      <title>DEV Community: Jannis</title>
      <link>https://dev.to/jannisdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jannisdev"/>
    <language>en</language>
    <item>
      <title>Why ChatGPT and AI is bad for new programmers</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Tue, 18 Apr 2023 06:46:21 +0000</pubDate>
      <link>https://dev.to/jannisdev/why-chatgpt-and-ai-is-bad-for-new-programmers-31ig</link>
      <guid>https://dev.to/jannisdev/why-chatgpt-and-ai-is-bad-for-new-programmers-31ig</guid>
      <description>&lt;p&gt;The year 2023 has been shaped by the release of &lt;a href="https://openai.com/blog/chatgpt"&gt;ChatGPT&lt;/a&gt;, and even today, more AI projects are released daily. Everyone who has tried some of them knows they're amazing, and you can generate content super fast and easily with them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But what if I told you it's bad for you as a new programmer learning how to code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The fact that you can easily get a working code snippet by just typing a short and simple prompt like "Write me a QR-Code generator in Python" is just mindblowing. Even tho it's mindblowing it brings up some huge concerns about the future of programming.&lt;/p&gt;

&lt;p&gt;People start to think "Why should I even consider learning programming if ChatGPT can do it for me?" and that's a problem! They don't know that programming is a lot more than just writing code because it's more about logical understanding and solving problems with the help of code. Coding itself is a very small part of the tasks programmers face.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually is ChatGPT?
&lt;/h2&gt;

&lt;p&gt;Since &lt;a href="https://openai.com/blog/chatgpt"&gt;ChatGPT&lt;/a&gt; is the most known tool out there right now, let's talk about it a bit more and what it's actually about. I'm not going extremely in-depth but as much as needed to understand my further points.&lt;/p&gt;

&lt;p&gt;First of all, what actually is ChatGPT or what's behind it? ChatGPT is, at the time of writing, based on the GPT-3.5 LLM (Large-Language-Model) for free members and on the GPT-4 LLM for paid members. Those so-called LLMs are neural networks that have been trained on a lot of text to understand its content and connections between words and sentences.&lt;/p&gt;

&lt;p&gt;Now the first problem with these LLMs mentioned above is that they are &lt;strong&gt;outdated&lt;/strong&gt;! Everything they "know" is from &lt;strong&gt;2021&lt;/strong&gt;. Since the world is changing faster than ever this is a huge downside when using such AI tools.&lt;/p&gt;

&lt;p&gt;Besides that, the information they provide is also not always 100% correct. An AI can only give you as much as it has been trained on itself. Imagination counts also for the big incapabilities of AI like ChatGPT.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why new programmers shouldn't use AI
&lt;/h2&gt;

&lt;p&gt;I'm sure there are alot of other opinions as well but I don't suggest using ChatGPT and other AI tools when getting into programming.&lt;/p&gt;

&lt;p&gt;When thinking about programmers the most of us just think about writing code all day long and that's it. But it's &lt;strong&gt;way more&lt;/strong&gt; that comes with it which is important as well. Other aspects of coding are understand &lt;em&gt;how computers and servers work, learning about cyber security, getting knowledge about infrastructure and different options to host the own applications.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;While learning how to code you will definitely get stuck on some errors and other problems. You can just ask ChatGPT and it will may or may not give you a helpful response, which seems great in the first place.&lt;/p&gt;

&lt;p&gt;But what happens, when you try to solve it by yourself, read documentations and try to understand what's going on? When trying to solve the issue you come across different sources of knowledge and everywhere you go to read something you learn something new even if it isn't specificily necessary for your problem right now but you will be grateful for it in the future when having a different problem.&lt;/p&gt;

&lt;p&gt;You won't get that bonus of "extra knowledge" when just asking ChatGPT. It even gets harder when you have absolutely no clue what your problem is all about so how are you going &lt;br&gt;
to tell ChatGPT about it if you don't know it yourself?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;ChatGPT is always only as good as the person who types in the prompt!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everything that's mentioned above is just a tiny fraction of the whole complexety and ecosystem of AI and its advantages and disadvantages.Other important parts would be copyright of the data the models are trained on or the danger of AI getting as far as being able to think and act by itself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover photo by &lt;a href="https://unsplash.com/@dkoi"&gt;D koi&lt;/a&gt; / &lt;a href="https://unsplash.com/"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Keep moving! - AquaHub #8</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Mon, 05 Dec 2022 09:28:14 +0000</pubDate>
      <link>https://dev.to/jannisdev/keep-moving-aquahub-8-243k</link>
      <guid>https://dev.to/jannisdev/keep-moving-aquahub-8-243k</guid>
      <description>&lt;p&gt;Another week has passed and I must confess that I'm late with this post again.. There's a lot of stuff going on right now and not always the time, energy and motivation to summarise the last week.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/AquaHubStudio/AquaHub/tree/dev" rel="noopener noreferrer"&gt;https://github.com/AquaHubStudio/AquaHub&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔭 User and project page&lt;/li&gt;
&lt;li&gt;✍️ Edit your project&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔭 User and project page
&lt;/h2&gt;

&lt;p&gt;My current issue I'm working is the project and user page where you can see the user and the projects of the user.&lt;br&gt;
It's not going to be perfect at the beginning but improve when the time passes.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✍️ Edit your project
&lt;/h2&gt;

&lt;p&gt;Another important part I've done the last week is the page to edit each project. Upload new project avatars and update information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fylk551erqf88p12dmvip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fylk551erqf88p12dmvip.png" alt="Project edit page preview" width="800" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Staging is live - AquaHub #7</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Sat, 26 Nov 2022 08:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/staging-is-live-aquahub-7-3n47</link>
      <guid>https://dev.to/jannisdev/staging-is-live-aquahub-7-3n47</guid>
      <description>&lt;p&gt;This week I've done one pretty important job but in the other time it was stressful in private life so no big other changes completed.&lt;/p&gt;

&lt;h2&gt;
  
  
   🚦 Staging is live
&lt;/h2&gt;

&lt;p&gt;I finally done the job of creating the necessary dockerfiles. For our backend (&lt;strong&gt;PocketBase&lt;/strong&gt;) I made a custom bash script to initialize and update everything.&lt;br&gt;
I had many and many errors I was struggling with and it's not been easy but I finally was able to complete it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The staging of AquaHub is finally live on &lt;a href="https://staging.aquahub.studio" rel="noopener noreferrer"&gt;https://staging.aquahub.studio&lt;/a&gt;!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Updates made to the &lt;code&gt;dev&lt;/code&gt; branch are automatically deployed to the staging server.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❗️ &lt;em&gt;Please keep in mind that everything's still under development so data can get lost or there can be some server interruptions.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>No grind no glory - AquaHub #6</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Sat, 19 Nov 2022 11:42:36 +0000</pubDate>
      <link>https://dev.to/jannisdev/no-grind-no-glory-aquahub-6-2290</link>
      <guid>https://dev.to/jannisdev/no-grind-no-glory-aquahub-6-2290</guid>
      <description>&lt;p&gt;Another week has passed! Here I am with the newest weekly blog to share what progress we've made at AquaHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔥 First contributor&lt;/li&gt;
&lt;li&gt;🚀 The UI progress&lt;/li&gt;
&lt;li&gt;🐳 Future hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔥 First contributor
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;awesome moment&lt;/strong&gt; happened right in the middle of a development session.&lt;br&gt;
A person joined and offered help in the development of AquaHub. He began working on the &lt;code&gt;README.md&lt;/code&gt;, finished it and created a Pull Request. After that he contributed some grammar fixes as well.&lt;br&gt;
Even if it doesn't sound like much, it means a lot to me and was an amazing feeling.&lt;br&gt;
If you read this &lt;strong&gt;thank you!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 The UI progress
&lt;/h2&gt;

&lt;p&gt;This week I fully committed into the UI and was working on different stuff like login page and it's functionality and the projects page. Little spoiler here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkxks7lqhjawu2ax46vv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkxks7lqhjawu2ax46vv.png" alt="AquaHub projects page preview" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
   🐳 Future hosting
&lt;/h2&gt;

&lt;p&gt;One of the next steps it the &lt;strong&gt;hosting&lt;/strong&gt; and &lt;strong&gt;staging hosting&lt;/strong&gt; as well. I'm currently working on the configuration files and need to write a custom script to initialize our current backend &lt;strong&gt;PocketBase&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>Manage your containers with Portainer</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Wed, 16 Nov 2022 07:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/manage-your-containers-with-portainer-40p8</link>
      <guid>https://dev.to/jannisdev/manage-your-containers-with-portainer-40p8</guid>
      <description>&lt;p&gt;Today we are going to take a look at &lt;a href="https://www.portainer.io/"&gt;Portainer&lt;/a&gt;!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❓ Quick intro to Portainer&lt;/li&gt;
&lt;li&gt;⚙️ Setup Portainer for Linux&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
   ❓ Quick intro to Portainer
&lt;/h2&gt;

&lt;p&gt;First off all there's one question. &lt;em&gt;What's Portainer?&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Portainer is a web-based management tool for all of your containers. You can deploy, configure, troubleshoot and secure containers. Doesn't matter if your infrastructure is on Kubernetes, Docker, Swarm or Nomad in any cloud, data center or device.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mvwkjVt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll93i78gm90xzd7lwszx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mvwkjVt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll93i78gm90xzd7lwszx.png" alt="Portainer dashboard preview" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A beautiful UI to have the overview about your running processes and containers.&lt;br&gt;
It has many integrations and is easy to setup. E.g. auto deploy on git repository push (GitHub, GitLab, etc.).&lt;/p&gt;
&lt;h2&gt;
  
  
  ⚙️ Setup Portainer for Linux
&lt;/h2&gt;

&lt;p&gt;We are going to setup Portainer on &lt;strong&gt;Linux&lt;/strong&gt;.&lt;br&gt;
&lt;em&gt;You already need to have some knowledge about &lt;strong&gt;Docker&lt;/strong&gt; because it doesn't get covered here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First, create the volume that portainer server will use to store its database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker volume create portainer_data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that we can already install the portainer server container (Community Edition):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And after it started it's ready to go! Visit it's page and start by creating your admin user and follow the instructions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://localhost:9443
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ℹ️ FYI:&lt;/strong&gt; There's also a free business edition with some additions. Read more about the &lt;a href="https://www.portainer.io/blog/portainer-community-edition-ce-vs-portainer-business-edition-be-whats-the-difference"&gt;differences&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xaeAVXvJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>kubernetes</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Grinding when no one else is - AquaHub #5</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Mon, 14 Nov 2022 09:40:03 +0000</pubDate>
      <link>https://dev.to/jannisdev/grinding-when-noone-else-is-aquahub-5-3ifo</link>
      <guid>https://dev.to/jannisdev/grinding-when-noone-else-is-aquahub-5-3ifo</guid>
      <description>&lt;p&gt;Also in the last week I did some work on AquaHub. I know this post is two days late but that doesn't prevent me from sharing the newest progress.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🖥️ The UI progress&lt;/li&gt;
&lt;li&gt;🪝 GitHub webhook&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
   🖥️ The UI progress
&lt;/h2&gt;

&lt;p&gt;Since I have &lt;em&gt;PocketBase&lt;/em&gt; as my Backend-as-a-Service I can focus completely on the frontend.&lt;br&gt;
I decided to build it with &lt;strong&gt;SvelteKit&lt;/strong&gt; because it's a easy and simple framework. I also like to try new things and this seems perfect to dive deeper into it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ngbzUx1P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ui8nxx9bpk2etthmtf0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ngbzUx1P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ui8nxx9bpk2etthmtf0y.png" alt="AquaHub Landing page preview" width="880" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The landing page is currently under development and is getting better and better each day.&lt;br&gt;
It's very hard to say but I start with a &lt;strong&gt;whitemode&lt;/strong&gt; at the beginning.&lt;br&gt;
Later there will hopefully be a darkmode!&lt;/p&gt;

&lt;h2&gt;
  
  
  🪝 GitHub webhook
&lt;/h2&gt;

&lt;p&gt;A little but cool improvement.&lt;br&gt;
On the AquaHub &lt;a href="https://discord.gg/GjJNf7zhgy"&gt;Discord&lt;/a&gt; I setup a GitHub Webhook to the official AquaHub repository. Everyone in the Discord gets updated on changes, released and updates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i7WRiKmX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70lcy4ecggjl3wc5gpxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i7WRiKmX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70lcy4ecggjl3wc5gpxh.png" alt="GitHub Webhook preview" width="880" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gB5HhZkA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>javascript</category>
      <category>community</category>
    </item>
    <item>
      <title>Introduction &amp; Setup PocketBase</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Wed, 09 Nov 2022 07:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/introduction-setup-pocketbase-35l2</link>
      <guid>https://dev.to/jannisdev/introduction-setup-pocketbase-35l2</guid>
      <description>&lt;p&gt;Today we are going to dive into &lt;a href="https://pocketbase.io" rel="noopener noreferrer"&gt;PocketBase&lt;/a&gt; and set it up!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💡 What's PocketBase?&lt;/li&gt;
&lt;li&gt;🛠️ Setup Pocketbase&lt;/li&gt;
&lt;li&gt;🐳 Setup via docker-compose&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💡 What's PocketBase?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;PocketBase&lt;/strong&gt; is an open-source &lt;strong&gt;Backend-as-a-service&lt;/strong&gt; (BaaS). It offers all necessary needed features like &lt;em&gt;authentication&lt;/em&gt;, &lt;em&gt;file storage&lt;/em&gt;, &lt;em&gt;realtime database&lt;/em&gt; and &lt;em&gt;web dashboard&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;PocketBase uses an SQLite Database behind the scene and is written in &lt;em&gt;Go&lt;/em&gt;. They offer an awesome &lt;em&gt;JavaScript/Go SDK&lt;/em&gt; and you can even extend it by using it as a &lt;em&gt;Go Framework&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You are able to configure &lt;em&gt;permission rules&lt;/em&gt;, &lt;em&gt;OAuth2&lt;/em&gt;, &lt;em&gt;external file storage (S3)&lt;/em&gt; and &lt;em&gt;mail (SMTP)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pocketbase.io/" rel="noopener noreferrer"&gt;PocketBase&lt;/a&gt;&lt;br&gt;
&lt;a href="https://pocketbase.io/demo/" rel="noopener noreferrer"&gt;PocketBase Demo:&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
   🛠️ Setup Pocketbase
&lt;/h2&gt;

&lt;p&gt;The setup of Pocketbase is so easy it takes less than 1 minute to be able to start using it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Download &amp;amp; extract
&lt;/h3&gt;

&lt;p&gt;Download the archive from the &lt;a href="https://pocketbase.io/docs/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; that's correct for you operating system. Now move it in the root folder in your project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flex70u962n8uwip2l1ps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flex70u962n8uwip2l1ps.png" alt="Archive in root folder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next &lt;em&gt;extract&lt;/em&gt; the archive and you should be left with a folder which contains an executable (&lt;code&gt;pocketbase&lt;/code&gt;).&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Start Pocketbase
&lt;/h3&gt;

&lt;p&gt;Move into this directory and run the &lt;code&gt;./pocketbase serve&lt;/code&gt; command. &lt;/p&gt;

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

cd ./&amp;lt;directory

./pocketbase serve


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

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoeeuptxe55j1z1c708l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoeeuptxe55j1z1c708l.png" alt="Terminal with commands to start PocketBase"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you are all set up! Visit the &lt;strong&gt;Admin UI&lt;/strong&gt; page to setup your &lt;em&gt;admin account&lt;/em&gt; and start using PocketBase!&lt;/p&gt;

&lt;h2&gt;
  
  
  🐳 Setup via docker-compose
&lt;/h2&gt;

&lt;p&gt;In the favor of many developers there's a way to set it up via Docker as well.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/muchobien/pocketbase-docker" rel="noopener noreferrer"&gt;https://github.com/muchobien/pocketbase-docker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even easier than above you just add the pocketbase to your &lt;code&gt;docker-compose.yml&lt;/code&gt; file like that:&lt;/p&gt;

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

version: "3.7"
services:
  pocketbase:
    image: ghcr.io/muchobien/pocketbase:latest
    container_name: pocketbase
    restart: unless-stopped
    command:
      - --encryptionEnv &lt;span class="c"&gt;#optional&lt;/span&gt;
      - ENCRYPTION &lt;span class="c"&gt;#optional&lt;/span&gt;
    environment:
      ENCRYPTION: example &lt;span class="c"&gt;#optional&lt;/span&gt;
    ports:
      - "8090:8090"
    volumes:
      - /path/to/data:/pb_data
      - /path/to/public:/pb_public &lt;span class="c"&gt;#optional&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;After starting your docker stack it automatically installs and sets up &lt;em&gt;PocketBase&lt;/em&gt; and you're instantly ready to start working!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-blue.png" alt="Support me"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>First steps taken - AquaHub #4</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Sat, 05 Nov 2022 07:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/first-steps-taken-aquahub-4-1o93</link>
      <guid>https://dev.to/jannisdev/first-steps-taken-aquahub-4-1o93</guid>
      <description>&lt;p&gt;This week I started the &lt;strong&gt;Projects Portal (AquaHub)&lt;/strong&gt; and took the first steps. I'm so excited and really hyped for what the future holds. Here I share the two top things happened this week.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🗂 PocketBase&lt;/li&gt;
&lt;li&gt;👤 Authentication&lt;/li&gt;
&lt;li&gt;🔥 UI coming&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
   🗂 PocketBase
&lt;/h2&gt;

&lt;p&gt;Another and most likely to the last change I did to the tech stack that I'm going to use for this project. I set up the so called &lt;a href="https://pocketbase.io"&gt;Pocketbase&lt;/a&gt; to use as a Backend-as-a-Service.&lt;/p&gt;

&lt;p&gt;I added it via docker-compose to my &lt;a href="https://dev.to/jannisdev/create-a-devcontainer-vscode-4pkh"&gt;devcontainer&lt;/a&gt;. It was super easy to set up and it's working perfectly fine.&lt;/p&gt;

&lt;p&gt;PocketBase is a small but fast backend to use in an application and has a beautiful and easy to use &lt;strong&gt;web interface&lt;/strong&gt;. You can configure multiple things like &lt;strong&gt;storage server&lt;/strong&gt; (S3) or &lt;strong&gt;SMTP&lt;/strong&gt; for &lt;strong&gt;password reset/confirmation mails&lt;/strong&gt;. The documentation is awesome and there's also built-in API preview in the dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  👤 Authentication
&lt;/h2&gt;

&lt;p&gt;With the new backend set up I implemented the first authentication method. &lt;strong&gt;Google authentication&lt;/strong&gt; for the beginning because it's the most used one. Later there will be more added!&lt;/p&gt;

&lt;p&gt;There were multiple problems at first with the authentication flow and I needed to get familiar with the &lt;em&gt;PocketBase&lt;/em&gt; API. But now that I've spent a few hours learning PocketBase, it works fine and I can move on.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔥 UI coming
&lt;/h2&gt;

&lt;p&gt;Now that I'm all set with a working backend and authentication I start with building &lt;strong&gt;some parts of the UI&lt;/strong&gt;. My plans are to make a concept about the structure of the page and how the user is going to &lt;em&gt;interact&lt;/em&gt; with it.&lt;/p&gt;

&lt;p&gt;I focus on making a very &lt;strong&gt;MVP&lt;/strong&gt; now to find out if it's going to have some people interested in it. Of course fun is the most important part and I'm definitely having a ton of fun!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gB5HhZkA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>career</category>
      <category>typescript</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Create a Devcontainer (VSCode)</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Wed, 02 Nov 2022 07:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/create-a-devcontainer-vscode-4pkh</link>
      <guid>https://dev.to/jannisdev/create-a-devcontainer-vscode-4pkh</guid>
      <description>&lt;ul&gt;
&lt;li&gt;❓ What's a devcontainer&lt;/li&gt;
&lt;li&gt;🏗 Create your own devcontainer&lt;/li&gt;
&lt;li&gt;🔗 Devcontainer with docker-compose&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ❓ What's a devcontainer
&lt;/h2&gt;

&lt;p&gt;A devcontainer is a feature of &lt;strong&gt;Visual Studio Code&lt;/strong&gt; that let your run &lt;em&gt;docker containers&lt;/em&gt; locally for development. This brings a lot of &lt;strong&gt;advantages&lt;/strong&gt;!&lt;br&gt;
I listed a few here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Useful for bigger groups&lt;/li&gt;
&lt;li&gt;Doesn't matter what operating system, version or compatability your local device has. (It's built for that purpose!)&lt;/li&gt;
&lt;li&gt;Fast and secure&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
   🏗 Create your own devcontainer
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;FYI:&lt;/strong&gt; For this part some docker knowledge is required and is not getting teached.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now in this example let's create a simple and small &lt;strong&gt;NodeJS devcontainer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We start with creating a &lt;code&gt;.devcontainer&lt;/code&gt; folder in the root directory of our project.&lt;/p&gt;

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

&lt;p&gt;All we need more for our devcontainer are two more files. The &lt;code&gt;devcontainer.json&lt;/code&gt; for configs and a default &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;devcontainer.json&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"YourProjectName"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"dockerfile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Dockerfile"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"settings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.profiles.linux"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"zsh"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/bin/zsh"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.defaultProfile.linux"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"zsh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"extensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"esbenp.prettier-vscode"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;&lt;/strong&gt; - The name of your devcontainer and most likely the same as your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;build&lt;/code&gt;&lt;/strong&gt; - In this example we defined where the Dockerfile is but ther are many more options for the build process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;settings&lt;/code&gt;&lt;/strong&gt; - Have explicit settings like the shell in this example is set to zsh (Need to be installed in Dockerfile) and &lt;em&gt;autoformat&lt;/em&gt; on save is set to &lt;em&gt;true&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;extensions&lt;/code&gt;&lt;/strong&gt; - An array of vscode extensions that are automatically getting installed on startup and used. (Locally installed extensions not available anymore)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For even more settings see in the docs: &lt;a href="https://containers.dev/implementors/json_reference/" rel="noopener noreferrer"&gt;https://containers.dev/implementors/json_reference/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dockerfile&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:18&lt;/span&gt;


&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update
&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; wget zsh git &lt;span class="se"&gt;\
&lt;/span&gt;&lt;span class="c"&gt;# Install oh-my-zsh&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh &lt;span class="nt"&gt;-O&lt;/span&gt; - | zsh &lt;span class="se"&gt;\
&lt;/span&gt;  &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cp&lt;/span&gt; ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if you reload your window or restart it completely you should see a popup on the right bottom corner saying "Reopen in Container". Click in it and your container is starting up. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1edjg0tnori53wuutcd0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1edjg0tnori53wuutcd0.png" alt="Reopen in container window"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt;&lt;br&gt;
You just created your very own node devcontainer.&lt;br&gt;
This is possible in every language and with many more settings and stuff. I just briefly teached you the very basics.&lt;/p&gt;
&lt;h2&gt;
  
  
  🔗 Devcontainer with docker-compose
&lt;/h2&gt;

&lt;p&gt;You are not limited to only one container, you can even use docker-compose and build your complete development environment with e.g. database or two different servers.&lt;/p&gt;

&lt;p&gt;Let's make some changes to our &lt;strong&gt;devcontainer.json&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"YourProjectName"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Changes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;👇&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dockerComposeFile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"docker-compose.yml"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"workspaceFolder"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/workspace"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"settings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.profiles.linux"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"zsh"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/bin/zsh"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.defaultProfile.linux"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"zsh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"extensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"esbenp.prettier-vscode"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;dockerComposeFile&lt;/code&gt;&lt;/strong&gt; - The location of your docker-compose.yml file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;service&lt;/code&gt;&lt;/strong&gt; - Define which service you are going to work in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;workspaceFolder&lt;/code&gt;&lt;/strong&gt; - The folder where you are going to work in.&lt;/p&gt;

&lt;p&gt;Now let's create our &lt;em&gt;docker-compose.yml&lt;/em&gt; file.&lt;br&gt;
&lt;strong&gt;docker-compose.yml&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;version: "3"

services:
  app:
    container_name: projectname_app
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      - APP_ENV=local
      - APP_DEBUG=true
    volumes:
      - ..:/workspace:cached
    depends_on: [database]
    command: sleep infinity

  database:
    container_name: projectname_db
    image: mariadb:10.9
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD='yes'
      - MYSQL_ROOT_HOST=%
      - MYSQL_DATABASE=development
      - MYSQL_USER=root
    ports: ["3373:3306"]
    volumes:
      - ./data/db:/var/lib/mysql

volumes:
  vendor: null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We now created our docker-compose file to start not only our application but a &lt;strong&gt;MariaDB&lt;/strong&gt; database at the same time.&lt;/p&gt;

&lt;p&gt;If you now reload your project again and startup your containers. You will see that your project started up but at the same time you have a database running ready to use in your project. How cool is that!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/jannisdev" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fdefault-blue.png" alt="Support me"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>node</category>
      <category>vscode</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Start small and grow after - AquaHub #3</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Sat, 29 Oct 2022 06:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/start-small-and-grow-after-aquahub-3-2lcm</link>
      <guid>https://dev.to/jannisdev/start-small-and-grow-after-aquahub-3-2lcm</guid>
      <description>&lt;p&gt;In todays blog we discuss some new plans and stuff I was thinking about to change. Even if I &lt;strong&gt;had&lt;/strong&gt; a specific plan I needed to take a step back and reconsider my plan.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🤏 Start small&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to%24first-software"&gt;🛠 First software&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🔮 Concepts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🤏 Start small
&lt;/h2&gt;

&lt;p&gt;Maybe some of you read my &lt;a href="https://dev.to/jannisdev/the-beginning-of-my-journey-516d"&gt;first&lt;/a&gt; or &lt;a href="https://dev.to/jannisdev/the-plan-and-its-optimal-stack-aquahub-2-4fk2"&gt;second&lt;/a&gt; blog post. I was already thinking about having a central authentication provider and teams systems and so on.&lt;br&gt;
But I had to tell myself... &lt;em&gt;&lt;strong&gt;slow down&lt;/strong&gt;&lt;/em&gt;. I can't start with the beginning. I bet some of you have also experienced this &lt;em&gt;"I want everything already at the beginning"&lt;/em&gt;. So now I take a step back and tell you how &lt;em&gt;I am going to start small and grow later.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠 First software
&lt;/h2&gt;

&lt;p&gt;Now because I decided to start with a small software I already wanted to do, I'm going to introduce you to it.&lt;br&gt;
&lt;strong&gt;A hub for software projects&lt;/strong&gt;. A simple UI, awesome user experience and many different features for project managers as well as project searches.&lt;br&gt;
In a small addition to the stack I am now going to use *&lt;em&gt;NextAuthJS&lt;/em&gt; for authentication.&lt;br&gt;
In the future I will generally post about the progress of this specific software and sometimes even general interesting facts about AquaHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔮 Concepts
&lt;/h2&gt;

&lt;p&gt;Maybe some of you also read my other general blogs about different concepts and software. I write blog posts about different softwares and concept I will implement in AquaHub and now specifically in the documentation too.&lt;/p&gt;

&lt;p&gt;Here a quick list of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/jannisdev/build-a-bitwise-permission-system-ocl"&gt;Build a Bitwise Permission System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/jannisdev/expressjs-like-api-in-nextjs-483e"&gt;ExpressJS like API in NextJS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/jannisdev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gB5HhZkA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>typescript</category>
    </item>
    <item>
      <title>ExpressJS like API in NextJS</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Wed, 26 Oct 2022 06:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/expressjs-like-api-in-nextjs-483e</link>
      <guid>https://dev.to/jannisdev/expressjs-like-api-in-nextjs-483e</guid>
      <description>&lt;p&gt;Have you ever wanted an ExpressJS like API structure in your NextJS app? A good structure and easy to extend.&lt;/p&gt;

&lt;p&gt;Let me give you &lt;strong&gt;three examples&lt;/strong&gt; with having an easier API with the NPM package called &lt;a href="https://npmjs.com/package/next-connect"&gt;next-connect&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FYI: This is not the whole code, it's just the core of the functionality I wanted to present you.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Advantages&lt;/li&gt;
&lt;li&gt;🚏 Route&lt;/li&gt;
&lt;li&gt;🚪 Middleware&lt;/li&gt;
&lt;li&gt;🛑 Error handling&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
   ✅ Advantages
&lt;/h2&gt;

&lt;p&gt;Here are quickly &lt;strong&gt;five advantages&lt;/strong&gt; of using &lt;em&gt;next-connect&lt;/em&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Clean and nice structure&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast and scalable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy to implement&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TypeScript support&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lightweight&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🚏 Route
&lt;/h2&gt;

&lt;p&gt;Create a POST endpoint for /user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NextJS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// api/user.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Worked!)
  }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Next-Connect:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// api/user.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createRouter&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NextApiRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NextApiResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Process a POST request&lt;/span&gt;
&lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Worked!)
});
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's imagine you have an endpoint for GET, POST, PATCH, PUT and DELETE method. Your handler will be full of if else statements and not very clean.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚪 Middleware
&lt;/h2&gt;

&lt;p&gt;Let's create a middleware for two routes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NextJS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// middleware.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextRequest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nextUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pathname&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/about&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Middleware fro /about&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nextUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pathname&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Middleware fro /dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// api/about.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Process a POST request&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Handle any other HTTP method&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Next-Connect:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// middleware.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;middleware&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextApiRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextApiResponse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Middleware ran! 🚀&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="c1"&gt;// api/index.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createRouter&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NextApiRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NextApiResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Process a POST request&lt;/span&gt;
&lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Worked!)
});
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It doesn't look that &lt;em&gt;next-connect&lt;/em&gt; would be better, smaller or easier BUT think about having an API with dozens of endpoints and multiple middlewares. With &lt;em&gt;next-connect&lt;/em&gt; it's much more clear and structured.&lt;/p&gt;

&lt;h2&gt;
  
  
   🛑 Error handling
&lt;/h2&gt;

&lt;p&gt;The error handling of both parties is very interesting, let's look into it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NextJS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Do some API request or something&lt;/span&gt;
        &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Send error to the client side&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Next-Connect:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nf"&gt;onNoMatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;404 Not found&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nf"&gt;onError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Next-Connect&lt;/em&gt; has a way easier and secure way of handling errors in your application. It's even pretty customizable and nice to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;br&gt;
It was a quick and very superficial overview about &lt;em&gt;next-connect&lt;/em&gt; for &lt;em&gt;NextJS&lt;/em&gt;. I absolutely like it and I hope I could give you a good overview about it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/jannisdev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xaeAVXvJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>api</category>
      <category>typescript</category>
    </item>
    <item>
      <title>The plan and its optimal stack - AquaHub #2</title>
      <dc:creator>Jannis</dc:creator>
      <pubDate>Sat, 22 Oct 2022 06:00:00 +0000</pubDate>
      <link>https://dev.to/jannisdev/the-plan-and-its-optimal-stack-aquahub-2-4fk2</link>
      <guid>https://dev.to/jannisdev/the-plan-and-its-optimal-stack-aquahub-2-4fk2</guid>
      <description>&lt;p&gt;In the last few days I made a rough plan about where I want AquaHub to go. Thought about the project I want to start AquaHub with and made a little roadmap for the next few steps.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌐 Open-Source&lt;/li&gt;
&lt;li&gt;🏆 Roadmap&lt;/li&gt;
&lt;li&gt;⚙️ Tech-Stack&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
   🌐 Open-Source
&lt;/h2&gt;

&lt;p&gt;In the last blog post I said I will think about if I open source the projects or not. The answer is &lt;strong&gt;YES&lt;/strong&gt;! I will put all projects and their source code open-source on &lt;a href="https://github.com/AquaHubStudio"&gt;GitHub&lt;/a&gt; for you to look into and maybe also contribute 🤩.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏆 Roadmap
&lt;/h2&gt;

&lt;p&gt;To have something to orient myself by I made the beginning of a roadmap. It shows the first few projects I want to build and build the foundation of AquaHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tuRd7gP5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/swd3bxbo3xtdvkvicbos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tuRd7gP5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/swd3bxbo3xtdvkvicbos.png" alt="AquaHub Roadmap" width="880" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accounts&lt;/strong&gt;&lt;br&gt;
Let me explain what I exactly mean by that because there can be some misunderstandings. I'm sick of giving away personal data and all of a sudden I get personalised ads and because of this there won't be nothing like that at AquaHub. As you read above it's all going to be &lt;strong&gt;open-source&lt;/strong&gt;.&lt;br&gt;
It's going to be more of a central profile for each future software and also for me to be able to implement authentication easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Teams&lt;/strong&gt;&lt;br&gt;
After I built the accounts system called &lt;strong&gt;AquaProfile&lt;/strong&gt; I want to get some order into the accounts. Because of that I build a website where you can create a team and be able to handle all of your members easy, simple and fast.&lt;/p&gt;

&lt;p&gt;Now comes the part where I still couldn't agree. I am split between two plans. I would love if some of you would give me your expertise and personal opinion on that. I'm just going to explain each of it quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Organizations&lt;/strong&gt;&lt;br&gt;
A tool for you too manage multiple teams at once. Have the ability to create some sort of a tree structure with your team members. This is probably only necessary for bigger groups or even companies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Softwares&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
This part is still open but on the roadmap it stands for products that are going to be a part of the AquaHub network and it's image.&lt;/p&gt;

&lt;h2&gt;
  
  
   ⚙️ Tech-Stack
&lt;/h2&gt;

&lt;p&gt;To introduce you guys to the projects and also have a solid plan for each of AquaHub's products I built a Tech Stack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NextJS&lt;/strong&gt;&lt;br&gt;
It's going to be the JavaScript framework for &lt;em&gt;frontend&lt;/em&gt; and &lt;em&gt;backend&lt;/em&gt;. It's based on ReactJS but has many more features built in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TypeScript&lt;/strong&gt;&lt;br&gt;
To prevent more bugs and increase productivity we want a type-safe environment. TypeScript's going to help us with that 😉.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prisma&lt;/strong&gt;&lt;br&gt;
To handle our &lt;strong&gt;MariaDB&lt;/strong&gt; database we user Prisma as our ORM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TailwindCSS&lt;/strong&gt;&lt;br&gt;
I'm not a big fan of writing huge CSS files and classes so we will use TailwindCSS which has a huge community and tons of features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JestJS&lt;/strong&gt;&lt;br&gt;
As our software grows we want to prevent bugs from happening in production so we write tests with JestJS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prettier&lt;/strong&gt;&lt;br&gt;
Just a little addition I made a general prettier config file so everyone has the same formatting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker / Devcontainer&lt;/strong&gt;&lt;br&gt;
To help host and develop our softwares we use Docker for final hosting and when developing I built a devcontainer (VSCode feature) that has all needed extensions and configurations in it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MariaDB&lt;/strong&gt;&lt;br&gt;
A relational database with a big community and good developer experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://npmjs.com/package/next-connect"&gt;next-connect&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
This is neither a language nor a framework. It's just a small package to have a more ExpressJS like codebase in the backend. I'm not a fan of NextJS backend itself but with this package I love it.&lt;/p&gt;

&lt;p&gt;So if you want to contribute to a project here you go. I will also create many issues and a guide how to setup everything. Choose an issue, create a merge request and I will gladly review it 🤩.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/jannisdev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gB5HhZkA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Support me" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>career</category>
      <category>webdev</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
