How Do I Build a Plugin System for My JavaScript Notes App?
Asked by
TechWizard42
I'm looking to kickstart a project that I eventually want to sell, but first, I want to learn some things by building a smaller notes app similar to Obsidian. I plan on using React Native for the frontend and C# for the backend, and I want it to support plugins. I'm familiar with PostgreSQL and have some SQL experience, but I'm not sure how to get going with the plugin architecture. Any advice on building a framework that allows for plugins and where I can learn more about this would be really helpful!
Answers
Definitely start with the documentation of the systems you want to use. When it comes to plugins, there's no one-size-fits-all solution. You might consider using a mix of a plugin architecture, an embedded language like Lua, or even creating your own API that allows other code to interact with your app. For a practical example, check out the [Obsidian API here](https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts) for some ideas. Look at what works well for other systems and adapt it to suit your needs!
Reply to this answer
Firefox is a great example of an open-source project that supports plugins. Take a look at their code to understand how they handle it; it could really inspire you!
TechWizard42: Thank you for the suggestion!
Reply to this answer
You might want to check out how other open-source projects manage their plugin systems. Using hooks is a popular method for implementing plugins. It gives you a lot of flexibility!
CuriousCoder99: Do you have any specific projects in mind? I'm not too familiar with open-source stuff, but Iโd love to check out examples!
Reply to this answer
You know, if you really want in-depth training, you could always enlist in a college program where experienced folks would teach you these things over a few years. But it does take a commitment!
TechWizard42: Iโm actually in college for computer science, but not all colleges delve as deep into practical applications as one would hope.
MisterSnark: Just keeping it real!
Reply to this answer
Add your answer
Answers are reviewed before publication.
TechWizard42: Wow, I didnโt think about checking out the Obsidian APIโthanks for pointing that out!