<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Patrick Hadson</title>
    <description>The latest articles on Forem by Patrick Hadson (@pkhadson).</description>
    <link>https://forem.com/pkhadson</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%2F1198272%2F6c3e74f1-4dbf-44d1-90d8-479d987ad318.jpg</url>
      <title>Forem: Patrick Hadson</title>
      <link>https://forem.com/pkhadson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pkhadson"/>
    <language>en</language>
    <item>
      <title>Deploy Your API in 1 Minute with NestCDK</title>
      <dc:creator>Patrick Hadson</dc:creator>
      <pubDate>Tue, 13 Feb 2024 23:19:08 +0000</pubDate>
      <link>https://forem.com/pkhadson/deploy-your-api-in-1-minute-with-nestcdk-cp6</link>
      <guid>https://forem.com/pkhadson/deploy-your-api-in-1-minute-with-nestcdk-cp6</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In today's fast-paced development world, launching APIs quickly and efficiently is crucial. This guide aims to show you how to develop and deploy an API in just one minute by combining the powers of AWS Cloud Development Kit (CDK) and NestJS. Assuming you're familiar with NestJS and have an AWS profile and Node.js (version 20 or higher) ready, we'll walk through setting up a NestJS project, integrating &lt;a href="https://nestcdk.dev"&gt;NestCDK&lt;/a&gt;, verifying AWS configuration, deploying your API, and managing it post-launch. This streamlined approach is designed for developers looking to expedite their deployment process without sacrificing quality or scalability.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Setup NestJS Project&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Initiating a NestJS project is straightforward. Simply open your terminal, navigate to your desired directory, and execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nest new app-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;strong&gt;&lt;code&gt;app-name&lt;/code&gt;&lt;/strong&gt; with your project name. This command quickly scaffolds a new NestJS application, equipping you with a ready-to-develop project structure. With your NestJS project set up, you're now primed to integrate NestCDK for AWS deployment.&lt;/p&gt;

&lt;p&gt;If this concise overview works for you, we can move on to detailing the NestCDK setup process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup NestCDK into NestJS Project
&lt;/h3&gt;

&lt;p&gt;Integrating NestCDK into your NestJS project is a crucial step for seamless deployment to AWS. NestCDK, a toolkit designed to work with AWS Cloud Development Kit, simplifies the infrastructure as code process, making it easier to manage AWS resources directly from your NestJS application. Here’s how to set it up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Navigate to your project directory&lt;/strong&gt;: Make sure you’re in your newly created NestJS project folder.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;app-name
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Replace &lt;code&gt;app-name&lt;/code&gt; with the name of your NestJS project.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install NestCDK and AWS CDK&lt;/strong&gt;: You need to install the &lt;code&gt;@nest-cdk/cli&lt;/code&gt; package along with &lt;code&gt;aws-cdk&lt;/code&gt; globally using npm. Run the following command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; aws-cdk @nest-cdk/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set up NestCDK&lt;/strong&gt;: Inside your project directory, scaffold NestCDK by executing:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nest-cdk init
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This command sets up AWS CDK within your project, linking it to your NestJS application. It creates an AWS CDK structure, enabling you to define your cloud infrastructure using familiar programming constructs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The NestCDK initialization also supports monorepo projects, allowing you to run it in the root directory if necessary. With NestCDK now integrated into your project, you’ve laid the groundwork for deploying your API to AWS with ease.&lt;/p&gt;

&lt;p&gt;Let’s proceed to verifying your AWS profile configuration, ensuring you’re ready for deployment. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;AWS Profile Configuration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before deploying, quickly verify your AWS profile is set up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure list-profiles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this in your terminal. If your profile appears, you’re ready. Otherwise, set it up by following the &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html"&gt;AWS CLI Configuration Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy Your API
&lt;/h3&gt;

&lt;p&gt;To deploy your API, simply execute the deployment command from your project's root directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run deploy:all

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

&lt;/div&gt;



&lt;p&gt;This initiates the deployment process to AWS, provisioning necessary resources and making your NestJS application available as an API. It may take a few minutes to complete.&lt;/p&gt;

&lt;p&gt;After deployment, the terminal will output an endpoint URL. If your application has a default &lt;code&gt;GET /&lt;/code&gt; endpoint, visiting this URL should display a "Hello World" message, confirming your API is live and operational.&lt;/p&gt;

