<?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: Obonguko</title>
    <description>The latest articles on DEV Community by Obonguko (@iobonguko).</description>
    <link>https://dev.to/iobonguko</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%2F366183%2F2e869e0e-8cc0-4bb0-be17-75be4ee2c838.jpg</url>
      <title>DEV Community: Obonguko</title>
      <link>https://dev.to/iobonguko</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iobonguko"/>
    <language>en</language>
    <item>
      <title>Scalability: What every business using the cloud needs to know</title>
      <dc:creator>Obonguko</dc:creator>
      <pubDate>Tue, 02 May 2023 10:48:32 +0000</pubDate>
      <link>https://dev.to/hackmamba/scalability-what-every-business-using-the-cloud-needs-to-know-54ci</link>
      <guid>https://dev.to/hackmamba/scalability-what-every-business-using-the-cloud-needs-to-know-54ci</guid>
      <description>&lt;p&gt;Scalability is an essential aspect of cloud computing, enabling businesses to grow and adapt to changing demands. As companies increasingly rely on cloud-based systems to manage their operations, ensuring the scalability of these systems becomes more critical than ever before.&lt;/p&gt;

&lt;p&gt;This article discusses the importance of scalability in cloud computing and provides actionable advice on how businesses can ensure that their cloud-based systems grow and adapt to meet changing needs. &lt;/p&gt;

&lt;p&gt;Topics such as designing scalable architecture, monitoring and optimizing cloud resources, planning for growth, handling sudden spikes in demand, and the benefits of choosing a managed solution are also covered.&lt;/p&gt;

&lt;p&gt;By the end of this article, you will have a better understanding of how to ensure scalability in your cloud-based systems, enabling your business to stay competitive in a rapidly evolving business environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding scalability in cloud computing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/hackmamba/how-to-plan-for-software-scalability-and-building-for-growth-2kle"&gt;Scalability&lt;/a&gt; in cloud computing refers to the ability to increase or decrease the resources of a cloud-based system, such as power, storage, or network capacity, to meet current user needs.&lt;/p&gt;

&lt;p&gt;The importance of scalability in cloud computing cannot be over-emphasized, as the scalability of one's cloud systems offers many benefits.&lt;/p&gt;

&lt;p&gt;Below are some of the benefits of having a scalable cloud system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cost efficient
&lt;/h3&gt;

&lt;p&gt;Having scalable cloud systems allows a business to consume only the computing resources required for a given application, which can be a huge money saver. Scalable cloud computing systems can also save companies money by eliminating the costs associated with physical hardware systems and IT personnel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Speed and flexibility
&lt;/h3&gt;

&lt;p&gt;Cloud scalability enables technological resources to react quickly as business demands change and expand, including unforeseen spikes in demand. Even smaller businesses now have access to powerful resources that were previously out of reach financially. Companies are now unrestricted by out-of-date machinery because they can easily update systems and boost resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  User acquisition and retention
&lt;/h3&gt;

&lt;p&gt;Customers hate to wait, be it for slow services or slow applications. If a product is slow and suffers from constant downtime, users are likelier to move to the more stable competitor. Building a product with scalable cloud systems can help a business acquire more users and retain existing customers, as it helps ensure that services remain available and reliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing scalable architecture
&lt;/h2&gt;

