Skip to content

Monorepo for all Strapi components to sync with medusa

License

Notifications You must be signed in to change notification settings

microCloudCode/medusa-strapi-repo

 
 

Repository files navigation

Welcome to medusa-strapi-repo 👋

Version Documentation Maintenance Licence

Monorepo for all strapi components to sync with medusa

An Appeal

Medusa-Strapi: Embrace the Power of Empathy in Content Management! 🚀

Hey there, Supporter! 👋

Welcome to the world of Medusa-Strapi, the perfect companion to the MedusaJS e-commerce framework! As we set out to make a lasting impact in the digital realm, we invite you to join our journey and experience the magic of empathetic content management.

Medusa-Strapi is not just any content management system; it's a heartfelt project that empowers creators and businesses to thrive alongside the MedusaJS e-commerce framework. Together, we're on a mission to simplify content management while embracing the principles of empathy and collaboration.

Why We Need Your Help:

Through Medusa-Strapi, we've already witnessed the profound impact it's had on countless lives. Businesses can now craft compelling stories with ease, while developers find joy in building seamless experiences. Together, we've saved valuable hours, giving individuals the freedom to focus on what truly matters.

You Can Make a Difference:

Your support, no matter the size - whether it's a generous $5 or a magnificent $10 - fuels our quest. With your backing, we can:

  • Empower Dreams: Behind every line of code lies a dream - the dream of a developer leaving an indelible mark, a small business flourishing, or a content creator inspiring the world. Your support brings these dreams to life, turning them into awe-inspiring realities.

  • Craft Simplicity: We believe in technology that empowers, not complicates. Your kindness helps us build an intuitive content management system, allowing businesses to effortlessly create and manage content.

  • Celebrate Humanity: Medusa-Strapi is not just software; it's a vibrant community driven by empathy. Your support strengthens these bonds, fostering a space where ideas flourish, and hearts unite.

Join Our Journey:

Be a part of Medusa-Strapi's story and the FOSS movement. 🌟 Embrace the spirit of openness, collaboration, and shared growth. Together, let's empower this journey, making an indelible impact on countless lives.

GitHub Sponsors

Ready to join the ranks of change-makers? 🚀 Pledge your support or learn more at github.com/SGFGOV/medusa-strapi-repo.

Embrace the power of empathy in Medusa-Strapi's journey today! 💫

With heartfelt gratitude,

Govind Medusa-Strapi Team 🤝

Introduction

Why this repo

Hi, as developers we want to be productive quickly. Strapi is an amazing framework for content management, and medusa is the new kid on the block, as an ecommerce engine. Combining the two definitely made sense. The last attempt to combine the two was with strapi v3, which has since been deprecated and strapi v4 is the new standard.

V3 vs V4

To understand this you need a little bit of strapi background Strapi uses a system of content schemas, unfortunately with a major version upgrade to v4 the old schemas are no longer effective. Moreover, you are unable to take advantage of strapis built in relationship system. In v3 you had to handle one - many, one to one, many to one relationshs etc manually in your service code. In V4 strapi bakes this capability internally, freeing you from the need to maintain boiler plate code. This and several other enhancements made strapi v4 the true choice.

In medusa terms, you can easily map a one to many relations between products and product variants in strapi just you do in medusa

Why a mono repo

Well the answer is simple, maintainability. Strapi's template based system well its useful but not 100%. I prefer having all the boiler plate code and features like multi langauage support, redis support, and whole bunch of other things baked into my code than having to install them one by one. There are some closely related components, that though can be used separate from the repo, works best if everything is put together. Then the plugin to associate with medusa is closely related to the api structure, yet a different component.

Moreover it made integration testing much easier. Testing was critical as the number of apis increase, but more on this later.

Monorepo organisation

This mono repo houses 5 components. All are under the packages folder. You can read more about the individual components there

  1. medusa-strapi - the strapi implementation
  2. medusa-plugin-strapi-ts - the medusa plugin for strapi
  3. strapi-plugin-medusajs - the strapi plugin to ensure strapi runs as a slave to medusa
  4. strapi-plugin-sso-medusa - the strapi plugin to help you can sign into strapi with medusa credentials
  5. strapi-plugin-multi-country-select - this is a small admin tool to enable multiple countries to be selected. This was initially a separate repo, but now has been merged with this to ensure consistent builds.

Version info

We support strapi v4.10.5 at the moment with medusa version. Changelog

Prerequisites

  • node > 16.17.3
  • medusa > 1.8
  • strapi > 4.11.7
  • postgres > 12

Install

This is the easiest bit

  1. Clone the repo.
  2. Go to the medusa-strapi folder inside /packages/medusa-strapi
  3. Create a .env file. Update the environment variables as noted in the readme of medusa-strapi
  4. Run yarn run build

Deployment - Container

I recommend using docker and setting the environment variables as per the docker container deployment environment that you are using

Deployment - Local

Go to the medusa-strapi folder inside /packages/medusa-strapi and execute command

yarn start

Testing

This tests medusa-strapi and the medusa-plugin-strapi-ts. The other two components don't have tests at the moment

yarn run test

Author

👤 Govind Diwakar

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

I love developing software and building products that are useful. I sincerely hope you this project helps you. I'm happy to help if you need support setting this up. Give a ⭐️ if this project helped you! Catch me on discord @govdiw

As you might have guessed by now that considerable time and effort has gone into make this product useful to the community at large, and I'd love to keep maintaining and upgrading this. However, As much as we love FOSS software, nothing in this world is truly free. Please help by [sponsoring or supporting the project]. (https://github.com/sponsors/SGFGOV)


About

Monorepo for all Strapi components to sync with medusa

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 50.5%
  • JavaScript 48.1%
  • Other 1.4%