<?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: Nicolas</title>
    <description>The latest articles on DEV Community by Nicolas (@tagada216).</description>
    <link>https://dev.to/tagada216</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%2F928742%2Fb29b6d0a-572a-4fe7-b33b-dd41b60ea6e5.png</url>
      <title>DEV Community: Nicolas</title>
      <link>https://dev.to/tagada216</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tagada216"/>
    <language>en</language>
    <item>
      <title>Script Correct AI Text Corrector</title>
      <dc:creator>Nicolas</dc:creator>
      <pubDate>Mon, 20 Jan 2025 13:55:38 +0000</pubDate>
      <link>https://dev.to/tagada216/script-correct-ai-text-corrector-38l7</link>
      <guid>https://dev.to/tagada216/script-correct-ai-text-corrector-38l7</guid>
      <description>&lt;h2&gt;
  
  
  ScriptCorrect: A Smart Local Text Editor with AI-Powered Style Adaptation
&lt;/h2&gt;

&lt;p&gt;In today’s digital world, writing effectively isn’t just about correct grammar and spelling — it’s about adapting your tone and style to different contexts. Whether you’re crafting a formal business proposal, writing an academic paper, or composing a casual email, each context demands a different writing style.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing ScriptCorrect
&lt;/h2&gt;

&lt;p&gt;ScriptCorrect is an open-source desktop application that goes beyond traditional spell-checking. Built with privacy in mind, it leverages the power of local AI through Ollama to provide intelligent text correction and style adaptation, all while keeping your data on your machine.&lt;/p&gt;

&lt;h1&gt;
  
  
  Key Features
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Style Adaptation
&lt;/h2&gt;

&lt;p&gt;What sets ScriptCorrect apart is its ability to adapt text to different writing styles. With just one click, you can transform your text to match several preset styles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Academic: Perfect for scholarly papers and research&lt;/li&gt;
&lt;li&gt;Business: Crisp and professional&lt;/li&gt;
&lt;li&gt;Journalistic: Clear and engaging&lt;/li&gt;
&lt;li&gt;Technical: Precise and detailed&lt;/li&gt;
&lt;li&gt;Casual: Friendly and approachable&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Privacy-First Approach
&lt;/h2&gt;

&lt;p&gt;Unlike cloud-based alternatives, ScriptCorrect runs entirely on your local machine using Ollama. This means your sensitive documents never leave your computer, providing complete privacy and security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern Technical Stack
&lt;/h2&gt;

&lt;p&gt;The application is built with modern technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tauri for a lightweight, secure desktop application&lt;/li&gt;
&lt;li&gt;Vue.js 3 for a reactive and efficient user interface&lt;/li&gt;
&lt;li&gt;Tailwind CSS for a clean, responsive design&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Smart Feedback
&lt;/h2&gt;

&lt;p&gt;Beyond simple corrections, ScriptCorrect provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quality scores for your text&lt;/li&gt;
&lt;li&gt;Specific improvement suggestions&lt;/li&gt;
&lt;li&gt;Detailed correction explanations&lt;/li&gt;
&lt;li&gt;Style enhancement recommendations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Development Story
&lt;/h2&gt;

&lt;p&gt;ScriptCorrect was born from a simple observation: existing text editors either focus solely on corrections or require sending sensitive data to cloud services. We wanted to create a tool that respects privacy while providing advanced writing assistance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking Forward
&lt;/h2&gt;

&lt;p&gt;While ScriptCorrect is already a powerful tool, we’re continuously working on improvements:&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional writing styles
&lt;/h2&gt;

&lt;p&gt;Custom style definitions&lt;br&gt;
Enhanced correction algorithms&lt;br&gt;
Expanded language support&lt;br&gt;
Try It Yourself&lt;br&gt;
ScriptCorrect is open-source and available for Windows, macOS, and Linux. You can find the project on GitHub and contribute to its development.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Tagada216/ScriptCorrect" rel="noopener noreferrer"&gt;https://github.com/Tagada216/ScriptCorrect&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In an era where effective written communication is crucial, tools like ScriptCorrect help bridge the gap between correct writing and appropriate styling. By combining local AI processing with intuitive design, it offers a unique solution for modern writing needs.&lt;/p&gt;

&lt;p&gt;This project represents a step forward in making advanced text processing accessible while respecting user privacy. Whether you’re a student, professional, or writer, ScriptCorrect aims to be your intelligent writing companion.&lt;/p&gt;

