World of Mantra

Arunoda Susiripala
KADIRA VOICE
Published in
4 min readFeb 26, 2016

We launched Mantra two months ago and now it’s way beyond Kadira. It has a community working on a lot of different things. Here is a tour of the world of Mantra.

The Idea

Our idea for Mantra was not to build a framework or a platform ourselves. It was about building a way to structure a Meteor app with a strong set of principles (maintainability and future-proofed).

For that, we wanted to build a solid spec and let the community rally around it.

🐵: Was that a success?

Yeah. That’s exactly what is happening right now.

A Spec written by the Community

We at Kadira did the first draft of the Mantra spec. But it was just the first draft. With the feedback from the community, a lot of things have changed since then.

One of these is our module support, which was never in our plan; it’s a total community effort. Have a look at how we did it.

The Execution

We are running this project a bit differently.

1. Kadira’s Role

There is a lot of stuff on our hands at Kadira. So, we can’t do many things ourselves.

Our first priority is to keep the spec in shape by listening to the community.

Then, we request help from the community and they assist.

🐵: Can you show me some examples?

2. Community Experiments

Experimenting is the way to success for any project. Fortunately, we have a strong community, which runs experiments for different scenarios. Eventually, these experiments will make Mantra better.

🐵: Wow, I am interested. Show me some examples?

And there’s much more. Check out the Mantra issue list for more stuff like this.

Tooling

Great tooling is another way to achieve success for any project. On top of the Mantra spec, we (as a community) are building some great tools, which will improve the developer experience. Let me show you some of these tools:

Mantra CLI

See: https://github.com/mantrajs/mantra-cli

In this project, you can create a Mantra project and generate files as you need them via the command line.

In the future, you’ll be able to update a Mantra app using this CLI.

Mantra IDE

See: https://github.com/mantrajs/mantrajs-atom-package

This is an Atom plugin that turns Atom into an IDE for Mantra.Using it, you can easily generate code and access different parts of Mantra.

There Will Be More Tools

This is just the start. There will be more tools to help you to get the most out of Mantra. Here are some of the things we are looking at:

Mantra Optimizer

This will check your app to ensure it stays aligned with the Mantra spec. Doing so will improve the quality of the code in your app even if you have hundreds of developers working on it.

Mantra Paper UI

Building a great UI is complex. You always need to test it with a human eye in different scenarios. The Mantra Paper UI will do this by mixing concepts from a UI Harness and IPython notebooks.

🐵: Superb. How can I get started with Mantra?

Learning Materials

Hmm. This is a place where we need some work. We (at Kadira) are certainly interested in improving this area.

Spec & The Sample App

This is the current best approach to get started with Mantra.

  • First, have a look at the Mantra Spec.
  • Then try to read the Sample app.
  • Then, run the sample app and play with it.
  • Read the spec again.
  • Iterate this process until you have a solid idea about Mantra.
  • While doing that, don’t forget to search our issue list.

Updates to Mantra Tutor

We are trying to provide a better learning experience for different parts of Mantra, including the basics, with Mantra Tutor. Now, there is a course for ES2015. We will work on more courses for React, Testing and Mantra.

Meteor React Book

The Meteor React book also covers Mantra and it can help you to start developing Mantra apps.

It’s a paid resource. But it’s worthwhile.

Road to 1.0

From the spec standpoint, it’s stable. We want to optimize the tooling and add more learning resources. Once we have them, it will be time for Mantra 1.0.

🐵: Got it. When can we expect that?

Hopefully, it will be just after the Meteor 1.3 launch. I think it will be early April or late March.

Follow KADIRA VOICE for articles like this.

--

--