<?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: Oliver Juhl</title>
    <description>The latest articles on DEV Community by Oliver Juhl (@owjuhl).</description>
    <link>https://dev.to/owjuhl</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%2F700182%2F1e3fa78d-1777-4521-84fe-87bb43655534.jpeg</url>
      <title>DEV Community: Oliver Juhl</title>
      <link>https://dev.to/owjuhl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/owjuhl"/>
    <language>en</language>
    <item>
      <title>Designing a Git-Like Flow in Ecommerce APIs</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Thu, 26 Jan 2023 12:26:21 +0000</pubDate>
      <link>https://dev.to/medusajs/designing-a-git-like-flow-in-ecommerce-apis-2ade</link>
      <guid>https://dev.to/medusajs/designing-a-git-like-flow-in-ecommerce-apis-2ade</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/medusajs/medusa"&gt;Medusa’s&lt;/a&gt; Order API supports order editing capabilities that equip merchants and developers with the tooling necessary to reduce manual work and offer a great customer experience.&lt;/p&gt;

&lt;p&gt;Designing this seemingly simple functionality proved to be a complex task that was solved with inspiration from the world's most-used developer tools.&lt;/p&gt;

&lt;p&gt;This article covers how we adopted principles from the Git version control system and GitHub in our Order Editing API design. You can read the product announcement &lt;a href="https://medusajs.com/blog/order-edits-announcement/"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Order Editing
&lt;/h2&gt;

&lt;p&gt;Before going over the design behind this feature, we need to understand its constraints. Let’s dive into what it means to edit an order in Medusa.&lt;/p&gt;

&lt;p&gt;When an order is placed, it is in its base state from a customer and store administrator point of view. Generally, the next steps for orders from here are fulfillment, shipping, and payment capturing.&lt;/p&gt;

&lt;p&gt;Sometimes a change in the order might be required first. Several scenarios could lead to this; the customer changed their mind about their purchase, the inventory management system was out of sync with the physical stock, or the merchant wants to add a complimentary item due to long processing time.&lt;/p&gt;

&lt;p&gt;A naive solution would allow store administrators to modify order items directly. However, this could have serious consequences. Order history is lost or becomes misleading, potential unresolved payment discrepancies arise, and stale order data remain in integrated services, such as analytics providers.&lt;/p&gt;

&lt;p&gt;Aside from ensuring data consistency in your underlying dependencies, you also want to offer a good customer experience. Instead of changing things directly, you want to give customers full control and confidence by allowing them to confirm a change before it is completed. Supporting these cases spawns the need to introduce an intermediate pending step for the edits you make to an order.&lt;/p&gt;

&lt;p&gt;It should be clear that editing an order is not as straightforward as updating the quantity of a line item. There are many use cases and dependencies to consider to ensure data is consistent across all systems in your stack and that customers get the best experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an API with git-like flow of events
&lt;/h2&gt;

&lt;p&gt;As we started to plan the feature, it became apparent that we were building a subset of the functionality from a version control system with a pull request-like mechanism for editing an order.&lt;/p&gt;

&lt;p&gt;The goal was to allow users to change the original state of their order with an approval-staged flow without losing its history. A Git-like system with the management capabilities offered by GitHub.&lt;/p&gt;

&lt;p&gt;We were excited to realize that a developer-centric pattern from our daily work could directly apply to our API design.&lt;/p&gt;

&lt;p&gt;We can see the following resemblance between the order-editing flow and a git-like system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Order placed → Main branch&lt;/li&gt;
&lt;li&gt;Store administrator initiates an order edit → Branches out from main&lt;/li&gt;
&lt;li&gt;Store administrator makes changes to order edit → Pushes commits to branch&lt;/li&gt;
&lt;li&gt;Store administrator submits an order edit → Opens a pull request to main&lt;/li&gt;
&lt;li&gt;Customer confirms an order edit → Reviewer approves the pull request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We even extended the capabilities of the API with additional functionality as a result of using the Git + GitHub analogy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store administrator force completes an order edit → Core maintainer force merges a pull request&lt;/li&gt;
&lt;li&gt;Customer requests an additional item → Reviewer requests changes to the pull request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our feature had a functional requirement of having an intermediate step between initializing the edit and committing the changes. In this state, you can create multiple edits to the order without applying them. This is similar to pushing commits to a branch while a feature is in work-in-progress, except we only allow one commit for each order edit. More on that later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design
&lt;/h3&gt;

&lt;p&gt;Now let’s turn to implementation specifics to see how the analogy took shape in our data layer. &lt;/p&gt;

&lt;p&gt;There are two database models worth highlighting: &lt;code&gt;OrderEdit&lt;/code&gt; and &lt;code&gt;OrderItemChange&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// order-edit.ts

OrderEdit
- id
- order
- changes
- internal_note
- items

// order-item-change.ts

OrderItemChange
- id
- original_line_item
- line_item
- type (add, remove, update)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only properties relevant to the Git analogy are included above. If you wish to explore the models more in-depth, you can find them &lt;a href="https://docs.medusajs.com/references/entities/classes/OrderEdit"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;OrderEdit&lt;/code&gt; model holds the modifications you want to make to your order. It references the original order, stores an internal note, and contains a list of edits. When an &lt;code&gt;OrderEdit&lt;/code&gt; is created, all items from the Order are copied to the &lt;code&gt;OrderEdit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The edits are represented as one or more &lt;code&gt;OrderItemChange&lt;/code&gt; records. There are three types of changes: Add, Remove and Update. The purpose of each should be clear. When an edit is created, we store a copy of the original item to ensure full visibility of the history when these changes are eventually applied.&lt;/p&gt;

&lt;p&gt;You might have already drawn the parallels to Git. The above data modeling is comparable to how branches, staged changes, and commits work. The &lt;code&gt;OrderEdit&lt;/code&gt; is your branch diverging from the main one, and the &lt;code&gt;OrderItemChange&lt;/code&gt; records are your staged changes ready to be pushed.&lt;/p&gt;