</description>
      <category>vue</category>
      <category>programming</category>
      <category>tauri</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Vue JS 3 Boilerplate</title>
      <dc:creator>Nicolas</dc:creator>
      <pubDate>Mon, 20 Jan 2025 13:49:59 +0000</pubDate>
      <link>https://dev.to/tagada216/vue-js-3-boilerplate-21k7</link>
      <guid>https://dev.to/tagada216/vue-js-3-boilerplate-21k7</guid>
      <description>&lt;p&gt;Every Vue.js developer knows the drill: starting a new project means spending hours configuring the build system, setting up routing, state management, and styling solutions. What if you could skip all that and jump straight into building your application? That’s exactly what our Vue 3 Boilerplate offers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenge of Modern Web Development
&lt;/h2&gt;

&lt;p&gt;In today’s fast-paced development environment, getting a project off the ground quickly while maintaining best practices and incorporating essential tools is crucial. Many developers face the challenge of balancing rapid development with proper architecture and tooling setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter Vue 3 Boilerplate
&lt;/h2&gt;

&lt;p&gt;Our Vue 3 Boilerplate is designed to eliminate these initial hurdles by providing a carefully curated, production-ready foundation for your next Vue.js project. Built with modern development workflows in mind, it combines the latest tools and practices in the Vue.js ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Features That Matter
&lt;/h2&gt;

&lt;p&gt;The boilerplate comes packed with essential features that modern web applications demand:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Vue 3 at Its Core
&lt;/h3&gt;

&lt;p&gt;Leveraging the latest version of Vue.js, you get access to the Composition API, better TypeScript support, and improved performance out of the box. The setup is optimized for development with Vue 3’s new features while maintaining compatibility with traditional development patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Lightning-Fast Development with Vite
&lt;/h3&gt;

&lt;p&gt;Built on top of Vite, the boilerplate offers an incredibly fast development experience. Hot module replacement (HMR) works seamlessly, and the build times are significantly reduced compared to traditional bundlers.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. State Management Made Simple
&lt;/h3&gt;

&lt;p&gt;Pinia, the official state management solution for Vue 3, comes pre-configured. Its intuitive API and excellent TypeScript support make managing application state a breeze, whether you’re building a small application or a large-scale system.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Robust Routing Solution
&lt;/h3&gt;

&lt;p&gt;Vue Router is integrated and configured, allowing you to start building multi-page applications immediately. The routing setup includes examples of basic configurations while remaining flexible enough for complex routing scenarios.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Modern Styling with Tailwind CSS
&lt;/h3&gt;

&lt;p&gt;Tailwind CSS integration provides a utility-first CSS framework that makes designing responsive and maintainable user interfaces straightforward. The configuration is optimized for production, ensuring minimal CSS bundle sizes.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Security First
&lt;/h3&gt;

&lt;p&gt;Integration with Vue ReCaptcha 3 demonstrates our commitment to security, helping you protect your forms and sensitive actions from the start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;The beauty of this boilerplate lies in its simplicity. Getting started is as easy as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone the repository&lt;/span&gt;
git clone &lt;span class="o"&gt;[&lt;/span&gt;your-repository-url]

&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Start development server&lt;/span&gt;
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Development Experience
&lt;/h2&gt;

&lt;p&gt;We’ve paid special attention to the development experience, recommending VSCode with Volar for the best possible TypeScript integration. The boilerplate includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proper TypeScript configuration for &lt;code&gt;.vue&lt;/code&gt; files&lt;/li&gt;
&lt;li&gt;Unit testing setup with Vitest&lt;/li&gt;
&lt;li&gt;Hot module replacement for rapid development&lt;/li&gt;
&lt;li&gt;Production build optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Looking Forward
&lt;/h2&gt;

&lt;p&gt;This isn’t just a static template. The boilerplate is actively maintained and regularly updated with new features and improvements. We’re committed to keeping it aligned with the latest best practices and tools in the Vue.js ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customization and Flexibility
&lt;/h2&gt;