&lt;p&gt;A scalable architecture is essential for building cloud-based systems that accommodate increasing data, traffic, and user demand. A scalable architecture enables your cloud-based systems to handle growing workloads and ensure reliable performance without sacrificing efficiency or unnecessary costs. Here are some key considerations, patterns, and best practices for designing a scalable architecture for cloud-based systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Critical considerations for designing scalable architecture:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Decoupling:&lt;/strong&gt; A decoupled architecture allows you to separate components of your system into distinct, independent services, which can scale independently of each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributed computing:&lt;/strong&gt; Distributed computing enables you to distribute workloads across multiple servers, which can help you achieve better performance, reliability, and scalability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elasticity:&lt;/strong&gt; Elasticity is the ability to adjust resources dynamically based on demand. This means your system can add or remove resources to maintain consistent performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilience:&lt;/strong&gt; Resilience refers to the ability to maintain performance in the face of failure or unexpected changes. Resilient systems can handle faults and recover quickly from disruptions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Common scalability patterns and strategies:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Horizontal scaling:&lt;/strong&gt; Horizontal scaling involves adding more servers to your infrastructure to handle increased workloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sharding:&lt;/strong&gt; Sharding involves partitioning data across multiple servers to enable efficient processing and storage of large datasets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching:&lt;/strong&gt; Caching involves storing frequently accessed data in memory to reduce the need for repeated access to disk-based storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Asynchronous processing:&lt;/strong&gt; Asynchronous processing allows you to process tasks in the background without blocking the main thread, which can help you achieve better performance and scalability.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Best practices for designing a scalable architecture for cloud-based systems:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use stateless components:&lt;/strong&gt; Stateless components enable you to scale more efficiently by allowing you to spin up multiple instances of the same component without worrying about state management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use cloud-native technologies:&lt;/strong&gt; Cloud-native technologies are explicitly designed for cloud-based systems and can help you take advantage of the scalability, resilience, and efficiency benefits of cloud computing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation:&lt;/strong&gt; Automation can help you scale your infrastructure more efficiently by automating deployment, configuration, and scaling tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan for failure:&lt;/strong&gt; Plan for failure by designing your system to handle faults and disruptions gracefully. This can help you maintain performance and avoid downtime during unexpected failures.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Monitoring and optimizing cloud resources
&lt;/h2&gt;

&lt;p&gt;Monitoring and optimizing cloud resources is critical for ensuring that your applications perform optimally, control costs, and maintain scalability. In this context, monitoring refers to continuously monitoring cloud resources to detect performance issues and potential bottlenecks in the infrastructure. In contrast, optimization refers to adjusting cloud resources to improve their efficiency and scalability.&lt;/p&gt;

&lt;p&gt;The importance of monitoring cloud resources cannot be overstated. By monitoring cloud resources, you can detect and diagnose problems early, allowing you to address them before they escalate into significant issues. Key metrics essential to monitor for scalability include CPU utilization, network traffic, memory usage, and disk usage. These metrics can provide valuable insights into your cloud infrastructure's performance and identify potential issues before they impact your applications and users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Techniques for optimizing cloud resources for scalability include:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Right-sizing resources:&lt;/strong&gt; This involves analyzing your cloud resources and determining whether they are over- or under-provisioned. Right-sizing your resources can help you reduce costs, improve performance, and ensure scalability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load balancing:&lt;/strong&gt; Load balancing distributes network traffic across multiple servers, ensuring that no single server is overloaded. This can help you improve the scalability and availability of your applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autoscaling:&lt;/strong&gt; Autoscaling is the process of automatically adding or removing cloud resources based on changes in demand. This can help ensure your applications can always handle increased traffic without incurring unnecessary costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-native architecture:&lt;/strong&gt; Cloud-native architecture involves building applications specifically for cloud environments. This can help you ensure that your applications are optimized for cloud resources and can scale efficiently.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Planning for growth and handling sudden spikes in demand
&lt;/h2&gt;

&lt;p&gt;Your cloud-based systems must scale effectively and respond to changes in demand. Therefore, you must plan for expansion and deal with unexpected spikes in demand. Whereas handling unexpected surges in demand necessitates the capacity to dynamically modify resources to maintain performance and availability, planning for growth entails predicting future needs and structuring your cloud architecture to support them. Here are some techniques for addressing abrupt surges in demand and preparing for expansion in cloud-based systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importance of planning for growth:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Avoiding performance issues:&lt;/strong&gt; Planning for growth helps ensure that your infrastructure can handle increased workloads without degrading performance or experiencing downtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controlling costs:&lt;/strong&gt; Planning for growth enables you to scale your infrastructure efficiently, avoiding unnecessary expenses and optimizing resource utilization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meeting user expectations:&lt;/strong&gt; Planning for growth helps you ensure that your applications can deliver the performance and availability that users expect, even as demand grows.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Strategies for scaling up or down resources based on demand:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Capacity planning&lt;/strong&gt;: Planning for capacity entails anticipating future resource requirements and allocating resources appropriately. Instead of waiting for demand to manifest, capacity planning lets you expand your infrastructure for future needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autoscaling&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right-sizing resources&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Techniques such as autoscaling, load balancing, and caching help handle sudden spikes in demand for computing resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using a managed cloud solution: Appwrite
&lt;/h2&gt;