&lt;p&gt;Together, they constitute the commit with a message and hold the information capable of showing a diff of the changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations to the analogy
&lt;/h3&gt;

&lt;p&gt;Not all aspects of a traditional version control system apply to our feature. Whereas Git is excellent at facilitating seamless collaboration among an indefinite number of users, our feature is limited to one active order edit at a time. Only one branch aside from the main one.&lt;/p&gt;

&lt;p&gt;This is to guard businesses against unwanted situations arising from multiple ongoing edits and outbound payment links. An example would be that customers accidentally pay for the wrong order edit. We built the logic to eliminate potential merge conflicts.&lt;/p&gt;

&lt;p&gt;And finally, we don’t offer a way for merchants to roll back the changes when first committed. The changes made to an Order are irreversible. No &lt;code&gt;git revert&lt;/code&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Enough talking. Let’s see it in action.&lt;/p&gt;





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

&lt;p&gt;Designing our Order Editing API was especially exciting, as it allowed us to apply existing concepts from our daily work to solve a problem for our users. The API we built provides a great developer experience by using familiar concepts while abstracting away the complexity for our merchants in the admin system.&lt;/p&gt;

&lt;p&gt;For concrete API examples of the full order editing flow, see our how-to documentations on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.medusajs.com/references/entities/classes/OrderEdit"&gt;Edit an order as an administrator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.medusajs.com/advanced/storefront/handle-order-edits"&gt;Implement order-editing on the storefront&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>January 2023 - A glimpse into our roadmap</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Tue, 17 Jan 2023 14:43:03 +0000</pubDate>
      <link>https://dev.to/medusajs/a-glimpse-into-our-2023-roadmap-21oj</link>
      <guid>https://dev.to/medusajs/a-glimpse-into-our-2023-roadmap-21oj</guid>
      <description>&lt;p&gt;For 2023, our main mission at &lt;a href="https://github.com/medusajs/medusa" rel="noopener noreferrer"&gt;Medusa&lt;/a&gt; is to ensure our platform provides more extensibility and composability. So, our roadmap contains features that push our platform towards these goals.&lt;/p&gt;

&lt;p&gt;Although we have many features planned out for 2023, this article focuses on features our team has already started on and are guaranteed to be shipped in the upcoming quarters.&lt;/p&gt;

&lt;p&gt;Keep reading to learn about what’s in store for future versions of Medusa.&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning our Roadmap
&lt;/h2&gt;

&lt;p&gt;At Medusa, we strive to implement high quality and advanced features for ecommerce businesses interested in the platform. We have a broad vision of the features that we want to implement, and the direction we want Medusa to move into.&lt;/p&gt;

&lt;p&gt;This is reflected in our &lt;a href="https://github.com/medusajs/medusa/discussions/categories/roadmap" rel="noopener noreferrer"&gt;Roadmap&lt;/a&gt;. We constantly revisit and make additions to our roadmap to match our vision of the platform. The features in this article are only a subset of the features we are planning to implement in Medusa.&lt;/p&gt;

&lt;p&gt;Aside from the roadmap, we’re introducing Rewind Weeks at Medusa in 2023. These will allow us to shed light on the features we shipped in a quarter, along with projects and tools that our team has built to further improve Medusa. We’ll share more details on this later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Select Features From Our 2023 Roadmap
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Multi-Warehouse API
&lt;/h3&gt;

&lt;p&gt;As businesses expand into new markets and open physical stores, supply chains and logistics become much more complex. Without the right tools to manage the many moving parts, orders can get lost, and stock issues start to pile up. &lt;/p&gt;

&lt;p&gt;Medusa already enables great integrations with OMS and IMS systems. But we are now adding a more sophisticated inventory layer that allows Medusa to support businesses with multiple distribution centers or retail stores natively.&lt;/p&gt;

&lt;p&gt;Merchants can manage inventory across locations within Medusa and connect locations to sales channels to control stock availability.  Furthermore, we will introduce allocations to ensure safety stock and avoid overselling. This will give merchants a clear picture of their inventory at any given point. &lt;/p&gt;

&lt;p&gt;The new feature will enable a wide range of new experiences for customers, such as buy-online-pick-up-in-store or reserve-online-try-in-store flows. Developers will also get an excellent new API that can be used to optimize fulfillment, build POS experiences, and further push the boundaries of what can be done within digital commerce.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  &lt;strong&gt;Payment Processor API&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of Medusa’s core strengths is its composable architecture, which allows integrating it with the best-in-breed tools that accelerate ecommerce growth.&lt;/p&gt;

&lt;p&gt;From the beginning, offering the best payment option to your customers at any time has been a core feature of Medusa. Medusa already allows merchants to attach as many payment processors — such as Stripe, PayPal, and Klarna — as they want and, with powerful multi-regional logic, control which options are shown to the customer at checkout.&lt;/p&gt;

&lt;p&gt;With our new Payment Processor API, we will unlock even more capabilities and make it easier for plugin developers to create integrations with payment processors worldwide.&lt;/p&gt;

&lt;p&gt;Simultaneously, the new Payment Processor API will enable better support for RMA flows requiring payments. We recently released Order Editing, which allows merchants to modify orders after they have been placed.&lt;/p&gt;

&lt;p&gt;Edits can result in discrepancies between the order total and paid total, and with the new Payment Processor API, we are making it simpler to collect payments for differences.&lt;/p&gt;

&lt;h3&gt;
  
  
  Nested Categories
&lt;/h3&gt;

&lt;p&gt;Medusa currently allows merchants to organize their products by Collections to be used in storefronts or for internal business logic. For example, they can be used for controlling whether discounts can be applied to a group of products.&lt;/p&gt;

&lt;p&gt;In the near future, we will introduce an additional way to manage your product hierarchy and create better experiences for your customers. Nested Categories will allow you to define category hierarchies like Women’s &amp;gt; Bottoms &amp;gt; Skirts to better organize product navigation on storefronts.&lt;/p&gt;

&lt;p&gt;Furthermore, adding the same product to multiple categories will be possible, enabling better merchandising functionality right within the Medusa dashboard.&lt;/p&gt;