&lt;p&gt;While the boilerplate provides a solid foundation, it’s designed to be flexible. Every aspect can be customized according to your project’s needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build configuration through Vite&lt;/li&gt;
&lt;li&gt;Tailwind CSS theming&lt;/li&gt;
&lt;li&gt;Routing structure&lt;/li&gt;
&lt;li&gt;State management patterns&lt;/li&gt;
&lt;li&gt;Testing methodologies&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Starting a new Vue 3 project shouldn’t mean reinventing the wheel. Our boilerplate provides a solid foundation that lets you focus on what matters most: building your application. Whether you’re creating a small prototype or launching a large-scale application, this boilerplate gives you the tools and structure needed for success.&lt;/p&gt;

&lt;p&gt;The combination of Vue 3, Vite, Pinia, and other modern tools creates a development environment that’s both powerful and enjoyable to work with. We invite you to try it out and experience the difference a well-structured boilerplate can make in your development workflow.&lt;/p&gt;

&lt;p&gt;Remember, this is just the beginning. As the Vue ecosystem evolves, so will this boilerplate. Stay tuned for regular updates and new features that will continue to enhance your development experience.&lt;/p&gt;

&lt;p&gt;— -&lt;/p&gt;

&lt;p&gt;Ready to get started? Check out the repository and give it a star if you find it useful. Your feedback and contributions are always welcome!&lt;br&gt;
&lt;a href="https://github.com/Tagada216/vue_3_boilerplate" rel="noopener noreferrer"&gt;https://github.com/Tagada216/vue_3_boilerplate&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>typescript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Clean Architecture for the Front-End</title>
      <dc:creator>Nicolas</dc:creator>
      <pubDate>Fri, 05 Apr 2024 13:50:26 +0000</pubDate>
      <link>https://dev.to/tagada216/clean-architecture-for-the-front-end-3ni4</link>
      <guid>https://dev.to/tagada216/clean-architecture-for-the-front-end-3ni4</guid>
      <description>&lt;h2&gt;
  
  
  🧽 Clean Architecture: Revolutionizing the Front-End
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Discover how Clean Architecture can transform and optimize front-end development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In an increasingly complex computing world, structuring your code effectively is crucial. It relies on the clear separation of an application's components, facilitating testing and reducing dependence on external tools. In this article, we will explore how Clean Architecture can transform your projects by examining its principles, structure, benefits, and its application to a front-end project.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Clean Architecture?
&lt;/h2&gt;

&lt;p&gt;Conceived by Robert C. Martin, this software design philosophy places the business concerns of the application at the center of attention. It organizes the code into concentric layers, each with a specific and independent role.&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%2Fc9ohamxjdcnljy195w19.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%2Fc9ohamxjdcnljy195w19.png" alt="Clean architecture schema"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source : &lt;a href="https://miro.medium.com/" rel="noopener noreferrer"&gt;https://miro.medium.com/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Clean Architecture - Divide and Conquer
&lt;/h3&gt;

&lt;p&gt;The primary goal of Clean Architecture is the separation of code into different layers, each with its own responsibility.&lt;/p&gt;

&lt;p&gt;Here are the elements that make up this methodical structure:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entities:&lt;/strong&gt; Also called the Domain, these are the central elements representing the business logic and rules of the application, independent and can be used by all layers of the application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt; They encapsulate all the specific business logic of the application and orchestrate the flow of data between the entities and the outer layers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interface Adapters:&lt;/strong&gt; Also called &lt;strong&gt;controllers&lt;/strong&gt;, &lt;strong&gt;presenters&lt;/strong&gt;, or &lt;strong&gt;gateways&lt;/strong&gt;, they convert data between the formats appropriate for the use cases and entities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Interfaces (UIs) and Frameworks &amp;amp; Drivers:&lt;/strong&gt; They manage interactions with external elements like user interfaces, databases, and external systems.&lt;/p&gt;




&lt;h3&gt;
  
  
  Adapting to the Front-End
&lt;/h3&gt;

&lt;p&gt;By adapting Clean Architecture to front-end development, we clarify the structure of the code. Entities define data models and business rules, use cases manage user interactions, interface adapters take care of the connection between the UI and the data, and the outer layer interacts with frameworks and external services. This well-defined organization facilitates the maintenance and evolution of front-end applications. Next, let's discover how this approach brings significant benefits to front-end development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean Architecture on the Front-End
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Benefits
&lt;/h3&gt;

&lt;p&gt;The benefits of Clean Architecture for the front-end are similar or identical to those for a back-end application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework Independence&lt;/strong&gt;: Frameworks are then used as tools rather than the other way around.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI Independence&lt;/strong&gt;: The architecture does not depend on the user interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database Independence&lt;/strong&gt;: It remains unattached to any specific database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Granularity of Tests&lt;/strong&gt;: It is easy to precisely target a layer/component for testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to this flexibility and increased maintainability, Clean Architecture is a very good choice for large-scale front-end applications.&lt;/p&gt;