&lt;p&gt;Choosing a managed solution for cloud scalability offers several benefits over self-managed solutions. A managed solution is a cloud computing service operated by a third-party provider who handles the maintenance, monitoring, and scaling of the infrastructure on behalf of the customer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite&lt;/a&gt; is a robust backend-as-a-service (BaaS) platform that makes development easy, secure, and scalable. It offers developers an easy-to-use API and the flexibility to customize their backend infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/cloud/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;The Appwrite-managed cloud infrastructure&lt;/a&gt; makes it easier for developers to build and deploy their applications without worrying about server maintenance or deployment infrastructure. Some of the benefits of Appwrite cloud include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto Scaling:&lt;/strong&gt; The enhanced scalability of Appwrite cloud enables developers to handle growing traffic automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Economical:&lt;/strong&gt; Appwrite is a cost-effective alternative for companies of all sizes because you only pay for the resources you utilize.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in Security:&lt;/strong&gt; Appwrite was created with security in mind and provides features like DDoS protection, data encryption, multi-factor authentication, layers of firewall, and others to keep your data secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community:&lt;/strong&gt; By using Appwrite, you'll have access to a developer community that uses the platform to create scalable and effective apps. Our community frequently acts as a learning resource, a forum for idea sharing, and a source of feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Appwrite cloud service provides rapid and secure development and deployment of applications. Although currently in private beta, you can &lt;a href="https://appwrite.io/cloud/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;sign up here&lt;/a&gt; to receive access to this service.&lt;/p&gt;

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

&lt;p&gt;Cloud scalability is paramount to businesses in today’s digital landscape. The ability to scale up or down resources in real time helps organizations meet changing demands and maintain optimal performance. It also enables businesses to expand their operations while minimizing costs and reducing the risk of downtime.&lt;/p&gt;

&lt;p&gt;By prioritizing scalability in their cloud-based systems, businesses can remain competitive and meet the demands of their customers. With careful planning, proper implementation, and continuous monitoring, organizations can ensure that their cloud infrastructure can scale to meet their growing needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/private-beta?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Private Beta&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Minimize Time To Market: Ways To Accelerate Product Development</title>
      <dc:creator>Obonguko</dc:creator>
      <pubDate>Wed, 18 Jan 2023 06:23:05 +0000</pubDate>
      <link>https://dev.to/hackmamba/minimize-time-to-market-ways-to-accelerate-product-development-20kg</link>
      <guid>https://dev.to/hackmamba/minimize-time-to-market-ways-to-accelerate-product-development-20kg</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The speed at which a product is developed and made available for sale, also known as the &lt;a href="https://en.wikipedia.org/wiki/Time_to_market" rel="noopener noreferrer"&gt;Time to market&lt;/a&gt;, is an essential factor for businesses to consider. A shorter time to market means that a company can get its product out to customers faster, giving them a competitive advantage. On the other hand, a shorter time to market can also result in underdeveloped products that miss out on opportunities and cause lost revenue.&lt;/p&gt;

&lt;p&gt;Finding a balance between customer demands and building vastly secure and scalable products and services can take time for a business enterprise.&lt;/p&gt;

&lt;p&gt;For instance, software engineers could spend weeks or months architecting the perfect authentication and database/storage systems, but guess what? Your customers are less concerned about how you solved their issue and care more about getting a working product as soon as possible.&lt;/p&gt;

&lt;p&gt;This puts much more pressure on the business as customers switch to using the competition.&lt;/p&gt;

&lt;p&gt;But what if it didn't have to be the case? What if there was a way to have the most secure and scalable system while churning out customer-demanded features faster, thereby keeping your customers happy?&lt;/p&gt;

&lt;p&gt;In this article, you'll learn several ways to accelerate product development by minimizing the "Time To Market" (TTM).&lt;/p&gt;

&lt;h2&gt;
  
  
  Importance of TTM in Product Development
&lt;/h2&gt;

&lt;p&gt;There are several reasons why minimizing time to market is essential in product development, a few of them include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Staying ahead of the competition&lt;/li&gt;
&lt;li&gt;Save more money&lt;/li&gt;
&lt;li&gt;Improving customer satisfaction&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Staying Ahead of the Competition
&lt;/h3&gt;