&lt;p&gt;As always with Medusa, you own your data and can extend and customize the behavior of our APIs. This is also the case with Nested Categories, enabling developers to create enhanced search and browsing experiences while adding a new, powerful reporting dimension to your product catalog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful4re69v7utlcsek3n99.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful4re69v7utlcsek3n99.png" alt="https://user-images.githubusercontent.com/5105988/209083628-bc28d3eb-23a0-44a1-beb3-438c60511160.png" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;EventBus Modules&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Medusa emits hundreds of events that plugins use to send transactional emails, automate tedious tasks, and reliably integrate systems in your stack. &lt;/p&gt;

&lt;p&gt;The existing event system uses Redis with BullMQ to enable Pub/Sub functionality. Many larger Medusa implementations will, however, already have an event architecture in place.&lt;/p&gt;

&lt;p&gt;With the new EventBus Modules, it will be possible to integrate your existing events architecture directly into Medusa.&lt;/p&gt;

&lt;p&gt;This will enable new EventBus providers like RabbitMQ, Kafka, or Amazon SQS, and improve Medusa’s compatibility with microservice architectures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automated API specs and typing
&lt;/h3&gt;

&lt;p&gt;Medusa’s API reference is automated to ensure that the documentation is always up-to-date with the core API. As part of our dedication to &lt;a href="https://medusajs.com/blog/how-we-improved-our-documentation/" rel="noopener noreferrer"&gt;improving our documentation&lt;/a&gt;, we are enhancing how we document the API with code and simultaneously creating new automations to generate our client library.&lt;/p&gt;

&lt;p&gt;This will remove inconsistencies between server logic, documentation, and client library support. &lt;/p&gt;

&lt;p&gt;We will, furthermore, be able to eliminate the current dependency on &lt;code&gt;@medusajs/medusa&lt;/code&gt; in our client library, which will help reduce the bundle size of storefront implementations. &lt;/p&gt;

&lt;h3&gt;
  
  
  Medusa Admin extensibility
&lt;/h3&gt;

&lt;p&gt;One of Medusa’s principles is to build strong defaults that make it quick and easy to get started, and simultaneously offer a fantastic developer experience that enables customizations and extensions to make Medusa your bespoke commerce engine.&lt;/p&gt;

&lt;p&gt;We have followed that principle diligently in our backend implementations until now. But our Admin dashboard has long been more locked and harder to customize. We are prioritizing changing that very soon.&lt;/p&gt;

&lt;p&gt;Our first step will be to move our admin dashboard to an NPM package that can spin up with your Medusa server. This will improve the developer experience when building with Medusa, as you will no longer have to clone the admin project, merge updates, or start it separately from your Medusa server.&lt;/p&gt;

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

&lt;p&gt;Additionally, we will follow semantic versioning of the admin package to avoid version mismatches between the admin application and the core medusa package.&lt;/p&gt;

&lt;p&gt;The next step hereafter will open up extension areas in the admin dashboard to add custom UI elements like buttons, cards, or entire pages. Custom elements can be created in your local project or shipped with plugins to package server and admin functionality easily.&lt;/p&gt;

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

&lt;p&gt;As mentioned earlier, this Roadmap overview includes only the features we started implementing. There are more upcoming features and enhancements in our Roadmap, which you can check out in our &lt;a href="https://github.com/medusajs/medusa/discussions/categories/roadmap" rel="noopener noreferrer"&gt;GitHub Discussions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What features are you excited for? And what features do you think we should include in our Roadmap?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Should you have any issues or questions related to Medusa, then feel free to reach out to the Medusa team via &lt;a href="https://discord.gg/F87eGuwkTp" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>What's new? - Medusa v1.2</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Mon, 28 Feb 2022 17:27:57 +0000</pubDate>
      <link>https://dev.to/medusajs/whats-new-v12-2fdp</link>
      <guid>https://dev.to/medusajs/whats-new-v12-2fdp</guid>
      <description>&lt;p&gt;Features and fixes included in the release of v.1.2 of &lt;a href="https://github.com/medusajs/medusa"&gt;Medusa&lt;/a&gt; and &lt;a href="https://github.com/medusajs/admin"&gt;Medusa Admin&lt;/a&gt;. The larger issues/tickets built in this release will be highlighted with a small detailed description.&lt;/p&gt;

&lt;p&gt;For the full changelog see, go &lt;a href="https://www.medusajs.com/post/whats-new-in-medusa-1-2"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Release highlights
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tax API
&lt;/h3&gt;

&lt;p&gt;The Tax API allows you to configure your store to charge taxes from your customers to be in compliance with tax regulations in the markets you operate in. Tax regulations differ a lot across countries so Medusa’s tax system gives you a number of possibilities for configuring your taxes to ensure that you charge your customers the correct amount of tax.&lt;/p&gt;

&lt;p&gt;You configure taxes on a region-basis meaning you can use different tax settings based on where customers are shopping from. Each region may use one of two tax modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automatic Taxes&lt;/strong&gt; &lt;br&gt;
Tax totals are computed automatically on every cart update and retrieval. This is the default tax mode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Manual Taxes&lt;/strong&gt;&lt;br&gt;
Tax totals have to be manually computed by calling &lt;code&gt;POST /store/carts/:id/taxes&lt;/code&gt;. This mode is more appropriate for tax configurations that use a plugin that calls 3rd party APIs. By using manual tax calculations you avoid 3rd party calls as part of the usual retrieval of carts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The process for computing the tax total is the same regardless of the mode used. The steps taken are outlined in the figure below&lt;/p&gt;

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

&lt;p&gt;A more elaborate walkthrough of the Tax API will soon be published to our documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strategies
&lt;/h3&gt;

