Creating a Client Structure

Reading time: 5 mins

Introduction

Weavy is built to be controlled by you and matched to your environment and the structure of your site. At an early stage, you should think about how to match Weavy to your structure. Get to know the concepts of Weavy to get a better understanding of how to achieve this integration.

Apps

The easiest way to start is to think of what kind of apps you want and where they should be placed in your web pages. The type of apps is not that important, it's more important where they belong. You may have apps that are very general and not related to anything specific, like a chat app. You may also have apps that are very specific, like a files app belonging to a specific page or section.

So the important thing will be to establish whether they belong to every page or maybe just to a specific section or if the app should only be visible to certain users. This will lead the way on how to group the apps. You should also remember that space can have many apps and that space can have several apps of the same kind if needed.

var space = weavy.space({ key: "demo", name: "Projects" });

space.app({ key: "x1-files", type: "files", name: "Project X1 Files"});

space.app({ key: "x2-files", type: "files", name: "Project X2 Files"});

space.app({ key: "project-posts", type: "post", name: "Projects Discussion"});

 

Spaces

Once you have identified which apps to display on the different screens of your application you should translate that into a representation that makes sense for Weavy. In the sections below we describe a couple of common scenarios:

Mapping spaces to user groups

In this scenario, you map space to a specific group of users, for instance, a team or a department.

 

var space = weavy.space({ key: "sales", name: "Sales Team" });

space.app({ key: "sales-posts", type: "posts"});

space.app({ key: "sales-files", type: "files"});

 

Mapping spaces to an entity

Another common scenario is having spaces for different entities in your application. These entities could be a customer, project, a document, or a section on your website or in your web app.

 

var space = weavy.space({ key: "customer-ABC123", name: "Acme Inc" });

space.app({ key: "customer-ABC123-posts", type: "posts"});

space.app({ key: "customer-ABC123-files", type: "files"});

 

var space = weavy.space({ key: "project-x1", name: "Project X1" });

space.app({ key: "x1-posts", type: "posts"});

space.app({ key: "x1-files", type: "files"});

 

Mapping spaces to a general context

Sometimes you may want some apps to be available for all users on all pages, for instance, a messenger app, a general posts stream, or a notifications app. For this, you could match it against a global space that is visible on all screens in your application and where all your users are added as members.

var space = weavy.space({ key: "global", name: "Global Shared Space" });

space.app({ key: "main-messenger", type: "messenger"});

space.app({ key: "main-notifications", type: "notifications"});