Server / /

Server SDK

First, you need to set up your instance of our Server SDK so you can start embedding Weavy features into your app.

Since the Weavy backend is built on the .NET framework you need a Windows machine to build and run the code.

IMPORTANT - Be sure to install these items one at a time, otherwise you will get errors and a nonfunctioning SQL Server + Visual Studio

Prerequisites

1. Git for Windows
2. SQL Server ((you can install the free developer or express edition) 
3. SQL Server Management Studio
4. Visual Studio (you can install the free community edition)

If you see an option to add git to the PATH during installation, choose to do so. It will be handy. Also, make sure to launch Visual Studio 2019 and install any available updates.

Download Weavy

We provide a Visual Studio Solution on GitHub to get you started. The solution contains a fully functional ASP.NET MVC web application that you can run on your local machine. In a terminal window, run the following command to clone the repository:

git clone https://github.com/weavy/weavy-sln.git

Instead of cloning, we recommend that you fork the repo so that you can easily modify and check your changes to GitHub for future reference.

Create Database

Open SQL Server Management studio and create a new database named weavy.

add-database

 

Build and Run

Once the repo is cloned and the database is created, use Visual Studio to open the solution file Weavy.sln from the root directory of the repo.

You can now run the project by pressing Ctrl+F5 or choosing Start Without Debugging from the Debug menu. When the app starts, you will see a browser window open with the setup wizard launched.

After completing the setup you will be logged in to Weavy.

If you get runtime errors when starting the app - try re-building by choosing Clean Weavy and then Rebuild Weavy from the Build menu in Visual Studio and then start without debugging.
If you still face issues, get help from us.

Authentication Clients

We need to add an Authentication Client so we can authenticate users through the Client SDK.

To manage Authentication Clients, navigate to https://{your-url}/manage/clients and click the plus sign in the bottom right.

authclients

Give your Authentication Client a display name and Save it. Make a note of the Client Id and Client Secret - you will need them in the next step.

JWT Token

JWT tokens are used by Weavy for authentication. 

To keep it simple in our example, we're going to generate a token through JSON Web Tokens with an expiration date in the far future.

Put this snippet into the PAYLOAD section on the JSON Web Tokens site.

IMPORTANT - JWT Tokens need to be generated on your apps server - This is just for demo purposes only and to understand what Weavy needs within the JWT token.

{

  "sub": "demouser",

  "name": "Demo User",

  "exp": 2516239022,

  "iss": "#### YOUR CLIENT ID ####",

  "email": "#### YOUR EMAIL ####",

  "username": "demo"

}

And in the VERIFY SIGNATURE section put the Client Secret you created.

The end result should look similar to this:

encodedjwt

Save the token somewhere, you need it in our next step when we're adding chat to your app.

Let's add in-app chat!

Now when we have all the back-end stuff in place we can start focus on the fun stuff. Let's continue.