&lt;p&gt;The new strategy pattern allows you to override core logic in Medusa in cases where such overrides are necessary. For example, if a merchant wants to apply custom logic when generating line items in a cart; a strategy can be overridden to accommodate this. Check out the first two implementations of the strategy pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/medusajs/medusa/blob/master/packages/medusa/src/strategies/tax-calculation.ts"&gt;TaxCalculationStrategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/medusajs/medusa/blob/master/packages/medusa/src/strategies/cart-completion.ts"&gt;CartCompletionStrategy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CustomerGroup
&lt;/h3&gt;

&lt;p&gt;This release introduces a notion of a CustomerGroup, which is the first element of our Promotions API. The feature allows you to group customers together and will play a key part in adding more advanced promotions, since you will be able to define discounts for entire customer groups ultimately allowing you to support VIP segments, wholesale customers, and much more.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;CustomerGroup
- &lt;span class="nb"&gt;id&lt;/span&gt;: string
- name: string
- customers: Customer[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read our &lt;a href="https://github.com/medusajs/medusa/discussions/1037"&gt;discussion on the Promotions API&lt;/a&gt; and feel free to pitch in with feedback and / or input.&lt;/p&gt;

&lt;h3&gt;
  
  
  Global search
&lt;/h3&gt;

&lt;p&gt;Global search has been added to Medusa Admin meaning that you will be able to search for Discounts, Orders, Customers, and GiftCards from anywhere in your admin system. The feature is the ultimate productivity booster for store managers and customer service by allowing you to navigate to an order with as little as three clicks; 1) open search (with keyboard shortcuts), 2) paste order number, 3) press enter. &lt;/p&gt;

&lt;p&gt;Check out a small gif below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M8i_Pcbd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fgft2lvth1gs4f4p1ppe.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M8i_Pcbd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fgft2lvth1gs4f4p1ppe.gif" alt="global-search-gif" width="880" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add error handler in &lt;code&gt;atomicPhase_&lt;/code&gt; to allow clean up when transactions fail
&lt;/h3&gt;

&lt;p&gt;Introduce a new way of gracefully handling errors in our atomic phases by adding an error handler param to the &lt;code&gt;atomicPhase_&lt;/code&gt;. The case to solve for is when work is performed within a transaction, but the transactions fail and cleanup is needed. &lt;/p&gt;

&lt;p&gt;Read more about the feature and what is solved for in the &lt;a href="https://github.com/medusajs/medusa/pull/1104"&gt;pull request&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;Introducing customer groups was the first step towards building the Promotions API, and the focus next will be to refactor our discount rules to be much more advanced, such that you can create discounts per product type, tag and collection as well as customer groups. &lt;/p&gt;

&lt;p&gt;Additionally, the MoneyAmount entity will be extended to allow for advanced pricelists meaning you will be able to define variant prices per customer, add a MoneyAmount type, and more.&lt;/p&gt;

&lt;p&gt;Stay tuned on our &lt;a href="https://discord.com/invite/medusajs"&gt;Discord&lt;/a&gt; or via our &lt;a href="https://www.medusajs.com/"&gt;webpage&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>Building an open-source extendable dashboard in Gatsby</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Mon, 20 Dec 2021 17:52:12 +0000</pubDate>
      <link>https://dev.to/medusajs/building-an-open-source-extendable-dashboard-in-gatsby-2e0a</link>
      <guid>https://dev.to/medusajs/building-an-open-source-extendable-dashboard-in-gatsby-2e0a</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;At &lt;a href="https://github.com/medusajs/medusa" rel="noopener noreferrer"&gt;Medusa&lt;/a&gt;, we’ve recently started rethinking our &lt;a href="https://github.com/medusajs/admin" rel="noopener noreferrer"&gt;admin&lt;/a&gt;. We strive to create the best possible developer experience, but when it comes to the admin system, user experience is just as important - and we’ve been slightly neglective of that. This is about to change.&lt;/p&gt;

&lt;p&gt;The first cut of the sod towards a better and more user-friendly admin system is a complete design revamp. The revamp will not only include a better and visually enhanced user interface, but also a new styling framework. We’ve started the work last week and expect to release a new and improved Medusa Admin in late January. Let’s have a look at what’s in store.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Facelift&lt;/strong&gt;&lt;br&gt;
The biggest item on the agenda is undoubtedly a complete makeover of the admin user interface. We’ve recently onboarded our new Head of Design, Ludvig, who’s gonna rebuild the design from scratch. We are gonna keep all current workflows and domain structures intact and only focus on improving the look and feel.&lt;/p&gt;

&lt;p&gt;Here’s a small sneak peek:&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%2Fnnmoudqqh44domvl076o.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%2Fnnmoudqqh44domvl076o.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TailwindCSS&lt;/strong&gt;&lt;br&gt;
Up until now, we’ve been using the combination of Rebass and Emotion to build and style our components, but this is also about to change. We’ve spent quite some time investigating the many different options out there and have chosen to go with TailwindCSS. This is due to the fact, that Tailwind is a highly adapted framework with a huge community behind it, guaranteeing us future support and opening up for potentially more community contributions to Medusa Admin. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React hooks&lt;/strong&gt;&lt;br&gt;
As part of the latest release, we introduced &lt;code&gt;medusa-react&lt;/code&gt;; a new React library providing a set of hooks (among other things) for interacting seamlessly with a Medusa backend. The hooks currently support our Store API but will very soon include the Admin API as well. We will integrate this set of hooks into the revamped version of Medusa Admin, which will fix a lot of smaller issues in our current API consumption and improve the developer experience by being more intuitive and easy to use. &lt;/p&gt;

&lt;p&gt;See WIP &lt;a href="https://github.com/medusajs/medusa/tree/master/packages/medusa-react" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Versioning&lt;/strong&gt;&lt;br&gt;
The current process for having an up-to-date admin system is quite cumbersome. It requires you to pull the upstream changes from our project into your cloned repository. To allow for a more seamless workflow, we will add a new way of versioning your admin system. Going forward, we will ship Medusa Admin as a Gatsby theme, and the admin project that is created for you (unless you choose to clone) will be a barebones Gatsby project with said theme installed. This allows you to incorporate new changes by simply upgrading your Medusa Admin Gatsby theme.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extendability&lt;/strong&gt;&lt;br&gt;
As part of shipping Medusa Admin as a Gatsby theme, we are able to provide you with a range of new theming tools to customize and improve your own admin project. One of the more important concepts in the toolbox is Component Shadowing, which allows you to override components in the core admin project thereby making it possible to extend pages and components with custom logic and UI. &lt;/p&gt;