&lt;p&gt;First, reducing TTM can help a company stay ahead of the competition. Getting your product to market quickly is vital in a constantly evolving market. By doing so, you can capture a larger market share before your competitors can release their products.&lt;/p&gt;

&lt;h3&gt;
  
  
  Save More Money
&lt;/h3&gt;

&lt;p&gt;Second, minimizing TTM can also help a company save money. The longer it takes to develop a product, the more resources will be required. This includes not just the cost of development but also the opportunity cost of not being able to sell the product. By reducing TTM, a company can minimize these costs and increase its profitability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improving Customer Satisfaction
&lt;/h3&gt;

&lt;p&gt;Finally, minimizing TTM can also improve customer satisfaction. Customers want products to be available as soon as possible, and a longer TTM can lead to frustration and disappointment. By reducing TTM, a company can ensure that they are doing all they can to meet the needs and expectations of their customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Reduce your Product's TTM
&lt;/h2&gt;

&lt;p&gt;There are several ways to reduce the time to market your product. Here are a few strategies you can consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Streamline the product development process&lt;/li&gt;
&lt;li&gt;Prioritize essential features&lt;/li&gt;
&lt;li&gt;Utilize prototyping&lt;/li&gt;
&lt;li&gt;Automate everything&lt;/li&gt;
&lt;li&gt;Invest in the right tools and technologies&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Streamline the Product Development Process
&lt;/h3&gt;

&lt;p&gt;Look for ways to streamline and simplify your product development process. This can include using &lt;a href="https://en.wikipedia.org/wiki/Agile_software_development" rel="noopener noreferrer"&gt;agile development methodologies&lt;/a&gt;, automating specific tasks, or eliminating unnecessary steps. &lt;/p&gt;

&lt;p&gt;Agile development is a set of principles and practices focused on rapid iteration and continuous delivery. By using agile methods, a company can get feedback on their product early and often, which can help them make necessary changes more quickly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prioritize Essential Features
&lt;/h3&gt;

&lt;p&gt;Reducing TTM often involves making trade-offs and prioritizing the most critical features of a product. By focusing on the essential features, a company can get a &lt;a href="https://dev.to/hackmamba/cost-efficient-ways-to-roll-out-your-mvps-and-prototypes-4n27"&gt;minimum viable product&lt;/a&gt; to market faster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Utilize Prototyping
&lt;/h3&gt;

&lt;p&gt;Prototyping can help you test and refine your product before it goes to market. This can help you identify and fix any issues early on, saving time and resources in the long run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automate Everything
&lt;/h3&gt;

&lt;p&gt;Automating repetitive processes can help you eliminate human errors, forgotten deadlines, and wrong versions of critical information that would otherwise have slowed down the time to market for your product.&lt;/p&gt;

&lt;h3&gt;
  
  
  Invest in the Right Tools and Technologies
&lt;/h3&gt;

&lt;p&gt;Using the right tools and technologies can help speed up the development process. For example, a platform like Appwrite can help you build and deploy your product more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed Up TTM with Appwrite
&lt;/h2&gt;

&lt;p&gt;Appwrite is a robust platform that can help accelerate your product development. With a range of tools and features designed to streamline the development process, Appwrite can help you reduce your product's time to market.&lt;/p&gt;

&lt;p&gt;One of the key benefits of Appwrite is its API-first design. This means you can easily integrate Appwrite into your existing workflow and build on its API to create a customized solution that meets your specific needs. This can save you time and resources compared to building everything from scratch.&lt;/p&gt;

&lt;p&gt;Appwrite also offers a range of features that can help you speed up the development process. For example, its user management system allows you to quickly and easily create and manage user accounts, while its file storage system makes it easy to store and manage your product's data.&lt;/p&gt;

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

&lt;p&gt;Minimizing time to market is crucial for the success of any product. By streamlining the development process, collaborating with partners, utilizing prototyping, and investing in the right tools and technologies, you can reduce your product's Time To Market.&lt;/p&gt;