&lt;p&gt;Implementing this type of architecture indeed incurs a higher cost at the beginning of the project, but the advantages of the method allow for quickly saving time in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Preparation for Implementation
&lt;/h3&gt;

&lt;p&gt;On the back-end side, business rules are fairly straightforward and often intuitive, representing the product's functionalities (creating an account, booking a book, making a payment, etc.). On the front-end side, it's not as evident because the domain (Entities) consists of display rules and the rendering behavior by a browser. Moreover, nothing is defined or conventionalized for the application of Clean Architecture on the Frontend: everything is modular and adaptable according to needs. A small application can very well use only two layers, such as the entities and the outermost layer.&lt;/p&gt;

&lt;p&gt;Let's take an example with a task management app. A user has expressed a need, which is translated by our Product Owner into a set of rules that define the steps when the user uses the application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Task Selection:&lt;/strong&gt; When a user clicks on a task to select it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the task is already selected, it should be deselected.&lt;/li&gt;
&lt;li&gt;Otherwise, it is marked as selected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Task Categorization:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a task is categorized as "to do immediately," it moves to the top of the list.&lt;/li&gt;
&lt;li&gt;If the task is marked "to do later," it is placed in a separate section.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Sub-task Management:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a main task is selected, all its associated sub-tasks appear.&lt;/li&gt;
&lt;li&gt;The user can select or deselect individual sub-tasks.&lt;/li&gt;
&lt;li&gt;If a main task is deselected, all its sub-tasks are also deselected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're observant, you can already discern a simple description of an algorithm taking shape. That is the domain.&lt;/p&gt;




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

&lt;p&gt;Let's revisit a simple task management application.&lt;/p&gt;

&lt;p&gt;Here is the structure of our application:&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%2F394dro6g9llc9i0keuyc.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%2F394dro6g9llc9i0keuyc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we apply the Clean Architecture model, here is what it would look like:&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%2Fmttkerja2fl41oa02vqq.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%2Fmttkerja2fl41oa02vqq.png" alt="Clean architecture model for Front End"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's proceed step by step, starting from the center of our architecture by defining our entity &lt;code&gt;Task.ts&lt;/code&gt;&lt;/p&gt;

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

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;TaskData&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;TaskData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;completed&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;Next, let's add an &lt;code&gt;adapter&lt;/code&gt; that allows us to use our entity. This adapter is very similar to services in a more conventional architecture.&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;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Task&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../entities/Task&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TaskService&lt;/span&gt; &lt;span class="o"&gt;=&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;fetchTasks&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://your-api-endpoint.com/tasks&lt;/span&gt;&lt;span class="dl"&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;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="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="na"&gt;taskData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;taskData&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Error fetching tasks:&lt;/span&gt;&lt;span class="dl"&gt;"&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="k"&gt;throw&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="p"&gt;},&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;addTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;taskData&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://your-api-endpoint.com/tasks&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;taskData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Task&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error adding task:&lt;/span&gt;&lt;span class="dl"&gt;'&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="k"&gt;throw&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="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;TaskService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;Between these two elements, we also need a use case that establishes the link between the entity and the adapter.&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;// ManageTasks.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Task&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../entities/Task&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;TaskService&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../adapters/TaskService&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ManageTasks&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;addTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;taskData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Task&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;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;TaskService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;taskData&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error adding task:&lt;/span&gt;&lt;span class="dl"&gt;'&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="k"&gt;throw&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="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;fetchAllTasks&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Task&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;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;TaskService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchAllTasks&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error fetching tasks:&lt;/span&gt;&lt;span class="dl"&gt;'&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="k"&gt;throw&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="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ManageTasks&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This allows us, finally, to add this logic into the Task List component, which acts as an adapter facilitating the connection between our internal layers and the Vue framework.&lt;/p&gt;

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

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;li&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;task in tasks&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;task.id&lt;/span&gt;&lt;span class="dl"&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="nx"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/li&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ul&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;onMounted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ManageTasks&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@/use_cases/ManageTasks&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Task&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@/entities/Task&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;onMounted&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="nf"&gt;loadTasks&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tasks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Task&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;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadTasks&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="nx"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ManageTasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchAllTasks&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Failed to load tasks:&lt;/span&gt;&lt;span class="dl"&gt;"&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="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;

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