&lt;p&gt;Your API is now hosted on AWS API Gateway. You can further manage and customize it via the &lt;a href="https://console.aws.amazon.com/console/home"&gt;AWS Management Console&lt;/a&gt;. To update your API, just re-run the deploy command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Congratulations! You've successfully developed and deployed an API in record time using NestJS and AWS CDK. This process not only simplifies the initial setup but also streamlines future deployments, making your development workflow more efficient.&lt;/p&gt;

&lt;p&gt;With your API now live on AWS API Gateway, you have a scalable and secure platform from which to serve your application. You can access the AWS console to customize your API gateway, set up custom domains, configure stages, and more. Remember, any updates or expansions to your API can be easily deployed with a simple command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run deploy:all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This guide aimed to demystify the process of API development and deployment, showing you how accessible and quick it can be with the right tools. As you continue to develop your project, you'll find this approach saves you considerable time and effort, allowing you to focus on creating great features and user experiences.&lt;/p&gt;

&lt;p&gt;We hope this guide has been helpful in getting your API up and running swiftly. Happy coding, and we look forward to seeing what you build!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>cdk</category>
      <category>aws</category>
      <category>programming</category>
    </item>
    <item>
      <title>Gallery App: High-Quality Cloud Solutions Under $2</title>
      <dc:creator>Patrick Hadson</dc:creator>
      <pubDate>Sat, 10 Feb 2024 02:22:29 +0000</pubDate>
      <link>https://forem.com/pkhadson/gallery-app-high-quality-cloud-solutions-under-2-3l9h</link>
      <guid>https://forem.com/pkhadson/gallery-app-high-quality-cloud-solutions-under-2-3l9h</guid>
      <description>&lt;p&gt;Read in &lt;a href="https://dev.to/pkhadson/app-de-fotos-solucoes-em-nuvem-de-alta-qualidade-por-menos-de-2-1man"&gt;pt-BR&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today's world, where technology permeates every aspect of our lives, the power to connect communities through innovative digital solutions has never been more crucial. This article outlines the development journey of a public photo gallery app, demonstrating that it's possible to achieve significant results even with limited resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  App Scope
&lt;/h2&gt;

&lt;p&gt;The challenge was clear: to create a photo gallery app accessible to all church members, where photos from events and services could be shared. As a volunteer project, the app aimed not only to preserve valuable memories but also to promote inclusion and a sense of community among the members.&lt;/p&gt;

&lt;h2&gt;
  
  
  Need for Low Cost
&lt;/h2&gt;

&lt;p&gt;Operating under the premise of a volunteer and non-profit project, it was essential to minimize costs as much as possible. This requirement shaped all development decisions, from the choice of technologies to the app's architecture, ensuring the project's financial sustainability was not just an aspiration but a reality.&lt;/p&gt;

&lt;p&gt;High Availability&lt;br&gt;
Anticipating significant demand, with up to 5,000 active users, high availability was a non-negotiable requirement. The app needed to provide a flawless experience, regardless of the number of simultaneous accesses, ensuring all community members could connect and share experiences consistently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architectural Strategy
&lt;/h2&gt;

&lt;p&gt;The solution was to minimize backend complexity, opting for an architecture that maximized the use of serverless services. Focusing on AWS, I deepened my knowledge in AWS CDK, AWS SDK, and S3 policies, aiming for a direct and efficient integration between the frontend and the photo storage on S3. This approach not only met the low-cost and high-availability requirements but also simplified the app's maintenance and update process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The result was a robust photo gallery app, capable of listing photos stored on S3 as albums, accessible to all church members. Using the NPM package AWS SDK, I achieved an effective integration that allowed the frontend to query and display the files from the S3 bucket in an organized and scalable manner. This project not only fulfilled its initial purpose but also served as a valuable learning experience on how technological solutions can be implemented economically and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Practice
&lt;/h2&gt;

