Introduction

🎉🎊 Thank you for checking out Allotize. If you have any question, don't hesitate to ask a question via GitHub Issues.

What is Allotize?

Allotize provides a platform for building modern web applications without backend code, servers or even databases. Yet, you are able to build apps such as collaborative planning tools or social media platforms.

Think of Allotize as something that gives your data superpowers, and allows it to teleport and sync between devices!

How it works

You connect variables, objects, or any other JavaScript code to Allotize. Your users will then be able to detect updates and changes on each others' machines.

This means that you can build message boards, collaborative services, games or anything you could think of with just client-side code. Here is an example of a cube that can be rotated by users along with an upvoting system.

Let's take a look at the upvoting code. We simply create an object votes that holds our information and register it to Allotize via Allotize.Crate(votes).

const votes = Allotize.Crate({
    route: "cube/votes",

    data: {
        upvotes: 0,
    },

    onChange: (oldData, newData) => {
        document.getElementById("upvotes").innerHTML = newData.upvotes;
    },
});

document.getElementById("upvote").addEventListener('click', (e) => {
    votes.data.upvotes += 1;
});

document.getElementById("downvote").addEventListener('click', (e) => {
    votes.data.upvotes -= 1;
});

That's it! Everyone who loads our website will have a synced number of upvotes that changes in real-time. Proceed to the next chapter, to find out how you can create your own app!