Getting started with the Java/.NET client libraries

Here is a short "getting started" guide to using Structurizr with the Java and .NET client libraries.

1. Clone one of the quick start projects

Software architecture models are created by writing code, using the Structurizr for Java or Structurizr for .NET client libraries. The easiest way to get started is to clone one of the following quick start projects:

2. Modify the workspace ID, API key and secret

If you load the project into your IDE of choice, you'll see that the quick start projects include a simple console application. There are some constants at the top of the source code file that need to be changed to reflect the details of the workspace you created.

Java
private static final long WORKSPACE_ID = 1234;
private static final String API_KEY = "key";
private static final String API_SECRET = "secret";
C#
private const long WorkspaceId = 1234;
private const string ApiKey = "key";
private const string ApiSecret = "secret";

You can find the workspace ID, API key and secret on your dashboard, by clicking the "Show more..." button associated with the workspace.

Workspace details

3. Run the console application

Running the console application will create a software architecture model and upload it, via the web API, to Structurizr.

4. Open the workspace in Structurizr

Clicking the workspace name/thumbnail on your dashboard will open the workspace summary, from where you can open the diagram viewer to see the diagram that was created by the console application.

The workspace in the diagram editor

Here, you can move the diagram elements around and change the paper size. The diagram layout can be saved by clicking the save button.

For more information

See Structurizr for Java or Structurizr for .NET for more details about what you can do with the client libraries, and here are a few videos demonstrating some of the basic features of Structurizr.