&lt;p&gt;You can learn how to integrate &lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog" rel="noopener noreferrer"&gt;Appwrite&lt;/a&gt; into your new or existing products from the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-web" rel="noopener noreferrer"&gt;Getting started for Web&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-flutter" rel="noopener noreferrer"&gt;Getting started for Flutter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-apple" rel="noopener noreferrer"&gt;Getting started for Apple&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-android" rel="noopener noreferrer"&gt;Getting started for Android&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-server" rel="noopener noreferrer"&gt;Getting started for servers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>testing</category>
      <category>tooling</category>
    </item>
    <item>
      <title>How to Collect Documentation Statistics in Vuepress</title>
      <dc:creator>Obonguko</dc:creator>
      <pubDate>Thu, 17 Nov 2022 14:31:49 +0000</pubDate>
      <link>https://dev.to/hackmamba/how-to-collect-documentation-statistics-in-vuepress-57p7</link>
      <guid>https://dev.to/hackmamba/how-to-collect-documentation-statistics-in-vuepress-57p7</guid>
      <description>&lt;p&gt;Collecting user statistics on documentation sites can help creators understand common user behaviors, giving them more information to make decisions and create better experiences. &lt;/p&gt;

&lt;p&gt;In this article, we'll learn how to use Appwrite and Vuepress to collect and store the following data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Likes (when a reader clicks a like button)&lt;/li&gt;
&lt;li&gt;Views (when a reader views the page)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can find the finished code for this article on GitHub &lt;a href="https://github.com/codiini/appwrite-vuepress-stats" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Working knowledge of Javascript and Vue.js&lt;/li&gt;
&lt;li&gt;Docker &lt;a href="https://www.docker.com/get-started/" rel="noopener noreferrer"&gt;installation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;An Appwrite instance; check out this &lt;a href="https://dev.to/hackmamba/create-a-local-appwrite-instance-in-3-steps-19n9?utm_source=hackmamba&amp;amp;utm_medium=hackmamba"&gt;article&lt;/a&gt; on how to set up an instance locally or via a one-click install on &lt;a href="https://marketplace.digitalocean.com/apps/appwrite" rel="noopener noreferrer"&gt;DigitalOcean&lt;/a&gt; or &lt;a href="https://gitpod.io/#https://github.com/appwrite/integration-for-gitpod" rel="noopener noreferrer"&gt;Gitpod&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installing Vuepress
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://vuepress.vuejs.org/" rel="noopener noreferrer"&gt;Vuepress&lt;/a&gt; is a minimalistic static site generator with a Vue-powered theming system and a default theme that has been optimized for writing technical documentation.&lt;/p&gt;

&lt;p&gt;We'll need to create a Vuepress starter project by navigating to the desired directory and running the command below in our terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-vuepress-site appwrite-stats &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;appwrite-stats
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command will create a project called &lt;code&gt;appwrite-stats&lt;/code&gt; which will interactively ask a series of questions that will be used to build our site's metadata. Let’s answer them accordingly.&lt;br&gt;
Once it’s done creating the project, the second command will navigate into the project directory.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666445513106_screenshot.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666445513106_screenshot.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the installation completes, let's run the following command in the terminal:&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="nb"&gt;cd &lt;/span&gt;docs &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command navigates into the &lt;code&gt;docs&lt;/code&gt; folder - which Vuepress creates during installation - installs all of the required dependencies, and then runs the build server at &lt;code&gt;[http://localhost:8080](http://localhost:8080/)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When we visit &lt;code&gt;http://localhost:8080&lt;/code&gt;  on our browser, we should see the following screen:&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666446579301_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666446579301_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Appwrite
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog" rel="noopener noreferrer"&gt;Appwrite&lt;/a&gt; is an open-source end-to-end back-end server solution that enables developers to build applications faster.&lt;/p&gt;

&lt;p&gt;To use Appwrite in our Vuepress application, we'll need to install the Appwrite SDK for web applications.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;/appwrite-stats/docs&lt;/code&gt; directory on our terminal, let's run the command below to install the Appwrite SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;appwrite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, let's create a &lt;code&gt;utils&lt;/code&gt; folder, and in it, we'll add an &lt;code&gt;index.js&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Databases&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;appwrite&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;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API_ENDPOINT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PROJECT_ID&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;database&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Databases&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't worry about the dummy values, we will fill them in later sections of this tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up an Appwrite Database
&lt;/h2&gt;