&lt;/div&gt;




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

&lt;p&gt;The use of Clean Architecture in the front-end, as demonstrated in this example, highlights its numerous advantages.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Framework-Independent Layers:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Entities:&lt;/strong&gt; This core layer of the architecture contains business logic and data models. It is completely independent of Vue.js or any other framework, meaning the code here can be reused regardless of the front-end framework.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt; This layer manages application-specific logic and is also independent of Vue.js. It processes data and interactions without concern for how data is presented or how user inputs are received.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Interface Adapters:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This layer acts as a bridge between the framework-independent layers and Vue.js-specific layers. Here, we find components that link the external and internal layers. By isolating Vue.js-specific interactions in this layer, the rest of the application remains independent of the framework.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Frameworks &amp;amp; Drivers:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The outermost layer interacts directly with Vue.js. This includes Vue components and views, directives, filters, and other framework specifics. By concentrating all Vue.js-specific interactions in this outer layer, you reduce your business logic and use cases' dependency on the framework. This makes your application more flexible and easier to test, maintain, or even migrate to another framework if necessary.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following this structure, Clean Architecture enables the construction of front-end applications where the choice of framework (in this case, Vue.js) does not influence the business logic or the application's rules, offering greater flexibility and improved testability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀So, are you convinced, ready to take the step in your next front-end projects?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cleancode</category>
      <category>solidprinciples</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Adonis JS V6 — API REST Boilerplate</title>
      <dc:creator>Nicolas</dc:creator>
      <pubDate>Fri, 05 Apr 2024 07:40:05 +0000</pubDate>
      <link>https://dev.to/tagada216/adonis-js-v6-api-rest-boilerplate-9ae</link>
      <guid>https://dev.to/tagada216/adonis-js-v6-api-rest-boilerplate-9ae</guid>
      <description>&lt;h2&gt;
  
  
  Using an AdonisJS 6+ REST API boilerplate
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  👋 Hello,
&lt;/h2&gt;

&lt;p&gt;After wanting to create a Boilerplate REST API for all my projects, I discovered Adonis JS via &lt;a href="https://www.youtube.com/@BenjaminCode/videos"&gt;Benjamin Code&lt;/a&gt;, who had used it for the back-end of his SAAS.&lt;/p&gt;

&lt;p&gt;So I decided to create a boilerplate for AdonisJS V6, as there are some very good ones for NestJS.&lt;/p&gt;

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

&lt;p&gt;AdonisJS is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more.&lt;br&gt;
More information on this &lt;a href="https://adonisjs.com/guides/introduction"&gt;official presentation&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Adonis ?
&lt;/h2&gt;

&lt;p&gt;The abstraction offered by Adonis means you can quickly create and add new functionality.&lt;br&gt;
For example :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lucid ORM&lt;/li&gt;
&lt;li&gt;Auth&lt;/li&gt;
&lt;li&gt;Ally for Social Auth&lt;/li&gt;
&lt;li&gt;Mailer for email management&lt;/li&gt;
&lt;li&gt;etc…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adonis also lets you use commands to quickly create files (controllers, services, etc.) or launch migrations.&lt;/p&gt;

&lt;h2&gt;
  
  
  📋 Features
&lt;/h2&gt;

&lt;p&gt;For the moment, the project contains these functionalities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic authentification email and password&lt;/li&gt;
&lt;li&gt;Database configuration (PostgreSQL)&lt;/li&gt;
&lt;li&gt;Social authentification (Facebook and Google)&lt;/li&gt;
&lt;li&gt;Secure access via JWT Token&lt;/li&gt;
&lt;li&gt;Mail service (Active account, reset password)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💻Usage and Installation
&lt;/h2&gt;

&lt;p&gt;You can use the template directly from &lt;a href="https://github.com/Tagada216/adonisjs-boilerplate?tab=readme-ov-file"&gt;my repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After the installation&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All you need to do is add your environment variables to the .env file.&lt;/strong&gt;&lt;br&gt;
_&lt;br&gt;
I'll be writing more articles later on to talk about what's new and to go into more detail about the features._&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Enjoy !
&lt;/h2&gt;

</description>
      <category>adonisjs</category>
      <category>typescript</category>
      <category>api</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