&lt;p&gt;See example &lt;a href="https://github.com/olivermrbl/admin-extended-example" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are very excited about this new and improved Medusa Admin and are looking forward to presenting it to you all in January - you can sign up for the PH launch of it &lt;a href="https://www.producthunt.com/upcoming/medusa-3" rel="noopener noreferrer"&gt;here&lt;/a&gt;. If you have questions or suggestions, you are more than welcome to reach out to us in &lt;a href="https://discord.gg/y6s5QggZBT" rel="noopener noreferrer"&gt;our community&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>gatsby</category>
    </item>
    <item>
      <title>Open-source Node.js commerce engine for Strapi</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Mon, 15 Nov 2021 15:04:12 +0000</pubDate>
      <link>https://dev.to/medusajs/open-source-nodejs-commerce-engine-for-strapi-259p</link>
      <guid>https://dev.to/medusajs/open-source-nodejs-commerce-engine-for-strapi-259p</guid>
      <description>&lt;p&gt;Use &lt;a href="https://github.com/medusajs/medusa"&gt;Medusa&lt;/a&gt; and &lt;a href="https://github.com/strapi/strapi"&gt;Strapi&lt;/a&gt; to power your commerce setup for a full open-source headless solution. In recent years, it has become increasingly popular to go with a headless approach when building ecommerce, blogs, portfolios, and the likes. Among many benefits, you get improved performance, more customizability, and support to scale as your business grows. &lt;/p&gt;

&lt;p&gt;A headless system is essentially a decoupling of presentational layers and backend. It cuts off the traditional proprietary frontend displaying your content (hence the name), and instead gives you Rest APIs, you can consume from whatever system, client, or service you would like.&lt;/p&gt;

&lt;p&gt;Going with the headless approach when building your setup will provide you with a modular system with best-in-breed services within each specific area of your stack; CMS, ecommerce, etc. This is in contrast to how you would traditionally choose a monolithic platform that partly (or hardly) caters to all of your needs.&lt;/p&gt;

&lt;p&gt;This article will guide you through setting up a headless ecommerce setup in which content is managed by &lt;a href="http://strapi.io"&gt;Strapi&lt;/a&gt; and the ecommerce is powered by &lt;a href="https://github.com/medusajs/medusa"&gt;Medusa&lt;/a&gt; - on a 100% open-source stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Medusa, and why Strapi?
&lt;/h2&gt;

&lt;p&gt;The bottleneck of headless ecommerce systems is most often the amount of resources it requires to both get started and to maintain. You need backend developers to handle your infrastructure and integrations and frontend developers to build the customer experience. This is one of the reasons many existing headless solutions target enterprise businesses. To allow for small to mid-sized businesses to enter the space, one must cater to the developer experience. If the onboarding, setup, and implementation process are all easy to approach, you no longer need a team of ten to build a scalable ecommerce setup. &lt;/p&gt;

&lt;p&gt;Strapi and Medusa are two systems built primarily for developers and the combination of the two enables you to build an ecommerce store with a blazingly fast, content-rich frontend and a highly extendable backend.&lt;/p&gt;

&lt;p&gt;Both projects are open-source, headless, and built with Node.js. They use a very similar architecture for plugins and customizations, that gives you the ability to extend your commerce and CMS to fit exactly your needs. Let's now dive into the installation and setup of the two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;The following guide for setting up the plugin assumes, that you are familiar with both Strapi and Medusa. If this is not the case, visit the official &lt;a href="https://docs.medusajs.com/tutorial/set-up-your-development-environment/"&gt;Medusa&lt;/a&gt; and &lt;a href="https://strapi.io/documentation/developer-docs/latest/getting-started/introduction.html"&gt;Strapi&lt;/a&gt; documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up Medusa
&lt;/h3&gt;

&lt;p&gt;First, create a Medusa project using your favorite package manager. You can go about this in two ways:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;npx&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;npx create-medusa-app&lt;/code&gt;  will allow you to create a Medusa store engine, a storefront, and Medusa admin in a single command&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;# using npx&lt;/span&gt;
npx create-medusa-app

&lt;span class="c"&gt;# using yarn&lt;/span&gt;
yarn create medusa-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;When choosing &lt;code&gt;npx&lt;/code&gt; you are shown different store engine options as part of the setup. For this Strapi tutorial, you should choose &lt;code&gt;medusa-starter-default&lt;/code&gt;. Optionally, pick a storefront.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;medusa-cli&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;@medusajs/medusa-cli&lt;/code&gt; is our Command Line Tool for creating the Medusa store engine (alongside many other powerful commands). Use it as such:&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;# using yarn&lt;/span&gt;
yarn global add @medusajs/medusa-cli

&lt;span class="c"&gt;# using npm&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @medusajs/medusa-cli

&lt;span class="c"&gt;# initialise a Medusa project&lt;/span&gt;
medusa new my-medusa-store
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Medusa uses Redis for emitting events in the system, so ensure, that this is installed and running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ redis-cli
127.0.0.1:6379&amp;gt; ping
PONG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in &lt;code&gt;medusa-config.js&lt;/code&gt; you should enable it. Your project config in the bottom of the file should look similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;projectConfig: &lt;span class="o"&gt;{&lt;/span&gt;
  redis_url: REDIS_URL,
  database_database: &lt;span class="s2"&gt;"./medusa-db.sql"&lt;/span&gt;,
  database_type: &lt;span class="s2"&gt;"sqlite"&lt;/span&gt;,
  store_cors: STORE_CORS,
  admin_cors: ADMIN_CORS,
&lt;span class="o"&gt;}&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Additionally, add Strapi to your list of plugins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;resolve:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;`medusa-plugin-strapi`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;options:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;strapi_medusa_user:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'medusa_user'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;strapi_medusa_password:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'medusaPassword&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;strapi_url:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mf"&gt;127.0&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;strapi_port:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;1337&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, install the plugin using your package manager:&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;#using yarn&lt;/span&gt;
yarn add medusa-plugin-strapi

