DEV Community

loading...

Official Meteor packages that you might want in you app

Jan Dvorak
Developer, organizer and sci-fi writer.
Updated on ・4 min read

Meteor offers amazing functionality out of the box, but there are also some amazing official packages that can add even more to your application. Here is my personal list of packages that you might want to consider adding to your application.

check & audit-argument-checks

These are a must have packages. audit-argument-checks checks to make sure that you validate all the input in your method calls with the check package.
After adding audit-argument-checks it will report to you in console about inadequate input checks as you navigate through your app.
check package should be used to validate any input into your subscriptions and methods.

⁉️ mdg:validation-error

This function allows you to define validation errors on the server and provide more data to better display the error on the client.

🛂 mdg:validated-method

The ultimate way of creating methods. If you have a more complex app you might have experienced some pains working with the default Meteor methods. validated-method was a second attempt to add more functionality to the method to alleviate the most common problems. Most notable is the inclusion of schema validation (hence the name).
If you are not using it though, you might want to wait a bit as it is a bit dated and a third iteration has been proposed.

🔒 force-ssl

A must for any production app. This package will redirect unsecured request to a secure URL.

🔍 mdg:seo

SEO has always been tricky for JavaScript apps. This package aims to help in this regard (especially if you hosting on Galaxy) by utilizing Prerender.io to create a searchable version of your app for crawlers.

📊 bundle-visualizer

Best if you create a specialize start command like this:
meteor --extra-packages bundle-visualizer --production
This will allow you to examine your bundle size and see where you should load dynamically or cur some fat from your app.

💼 ejson

Extended and Extensible JSON library reads the description and you most likely already have it as a dependency of another of your packages. It adds date and binary types support to json and allows you to add your own as well.

#️⃣ random

Need a random (Meteor) id or a new secret key or just want a random element from an array. This and a bit more is in this package.

🙀 reactive-dict & reactive-var

As the name suggests these packages allow you to setup reactive dictionary and variable to work with Tracker or if can also be used as a sort of app state.

🏃 fetch

If you are calling other servers on old fashioned APIs you probably use the http package and recently you might have been annoyed with a deprecation warnings. Despair not! Fetch is here to usher you into the future! Refer to the MDN documentation and import everything from the fetch package and you should be fine. The good thing is that where possible native implementation is used and in other cases the package provides polyfills.

🔗 url

The url package does the same like fetch, but for the URL API. In addition if you are using react-router and need to get search params, you might want to give URLSearchParams from this package a try.

🚧 Logging

The last on this list which will require a bit of a digging is the Meteor logging packages. Although meant for internal Meteor processes, there is no reason why you couldn't use it if you don't have anything better.
It is a small package, so a quick on the source code should give you all the info you need.

👮 DDP rate limiter

A very useful package to limit how frequently your users can call the server via DDP. This is in essence a security package that prevents brute force attacks. You can define rules for your methods and publications that will check that all conditions have been fulfilled before proceeding with the request. Most commonly this is used by the accounts package to limit the number of login attempts, reset password attempts, etc. to prevent brute force attacks, but you can use that for pretty much anything. Check out the docs for more info.


If you like my work, please consider supporting me on GitHub Sponsors ❤️.

Discussion (0)