&lt;p&gt;First, let's ensure that the Docker desktop is running our local Appwrite instance:&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666454236478_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666454236478_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the Appwrite instance is verified, let's go ahead to open &lt;code&gt;localhost:80&lt;/code&gt; (our specified port during Appwrite installation) in the browser to sign into Appwrite's console:&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666454049444_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666454049444_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the console, click the &lt;strong&gt;Create Project&lt;/strong&gt; button, enter &lt;code&gt;appwrite-stats&lt;/code&gt; as the name, and click on &lt;strong&gt;Create.&lt;/strong&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666454518060_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666454518060_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;On the Settings tab of the Home page of our newly created project, let's take note of our &lt;strong&gt;Project ID&lt;/strong&gt; and &lt;strong&gt;API Endpoint&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666481524382_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666481524382_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an Appwrite Collection and Attributes
&lt;/h2&gt;

&lt;p&gt;On the left side of the Appwrite &lt;a href="http://localhost/console" rel="noopener noreferrer"&gt;Console&lt;/a&gt; dashboard, click on the &lt;strong&gt;Database&lt;/strong&gt; tab. Click on the &lt;strong&gt;Add Database&lt;/strong&gt; button to create a new database. Creating a new database will lead us to the &lt;strong&gt;Collection&lt;/strong&gt; page.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666481596113_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666481596113_image.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666481296178_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666481296178_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we'll create a collection in our database tab by clicking the &lt;strong&gt;Add Collection&lt;/strong&gt; button. After creating a &lt;strong&gt;Collection&lt;/strong&gt;, go to the &lt;strong&gt;Permissions&lt;/strong&gt; section on the &lt;strong&gt;Settings&lt;/strong&gt; page. We want to assign &lt;strong&gt;Read&lt;/strong&gt; &lt;strong&gt;and Update&lt;/strong&gt; &lt;strong&gt;Access&lt;/strong&gt; with a &lt;strong&gt;Role&lt;/strong&gt; value of &lt;code&gt;any&lt;/code&gt;. We can customize these roles later to specify who has access to our database. We'll click on &lt;strong&gt;Update&lt;/strong&gt; to save our changes.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482839690_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482839690_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, let's go to the &lt;strong&gt;Attributes&lt;/strong&gt; tab on our collection to create the properties we want our document to have:&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482116946_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482116946_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's create integer attributes of &lt;strong&gt;viewsCount&lt;/strong&gt; and &lt;strong&gt;likesCount&lt;/strong&gt; and set their default values to zero.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482131393_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482131393_image.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating an Appwrite Document
&lt;/h2&gt;

&lt;p&gt;After creating the attributes, let's head to the &lt;strong&gt;Documents&lt;/strong&gt; tab of our database.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482457375_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482457375_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the &lt;strong&gt;Add Document&lt;/strong&gt; button to create a new document.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482515211_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482515211_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We had already specified default values of zero for our attributes earlier, so we can click the &lt;strong&gt;Create&lt;/strong&gt; button to create the document.&lt;/p&gt;

&lt;p&gt;Let's also note and copy our &lt;strong&gt;Document ID&lt;/strong&gt;, &lt;strong&gt;Collection ID&lt;/strong&gt;, and &lt;strong&gt;Database ID&lt;/strong&gt;, which we'll use to perform functions to update the values depending on the user action.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482579353_image.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666482579353_image.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Building Components in Vuepress
&lt;/h2&gt;

&lt;p&gt;Vuepress pages are written primarily in markdown format; however, being built with Vue.js, Vuepress lets us create and embed Vue.js components in our markdown pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building a Likes Component&lt;/strong&gt;&lt;br&gt;
We'll build a "likes" component on our site's pages.&lt;br&gt;
Users could click on the component to like a specific page and view the page's total number of likes.&lt;/p&gt;