&lt;span class="c"&gt;# using npm&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;medusa-plugin-strapi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You've now successfully installed and configured your Medusa store engine. Seed it with data and start it up by running:&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;# using npm&lt;/span&gt;
npm run seed &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm start

&lt;span class="c"&gt;# using yarn&lt;/span&gt;
yarn seed &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; yarn start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We'll now turn to the Strapi side of things.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up Strapi
&lt;/h3&gt;

&lt;p&gt;Similar to how you installed Medusa, you can install Strapi using your favorite package manager. Use the &lt;code&gt;strapi-medusa-template&lt;/code&gt; to create your project. The template is a custom Strapi implementation required for the two systems to work together.&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;# using npx&lt;/span&gt;
npx create-strapi-app strapi-medusa &lt;span class="nt"&gt;--template&lt;/span&gt; https://github.com/Deathwish98/strapi-medusa-template.git

&lt;span class="c"&gt;# using yarn&lt;/span&gt;
yarn create strapi-app strapi-medusa &lt;span class="nt"&gt;--template&lt;/span&gt; https://github.com/Deathwish98/strapi-medusa-template.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running the command, you have a full Strapi project configured to synchronize with Medusa. Upon the initial start of the Strapi server, all the required models will be created. They will correlate with models from Medusa to allow for two-way synchronization. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: The Strapi template starter uses SQLite as the default database. There is a known bug related to &lt;code&gt;knex.js&lt;/code&gt; that comes from multiple write connections. Restarting the Strapi server should make the error disappear.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Synchronization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The power of using Strapi with Medusa comes from two-way synchronization. Strapi allows you to enrich your products with extra fields and data, such that you can perfect the customer experience. But for the products to appear in Strapi, you are required to create them in Medusa. For the commerce logic in your presentational layer to function properly, you need the Medusa IDs of products and variants. This is used for operations like adding to cart and going through the checkout flow.&lt;/p&gt;

&lt;p&gt;When products are created in Medusa, the two-way communication ensures that data is kept consistent between the two systems. Though only some fields are synchronized and those are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Product&lt;/strong&gt;: title, subtitle, description, handle&lt;br&gt;
&lt;strong&gt;Variants&lt;/strong&gt;: title&lt;br&gt;
&lt;strong&gt;Region&lt;/strong&gt;: name&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Further down the road, the support for synchronizing more entities is expected to be introduced&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Using Postgres in Medusa (optional)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For Postgres to function, you need to create a local database. One way of doing this would be to use your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;createdb&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;medusa-store&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Depending on what system you are on and how your local Postgres is configured, the above command might fail. In that case, please investigate the correct way to create a local database on your pc.&lt;/p&gt;

&lt;p&gt;Navigate to your newly created Medusa project (&lt;code&gt;&amp;lt;project name&amp;gt;/backend&lt;/code&gt; if you used &lt;code&gt;npx&lt;/code&gt;). In &lt;code&gt;medusa-config.js&lt;/code&gt;, ensure that you have Redis and Postgres enabled. The project configurations at the bottom of the file should look similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;projectConfig: &lt;span class="o"&gt;{&lt;/span&gt;
  redis_url: REDIS_URL,
  database_url: DATABASE_URL,
  database_type: &lt;span class="s2"&gt;"postgres"&lt;/span&gt;,
  store_cors: STORE_CORS,
  admin_cors: ADMIN_CORS,
&lt;span class="o"&gt;}&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: the &lt;code&gt;DATABASE_URL&lt;/code&gt; variable should use the Postgres database created in the previous step&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Summary and next steps
&lt;/h2&gt;

&lt;p&gt;You are now provided with the toolbox for creating amazing digital commerce experiences on top of a highly extendable CMS system and ecommerce platform. &lt;/p&gt;

&lt;p&gt;To quickly get started, see our starters for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/medusajs/gatsby-starter-medusa"&gt;GatsbyJS&lt;/a&gt; (much more feature-rich V2 coming soon)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/medusajs/nextjs-starter-medusa"&gt;NextJS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A big thanks to community member Pawan Sharma (&lt;a href="https://github.com/Deathwish98"&gt;Deathwish98&lt;/a&gt;) for leading the implementation of this integration with Strapi. If you want to be part of the Medusa community, feel free to join us on our &lt;a href="https://discord.gg/F87eGuwkTp"&gt;Discord channel&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>headless</category>
    </item>
    <item>
      <title>Composable commerce: Switch parts of your stack in seconds</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Fri, 12 Nov 2021 14:27:54 +0000</pubDate>
      <link>https://dev.to/medusajs/composable-commerce-switch-parts-of-your-stack-in-seconds-4880</link>
      <guid>https://dev.to/medusajs/composable-commerce-switch-parts-of-your-stack-in-seconds-4880</guid>
      <description>&lt;p&gt;We recently launched our sophisticated &lt;a href="https://github.com/medusajs/medusa"&gt;Medusa&lt;/a&gt; Search API. It allows you to add a blazingly fast product search to your ecommerce setup, improving the overall customer experience and your conversion rates.&lt;/p&gt;

&lt;p&gt;From a developer perspective, the Search API unifies communication between Medusa and search engines thereby allowing you to switch between different engines in seconds with only a couple of lines of code. So far, Medusa has only supported product search using MeiliSearch, but we can now proudly present a plugin for Algolia - one of the giants.&lt;/p&gt;

&lt;p&gt;The purpose of this article is to show you how to install and configure Algolia for your Medusa store. Additionally, we'll showcase the powerful Search API by guiding you through changing from one search engine to another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create an account on Algolia and grab your Application ID and Admin API Key from the settings panel. &lt;/p&gt;

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

&lt;p&gt;In your Medusa project, install the plugin using your favourite package manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="nx"&gt;medusa&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;plugin&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;algolia&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;canary&lt;/span&gt;

