Running a set of unit tests against a Mantra app.

Introducing Mantra

An Application Architecture for Meteor

Arunoda Susiripala
Published in
2 min readJan 11, 2016

--

Last Friday, I gave you a sneak peek into Mantra. Thanks to everyone for comments and starring our repo even without any code.

Checkout Mantra’s issue #1. It’s fun to read.

With Mantra, we are trying to achieve two main goals.

  1. Building High Maintainability Apps
  2. Building Future-Proof Apps

In order to achieve these goals, Mantra enforces a set of rules and standards.

Mantra is based on modern React and flexible over state management. You can use different solutions to manage remote and local states in your app, including Meteor/Mongo, Tracker, GraphQL, Falcor and nearly anything else.

Also, Mantra address one of the biggest problems in Meteor. Testing Meteor apps has been pretty hard ever since its early days. With Mantra, you can unit test every part of your app. You can use usual tools like Mocha, Chai and Sinon for unit testing a Mantra app.

Specification

We want to do this correctly. That’s why we are releasing a proper specification that documents everything about Mantra. This specification is written in simple language, so try to read it. This is a draft, and there are a lot of places we can improve. We need to you help.

Read It Online: https://kadirahq.github.io/mantra/

GitHub Repo: https://github.com/kadirahq/mantra

Sample App

We wrote a sample app that follows the Mantra specification. It’s a very simple blog app that uses most of the features in Mantra.

Here’s the online version: http://mantra-sample-blog.meteor.com/

Here’s the repo: https://github.com/mantrajs/mantra-sample-blog-app

What’s Next

This is just the start. We can do a lot with Mantra. Let me show you couple of the things we can do:

  • Build a code generation tool
  • Build a static analyzer to detect Mantra issues (like eslint, but based on Mantra specification)
  • Try integrating with different state managers like Redux, Relay or Falcor
  • Improve testing with better tools like automatic stubbing tools

There is much more we can do together. Experiment with Mantra and let’s discuss.

Follow KADIRA VOICE to hear more stories like this.

--

--