npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rage-js/main

v0.0.1

Published

RAGE.js - An Implementation of RAGE

Downloads

13

Readme

A Data Management Approach for Offline-First Applications

GitHub Issues or Pull Requests GitHub Repo stars Static Badge

The RAGE Approach

"RAGE" is a data management approach that enables offline-first applications by caching data locally in JSON files. It connects to your MongoDB, Firebase, or other no-sql databases, retrieves the data, and stores it locally in a JSON format.

With RAGE, you can perform CRUD operations on the local JSON files, and in the background, RAGE will synchronize the changes with your remote database at regular intervals. This approach improves application performance, provides offline support, and reduces the load on your remote database.

Key Benefits:

  • Improved application performance
  • Offline support
  • Reduced load on remote databases
  • Easy data synchronization

RAGE.js

"RAGE.js" however, is the implementation of the RAGE approach, providing tools to use RAGE approach efficiently.

RAGE Methods

Even if the approach works, you can still customize the behavior of what to do in the middle of the instance, etc with these three primary methods:

  1. Push After Interval (PAI)
  2. Push On Update (POU)
  3. No Interval (NI)

Push After Interval

In the middle of the instance, it will push the local JSON files' data to the cloud databases of your choice after every certain interval given by the user. This is the most efficient way compared to the other methods.

[!NOTE] The loop that runs to synochronize the cloud database is called as the "RAGE main loop"

Push On Update

This method will make the application push on every update that occurs on the local files. This is the most less efficient way compared to the other methods but it still can be used in certain cases.

No Interval

This method does not perform any task at the middle of the instance, except for synchronizing the changes on local JSON data with the the cloud database of your choice at the end of the instance, just like every other method.

You can set the method of your choice when creating your application through npx rage as well. OR if you want to change the method explictly, you can change your rage.config.json file like this:

{
  ...
  "method": "PAI", // PAI | POU | NI
  "methodSpecificSettings": {
    ...
  }
}

where methodSpecificSettings depends upon your method, if you are using PAI method, then you should include interval (The amount of interval for synochronizing the local data with the cloud database of your choice) and 600000ms or 10min is the minimum interval, you can extend from there.

[!WARNING] Setting the interval is important, as the higher the better, but also too much high like 5hrs or more than that is too much! You can it keep moderate like 2-3hrs for production use and around 10-20min for testing and development purposes.

rage.config.json

Thank you all for the love and support

Made with 💢 and Node.js