&lt;span class="c1"&gt;// or&lt;/span&gt;

&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="nx"&gt;medusa&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;plugin&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;algolia&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;canary&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your &lt;code&gt;medusa-config.js&lt;/code&gt; add the integration to the array of plugins with the following settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;plugins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="c1"&gt;// ...other plugins&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`medusa-plugin-algolia`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;application_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your-application-id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;admin_api_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your-admin-api-key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;products&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;searchableAttributes&lt;/span&gt;&lt;span class="p"&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;title&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;description&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;attributesToRetrieve&lt;/span&gt;&lt;span class="p"&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;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;title&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;description&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;handle&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;thumbnail&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;variants&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;variant_sku&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;options&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_title&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_handle&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;images&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above config, you've provided the id and key from Algolia alongside a couple of settings, that define the properties you can search for and the values you'll get in return. &lt;/p&gt;

&lt;p&gt;And that's all! You've now enabled Algolia for your Medusa store engine. The plugin will make sure to synchronize products from Medusa to Algolia upon updating, deleting, or creating new ones. Now all you need to do is to restart your server. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article will not go too much into depth about how the search functionality works under the hood when querying the API. We refer to the &lt;a href="https://www.medusajs.com/post/meilisearch-and-medusa"&gt;previous article on MeiliSearch&lt;/a&gt; if this is of your interest. In there, you will find a quick showcase using Postman as well as a thorough walkthrough of how you can display the results in your storefront using ReactJS (GatsbyJS). &lt;/p&gt;

&lt;p&gt;Instead, to illustrate the power of our Search API and search engine plugins, we'll switch out a MeiliSearch plugin with our new Algolia plugin in a store with existing products. Upon restarting the server with the new configuration, your products will automatically be fed into Algolia and the search functionality in your frontend will remain unchanged. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ifvou16J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbx68mh2p81mw0miqrr4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ifvou16J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbx68mh2p81mw0miqrr4.gif" alt="MeiliSearch to Algolia" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As mentioned in our post on MeiliSearch, we'll soon publish an article with a thorough walkthrough of our Search API. Until then, you should consider adding blazingly fast product search with one of our plugins to allow for your commerce business to grow to the next level.&lt;/p&gt;

&lt;p&gt;Many thanks to community member Rolwin for building the plugin. If you want to be part of the Medusa community, feel free to join us on our &lt;a href="https://discord.gg/F87eGuwkTp"&gt;Discord channel&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Good first issues for Hacktoberfest</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Thu, 07 Oct 2021 16:37:14 +0000</pubDate>
      <link>https://dev.to/medusajs/good-first-issues-for-hacktoberfest-1c68</link>
      <guid>https://dev.to/medusajs/good-first-issues-for-hacktoberfest-1c68</guid>
      <description>&lt;p&gt;As mentioned in our &lt;a href="https://dev.to/medusajs/medusa-hacktoberfest-2021-13eb"&gt;previous article&lt;/a&gt;, &lt;a href="https://github.com/medusajs/medusa"&gt;Medusa&lt;/a&gt; is participating in Hacktoberfest for the first time this year and the excitement is high. &lt;/p&gt;

&lt;h4&gt;
  
  
  Getting started
&lt;/h4&gt;

&lt;p&gt;There are loads of issues out there for developers to pick up, but it's not always easy to figure out where to start. We've made a series of good first issues that includes both a video tutorial and a checklist, such that you can easily get started building in public.&lt;/p&gt;

&lt;h4&gt;
  
  
  API fixture generation
&lt;/h4&gt;

&lt;p&gt;The issues chosen for the series deal with API fixture generation. Currently, our fixtures are all stored within the same file, which is suboptimal due to 1) loading large files on the client (our API reference) is bad for performance and user experience and 2) referencing a single fixture in such a large file requires us to look for a &lt;em&gt;needle in a haystack&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;The goal is to split each fixture into their own dedicated file making them lightweight and easy to reference.&lt;/p&gt;

&lt;p&gt;The issues can be found filtering on label &lt;code&gt;api-fixture&lt;/code&gt;, or use &lt;a href="https://github.com/medusajs/medusa/issues?q=is%3Aopen+is%3Aissue+label%3Aapi-fixture"&gt;this link&lt;/a&gt; for easy access.&lt;/p&gt;

&lt;h4&gt;
  
  
  How-to
&lt;/h4&gt;

&lt;p&gt;To easily get started use the following checklist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;checkout &lt;code&gt;docs/api&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;branch out to &lt;code&gt;docs/api-[ns]-[endpoint]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;if necessary clear dist and run &lt;code&gt;yarn bootstrap&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;cd &lt;code&gt;integration-tests/docs&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn &amp;amp;&amp;amp; yarn build&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;medusa-dev --scan-once&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;__tests__/[ns].js&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Import from &lt;code&gt;../test-input/[ns]/[endpoint]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add test to the &lt;code&gt;toTest&lt;/code&gt; array&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn test --watch __tests__/[ns].js -t [operationId]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Make changes&lt;/li&gt;
&lt;li&gt;Make sure that snapshots are correctly defined so that tests pass across two runs&lt;/li&gt;
&lt;li&gt;Only add the fixtures and test changes related to your generated fixtures&lt;/li&gt;
&lt;li&gt;Push and open PR against &lt;code&gt;docs/api&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, you can watch &lt;a href="https://www.loom.com/share/230b0c3ec59144bebbfa7029d31fd1fb"&gt;this video tutorial&lt;/a&gt; &lt;br&gt;
explaining the hows and whys narrated by co-founder Sebastian.&lt;/p&gt;