&lt;p&gt;To get started, let's navigate to the &lt;code&gt;/src/.vuepress/components&lt;/code&gt; folder in our project directory, create a file named &lt;code&gt;likes-component.vue&lt;/code&gt;, and paste in the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"like-container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"likePage"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt;
                    &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt;
                    &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
                    &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"30"&lt;/span&gt;
                    &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"30"&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M0 0H24V24H0z"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt;
                        &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M12.001 4.529c2.349-2.109 5.979-2.039 8.242.228 2.262 2.268 2.34 5.88.236 8.236l-8.48 8.492-8.478-8.492c-2.104-2.356-2.025-5.974.236-8.236 2.265-2.264 5.888-2.34 8.244-.228zm6.826 1.641c-1.5-1.502-3.92-1.563-5.49-.153l-1.335 1.198-1.336-1.197c-1.575-1.412-3.99-1.35-5.494.154-1.49 1.49-1.565 3.875-.192 5.451L12 18.654l7.02-7.03c1.374-1.577 1.299-3.959-.193-5.454z"&lt;/span&gt;
                    &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;numberOfLikes&lt;/span&gt; &lt;span class="si"&gt;}}&lt;/span&gt; likes&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&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;database&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;../../utils/index.js&lt;/span&gt;&lt;span class="dl"&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="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&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;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;numberOfLikes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&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="nf"&gt;mounted&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="nf"&gt;getLikesCount&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;methods&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;likePage&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;numberOfLikes&lt;/span&gt;&lt;span class="o"&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;await&lt;/span&gt; &lt;span class="nx"&gt;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[DATABASE_ID]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[COLLECTION_ID]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[DOCUMENT_ID]&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="na"&gt;likesCount&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;numberOfLikes&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;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLikesCount&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;log&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="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;getLikesCount&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;let&lt;/span&gt; &lt;span class="nx"&gt;promise&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;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listDocuments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[DATABASE_ID]&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[COLLECTION_ID]&lt;/span&gt;&lt;span class="dl"&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;numberOfLikes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;likesCount&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;log&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="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.like-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code snippet above does the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Imports the created &lt;code&gt;database&lt;/code&gt; instance from the &lt;code&gt;/utils/index.js&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;getLikes&lt;/code&gt; method gets invoked during the page load using the mounted lifecycle hook, the method gets invoked; the total number of existing likes is fetched from our Appwrite database and assigned to the &lt;code&gt;numberOfLikes&lt;/code&gt; data variable.&lt;/li&gt;
&lt;li&gt;When a user clicks on the button, the &lt;code&gt;@click= "likePage"&lt;/code&gt; event handler invokes the &lt;code&gt;likePage&lt;/code&gt; method, increments the number of likes, and stores the data on our database. Once done, the &lt;code&gt;getLikesCount&lt;/code&gt; method gets invoked to get the current number of likes and store it in the &lt;code&gt;numberOfLikes&lt;/code&gt; variable so that when a user refreshes the page, the data persists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Building a Number-of-Views Component&lt;/strong&gt;&lt;br&gt;
We'll build a &lt;code&gt;views-count&lt;/code&gt; component on our site's pages. Users can see the total number of page views a particular page has.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;/src/.vuepress/components&lt;/code&gt;, create a &lt;code&gt;views-component.vue&lt;/code&gt; file, and paste in the following code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;   &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"views-container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;numberOfViews&lt;/span&gt; &lt;span class="si"&gt;}}&lt;/span&gt; Views&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&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;database&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;../../utils/index.js&lt;/span&gt;&lt;span class="dl"&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="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&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;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;numberOfViews&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&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="nf"&gt;mounted&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="nf"&gt;addToViewCount&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;methods&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;addToViewCount&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="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getViewCount&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;numberOfViews&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[DATABASE_ID]&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[COLLECTION_ID]&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[DOCUMENT_ID]&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="na"&gt;viewsCount&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;numberOfViews&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;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;log&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="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;getViewCount&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;let&lt;/span&gt; &lt;span class="nx"&gt;promise&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;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listDocuments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[DATABASE_ID]&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[COLLECTION_ID]&lt;/span&gt;&lt;span class="dl"&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;numberOfViews&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;viewsCount&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;log&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="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.views-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's analyze what the code snippet above does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It creates an HTML template with a &lt;code&gt;p&lt;/code&gt; tag that displays the number of views.&lt;/li&gt;
&lt;li&gt;It imports our Appwrite database instance from the &lt;code&gt;../../utils/index.js&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;As their naming suggests, these two methods: &lt;code&gt;getViewCount&lt;/code&gt; and &lt;code&gt;addToViewCount&lt;/code&gt;, get the total number of page views and increment the total number of page views from our Appwrite database.&lt;/li&gt;
&lt;li&gt;When the page first loads, using the &lt;code&gt;mounted&lt;/code&gt; lifecycle hook, the &lt;code&gt;addToViewCount&lt;/code&gt; method invokes the &lt;code&gt;getViewCount&lt;/code&gt; method, and the total number of existing views is fetched from our Appwrite database and assigned to the &lt;code&gt;numberOfViews&lt;/code&gt; data variable. Once that's done, the &lt;code&gt;numberOfViews&lt;/code&gt; variable is incremented by one and then stored on our Appwrite database.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using the Components in Our Markdown Files
&lt;/h2&gt;