&lt;p&gt;This article is just the beginning. In the next one, I will detail the technical steps, challenges faced, and solutions adopted during the app's development, offering practical insights for those interested in embarking on similar projects. Stay tuned for a detailed guide on applying these strategies to your own projects, demonstrating that technological innovation is within reach for everyone, regardless of budget.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>s3</category>
      <category>aws</category>
      <category>programming</category>
    </item>
    <item>
      <title>App de Fotos: Soluções em Nuvem de Alta Qualidade por Menos de $2</title>
      <dc:creator>Patrick Hadson</dc:creator>
      <pubDate>Sat, 10 Feb 2024 02:19:29 +0000</pubDate>
      <link>https://forem.com/pkhadson/app-de-fotos-solucoes-em-nuvem-de-alta-qualidade-por-menos-de-2-1man</link>
      <guid>https://forem.com/pkhadson/app-de-fotos-solucoes-em-nuvem-de-alta-qualidade-por-menos-de-2-1man</guid>
      <description>&lt;p&gt;Leia em &lt;a href="https://dev.to/pkhadson/gallery-app-high-quality-cloud-solutions-under-2-3l9h"&gt;Inglês&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introdução
&lt;/h2&gt;

&lt;p&gt;No mundo atual, onde a tecnologia permeia cada aspecto de nossas vidas, o poder de conectar comunidades através de soluções digitais inovadoras nunca foi tão importante. Este artigo detalha a jornada de desenvolvimento de um aplicativo de galeria de fotos públicas, demonstrando que é possível alcançar resultados significativos mesmo com recursos limitados.&lt;/p&gt;

&lt;h2&gt;
  
  
  Escopo do Aplicativo
&lt;/h2&gt;

&lt;p&gt;O desafio era claro: criar um aplicativo de galeria de fotos acessível a todos os membros da igreja, onde as fotos dos eventos e cultos pudessem ser compartilhadas. Como um projeto voluntário, o aplicativo tinha como objetivo não apenas preservar memórias valiosas, mas também promover a inclusão e o senso de comunidade entre os membros.&lt;/p&gt;

&lt;h2&gt;
  
  
  Necessidade de Baixo Custo
&lt;/h2&gt;

&lt;p&gt;Operando sob a premissa de um projeto voluntário e sem fins lucrativos, era essencial minimizar os custos ao máximo. Este critério moldou todas as decisões de desenvolvimento, desde a escolha das tecnologias até a arquitetura do aplicativo, garantindo que a sustentabilidade financeira do projeto não fosse apenas uma aspiração, mas uma realidade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alta Disponibilidade
&lt;/h2&gt;

&lt;p&gt;Antecipando uma demanda significativa, com até 5 mil usuários ativos, a alta disponibilidade era um requisito não negociável. O aplicativo deveria oferecer uma experiência sem falhas, independentemente do número de acessos simultâneos, assegurando que todos os membros da comunidade pudessem se conectar e compartilhar experiências de maneira consistente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Estratégia de Arquitetura
&lt;/h2&gt;

&lt;p&gt;A solução encontrada foi minimizar a complexidade do back-end, optando por uma arquitetura que maximizasse o uso de serviços serverless. Com foco na AWS, aprofundei meus conhecimentos em AWS CDK, AWS SDK e políticas do S3, visando uma integração direta e eficiente entre o front-end e o armazenamento das fotos no S3. Essa abordagem não apenas atendia aos requisitos de baixo custo e alta disponibilidade, mas também simplificava o processo de manutenção e atualização do aplicativo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusão
&lt;/h2&gt;

&lt;p&gt;O resultado foi um aplicativo de galeria de fotos robusto, capaz de listar fotos armazenadas no S3 como álbuns, acessíveis a todos os membros da igreja. Utilizando o pacote NPM AWS SDK, consegui uma integração eficaz que permitiu ao front-end consultar e exibir os arquivos do bucket S3 de forma organizada e escalável. Este projeto não apenas cumpriu seu propósito inicial mas também serviu como um valioso aprendizado sobre como soluções tecnológicas podem ser implementadas de maneira econômica e eficiente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Na Prática
&lt;/h2&gt;

&lt;p&gt;Este artigo é apenas o começo. No próximo, detalharei os passos técnicos, os desafios enfrentados e as soluções adotadas durante o desenvolvimento do aplicativo, oferecendo insights práticos para aqueles interessados em embarcar em projetos similares. Aguardem por um guia detalhado sobre como aplicar essas estratégias em seus próprios projetos, demonstrando que a inovação tecnológica está ao alcance de todos, independentemente do orçamento.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>s3</category>
      <category>aws</category>
      <category>voluntario</category>
    </item>
  </channel>
</rss>