&lt;p&gt;If you encounter issues, reach out to the community on &lt;a href="https://discord.gg/MvfArDW6f4"&gt;Discord&lt;/a&gt; or submit them to our &lt;a href="https://github.com/medusajs/medusa"&gt;Github&lt;/a&gt; issue board.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>hacktoberfest</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Deploying Medusa on Qovery for a 100% open-source ecommerce stack</title>
      <dc:creator>Oliver Juhl</dc:creator>
      <pubDate>Wed, 06 Oct 2021 14:03:24 +0000</pubDate>
      <link>https://dev.to/medusajs/deploying-medusa-on-qovery-for-a-100-open-source-ecommerce-stack-phe</link>
      <guid>https://dev.to/medusajs/deploying-medusa-on-qovery-for-a-100-open-source-ecommerce-stack-phe</guid>
      <description>&lt;p&gt;This is a guide for deploying a &lt;a href="https://www.medusajs.com/"&gt;Medusa&lt;/a&gt; project to &lt;a href="https://www.qovery.com"&gt;Qovery&lt;/a&gt;. Qovery is a Continuous Deployment Platform, that provides you with the developer experience of Heroku on top of your cloud provider (e.g. AWS, DigitalOcean).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is assumed, that you are currently running a local instance of Medusa. If not, check out our &lt;a href="https://github.com/medusajs/medusa#-quickstart"&gt;Quickstart&lt;/a&gt; or use &lt;code&gt;npx create-medusa-app&lt;/code&gt; to set up your application in a matter of minutes. For the latter, see &lt;a href="https://docs.medusajs.com/how-to/create-medusa-app/"&gt;this guide&lt;/a&gt; for a small walkthrough.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  1. Qovery Console
&lt;/h3&gt;

&lt;p&gt;Create an account on &lt;a href="https://console.qovery.com/login"&gt;Qovery&lt;/a&gt; on their free community plan and jump into the console.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Setup
&lt;/h3&gt;

&lt;p&gt;Create a project and an environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Add your Medusa app
&lt;/h3&gt;

&lt;p&gt;Add a new app to your Qovery environment and connect the Git repository that holds your Medusa project. In your application settings, set the port to 9000 unless something else is specified in your setup.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you used our &lt;code&gt;npx&lt;/code&gt; starter, your repository will most likely hold all components; storefront, admin and backend. Ensure that &lt;strong&gt;Root application path&lt;/strong&gt; in Qovery is pointing to your Medusa project (&lt;code&gt;/backend&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. Add a database
&lt;/h3&gt;

&lt;p&gt;Navigate to your environment overview and add the databases required by Medusa.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add Postgres database version 10, 11 or 12&lt;/li&gt;
&lt;li&gt;Add Redis database version 5 or 6&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Configure Medusa
&lt;/h3&gt;

&lt;p&gt;Our Medusa project needs a bit of configuration to fit the needs of Qovery.&lt;/p&gt;

&lt;h4&gt;
  
  
  Update &lt;code&gt;medusa-config.js&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;First, add the Postgres and Redis database url to your &lt;code&gt;medusa-config.js&lt;/code&gt;. In Qovery, click on your Medusa app in the environment overview. Navigate to environment variables in the sidebar on the left. Among the secret variables you should find your database urls. They should look something like this:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Add these to your &lt;code&gt;medusa-config.js&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const DATABASE_URL = process.env.QOVERY_POSTGRESQL_123456789_DATABASE_URL
const REDIS_URL= process.env.QOVERY_REDIS_123456789_DATABASE_URL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Furthermore, update &lt;code&gt;module.exports&lt;/code&gt; to include the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  projectConfig: {
    redis_url: REDIS_URL,
    database_url: DATABASE_URL,
    database_type: "postgres",
    store_cors: STORE_CORS,
    admin_cors: ADMIN_CORS,
    database_extra: { }
  },
  plugins,
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt;: We are using the Qovery community plan, that does not allow SSL connections for the database, so this is disabled.&lt;/p&gt;

&lt;p&gt;In a production environment, you would need the following in the config:&lt;br&gt;
&lt;code&gt;database_extra: { ssl: { rejectUnauthorized: false } }&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Add some extra variables
&lt;/h4&gt;

&lt;p&gt;We need to add a couple of more environment variables in Qovery. Add the following variables in your Console with an application scope:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JTW_SECRET=something_secret_jwt
COOKIE_SECRET=something_secret_cookie
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Make sure to use actual secrets in a production environment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Update &lt;code&gt;package.json&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Update &lt;code&gt;scripts&lt;/code&gt; to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "serve": "medusa start",
    "start": "medusa migrations run &amp;amp;&amp;amp; medusa start",
    "prepare": "npm run build",
    "build": "babel src -d dist --extensions \".ts,.js\""
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Deploy Medusa
&lt;/h3&gt;

&lt;p&gt;Finally, deploy your Redis and Postgres followed by your Medusa application.&lt;/p&gt;

&lt;h4&gt;
  
  
  Deploy databases
&lt;/h4&gt;

&lt;p&gt;In your environment overview in Qovery, deploy your databases one after the other. Only when these are deployed, proceed to next step.&lt;/p&gt;

&lt;h4&gt;
  
  
  Push changes to your repository
&lt;/h4&gt;

&lt;p&gt;To initialise your first build Qovery, simply commit and push your changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "chore: Qovery setup"
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Try it out!
&lt;/h3&gt;

&lt;p&gt;In Qovery, click on your Medusa app in the environment overview. In the top right you are able to open up your application. Navigate to &lt;code&gt;/health&lt;/code&gt; to ensure, that the app is running.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next?
&lt;/h3&gt;

&lt;p&gt;You now have an application running on Qovery. This can be scaled and configured to fit your business needs. As mentioned, we used the community plan, so this should be upgraded when moving to production.&lt;/p&gt;

&lt;p&gt;Furthermore, you can deploy Medusa Admin for your application, such that you can start managing your store from an interface.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.medusajs.com/how-to/deploying-admin-on-netlify/"&gt;Deploy Admin on Netlify&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deploy Admin on Gatsby Cloud (Coming soon)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Explore our &lt;a href="https://github.com/medusajs/medusa"&gt;Github&lt;/a&gt; or join our &lt;a href="https://discord.gg/MvfArDW6f4"&gt;community&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>cloud</category>
      <category>jamstack</category>
    </item>
  </channel>
</rss>