&lt;p&gt;Now, we've finished creating our components and can use them on any of our desired pages.&lt;/p&gt;

&lt;p&gt;Let's use it in the &lt;code&gt;using-vue.md&lt;/code&gt; file located in the &lt;code&gt;/src/guide&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;At the bottom of the page, we’ll add the following code snippet:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...
### Enjoyed this page? Give it a like:
&amp;lt;likes-component/&amp;gt;
### This page has:
&amp;lt;views-component/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;On the browser, let's go to the &lt;code&gt;http://localhost:8080/guide/using-vue.html&lt;/code&gt; page. Let's see the result of what we've got so far:&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666523583968_appwrite-vuepress.gif" 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%2Fpaper-attachments.dropboxusercontent.com%2Fs_BD585D9827E87A436280BCA15038D6B95810DFC96430BF07554E3C1AEC9C09BF_1666523583968_appwrite-vuepress.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see, when we click the &lt;strong&gt;like&lt;/strong&gt; button, it increments the count, and when we leave to another page and back, the number of page views also increases.&lt;/p&gt;

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

&lt;p&gt;This article discussed how to use Appwrite's database functionality and, more importantly, how to collect documentation statistics using Vuepress.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hackmamba/create-a-local-appwrite-instance-in-3-steps-19n9"&gt;Creating an Appwrite instance in 3 steps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/client/databases?sdk=web-default" rel="noopener noreferrer"&gt;Appwrite's web documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vuepress.vuejs.org/" rel="noopener noreferrer"&gt;Vuepress documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vue</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>My Goals for Joining HNG i8</title>
      <dc:creator>Obonguko</dc:creator>
      <pubDate>Mon, 16 Aug 2021 05:56:03 +0000</pubDate>
      <link>https://dev.to/iobonguko/my-goals-for-joining-hng-i8-kab</link>
      <guid>https://dev.to/iobonguko/my-goals-for-joining-hng-i8-kab</guid>
      <description>&lt;p&gt;My name is &lt;a href="https://iniubongobonguko.com"&gt;Iniubong Obonguko&lt;/a&gt;, a Frontend developer and a Technical writer proficient in HTML, CSS, Javascript and Vue js.&lt;/p&gt;

&lt;p&gt;I'm currently enrolled in the &lt;a href="https://internship.zuri.team"&gt;HNG i8 Internship&lt;/a&gt; which is a program designed to level up those who have learnt how to code or design but have no real world experience. This program simulates the real world tech work experience by teaching teamwork, working with deadlines and grit among other valuable real world skills.&lt;/p&gt;

&lt;p&gt;I got excited when I saw that applications for this year's batch had been opened up as I was enrolled in the last year's cohort but didn't make it to the final stage due to a bunch of factors beyond my control.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Goals for Joining this year are:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Build my Network&lt;/strong&gt;: In the real world, your network is your networt.This is why making new friends in this program is key, because I'd get to work alongside people I wouldn't get to meet on my own and maybe leverage on their own network as they leverage on mine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn to work in a Team&lt;/strong&gt;: I've never really done a lot of work in a team scenario before so working with a lot of people would give me a chance to work on building that part of skillset as this is a norm in the real world.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Have Fun&lt;/strong&gt;:Life doesn't have to be serious all the time, which is why part of my goals is just to have fun while being enrolled in this internship.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Land better Roles&lt;/strong&gt;: I joined this internship with the aim of finishing and at the end become better at what I currently do.&lt;br&gt;
I hope to land better roles at the end of this because I believe strongly that after this internship my skills would definitely better.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links to Resources for Beginners
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=RGOj5yH7evk"&gt;Git/Github&lt;/a&gt; by Freecodecamp.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=jS4aFq5-91M"&gt;Javscript Tutorial&lt;/a&gt; by FreecodeCamp&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=1MbQaYCCzzI"&gt;UI/UX&lt;/a&gt; by Zuri Team.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=_Jb2fnEFOm0"&gt;HTML/CSS&lt;/a&gt; by Zuri Team.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
