Skip to content
34 changes: 28 additions & 6 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default defineConfig({
themeConfig: {
logo: '/didact-logo.png',
socialLinks: [
{ icon: 'discord', link: 'https://discord.gg/uamswkyRFn' },
{ icon: 'github', link: 'https://github.com/DidactHQ' },
{ icon: 'x', link: 'https://x.com/DidactPlatform' },
{ icon: 'youtube', link: 'https://www.youtube.com/channel/UCPYXvf2OvQku5HrOKYFsxHg' },
Expand Down Expand Up @@ -206,9 +207,17 @@ export default defineConfig({
{ text: 'Targets' }
]
},
{
text: 'Didact CLI',
items: [
{ text: 'Installation' },
{ text: 'Environment Variables', link: '/core-concepts/didact-cli/environment-variables'}
]
},
{
text: 'Didact Engine',
items: [
{ text: 'Installation' },
{ text: 'Plugin System', link: '/' },
{ text: 'Environment Variables', link: '/core-concepts/didact-engine/environment-variables' },
{ text: 'Database Migrations', link: '/core-concepts/didact-engine/database-migrations' },
Expand All @@ -220,6 +229,7 @@ export default defineConfig({
{
text: "Didact UI",
items: [
{ text: 'Installation' },
{ text: "Environment Variables", link: '/core-concepts/didact-ui/environment-variables' }
]
},
Expand Down Expand Up @@ -261,7 +271,17 @@ export default defineConfig({
text: 'CI/CD', link: '/'
},
{
text: 'Deployments',
text: 'Reverse Proxies',
items: [
{ text: 'Nginx' },
{ text: 'Apache' },
{ text: 'IIS' },
{ text: 'Caddy' },
{ text: 'YARP' }
]
},
{
text: 'Infrastructure Deployments',
items: [
{ text: 'Azure VM' },
{ text: 'AWS EC2' },
Expand Down Expand Up @@ -299,6 +319,7 @@ export default defineConfig({
'/api/': [
{
text: 'Didact CLI',
collapsed: true,
items: [
{ text: 'version', link: '/api/didact-cli/version' },
{ text: 'update' },
Expand All @@ -314,8 +335,6 @@ export default defineConfig({
{ text: 'ui get', link: '/api/didact-cli/engine-get' },
{ text: 'ui set', link: '/api/didact-cli/engine-set' },
{ text: 'ui config' },
{ text: 'license get', link: '/api/didact-cli/license-get' },
{ text: 'license set', link: '/api/didact-cli/license-set' },
{ text: 'license authenticate', link: '/api/didact-cli/license-authenticate' },
{ text: 'license validate', link: '/api/didact-cli/license-validate' },
{ text: 'environment get' },
Expand All @@ -325,14 +344,17 @@ export default defineConfig({
// { text: 'library add', link: '/api/didact-cli/library-add' },
// { text: 'library remove', link: '/api/didact-cli/library-remove' },
// { text: 'library deploy', link: '/api/didact-cli/library-deploy' },
{ text: 'deployment add' },
{ text: 'deployment remove' },
{ text: 'deployment list' }
{ text: 'deployment init', link: '/api/didact-cli/deployment-init' },
{ text: 'deployment config' },
{ text: 'deployment push' },
{ text: 'deployment deactivate' },
{ text: 'cron validate' }
]
},
{ text: 'REST API', link: '/' },
{ text: 'License Server', link: '/' },
{ text: 'Didact Core', link: '/' },
{ text: 'Didact Cron', link: '/' },
{ text: 'Errors and Exceptions', link: '/' }
]
},
Expand Down
9 changes: 9 additions & 0 deletions docs/api/didact-cli/deployment-init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Deployment Init

```bash-vue
didact deployment init --type <deployment_type> --library-name <name> [--path <deployment_file_path]
```

Sets the provider type and connection string for the Didact metadata database and saves it to a local file relative to Didact CLI.

For a list of database providers and further information, please see [Metadata Database](/core-concepts/architecture/metadata-database).
6 changes: 3 additions & 3 deletions docs/core-concepts/architecture/didact-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Following the tenets of the [12 Factor App](https://12factor.net/), Didact Engin

Because of this architecture, Didact Engine can easily be scaled from a single node application to a multinode application cluster. If you want to add more Didact Engines to process your Flows, there is no special configurations or additional libraries required. All you have to do is spin up more Didact Engines and point them at the metadata database, and they will take care of themselves.

## Ease of Deployment
## Easy Deployment

One of the major benefits of modern dotnet is the incredible ease of cross-platform deployment strategies.

Since Didact is built with modern dotnet versions, it can be built and published as a self-contained, single-file executable. As is typical with self-contained executables, you don't even need dotnet installed on the target machine: the required framework .dll files are packaged into the executable!
Since Didact is built with modern dotnet versions, it is prebuilt and published as a self-contained, single-file executable. As is typical with self-contained executables, you don't even need dotnet installed on the target machine: the required framework .dll files are packaged into the executable!

This makes Didact **extremely easy** to get up and running on essentially any infrastructure with little effort on your part. Simple infrastructure requirements should make your adoption of Didact that much easier.
This makes Didact **extremely easy** to get up and running on essentially any infrastructure with little effort on your part. One binary, one Docker image, [one process](/core-concepts/architecture/didact-engine#single-process). Simple infrastructure requirements should make your adoption of Didact that much easier.
4 changes: 2 additions & 2 deletions docs/core-concepts/architecture/metadata-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ So what I've landed on, at least for the moment, is a hybrid system for using *b

* EF Core will manage database migrations.
* EF Core will generate *only* the most simple CRUD queries, queries that have no chance of being poorly optimized by EF Core's engine that would just be a simple waste of time for me to hand write.
* All other concerns will, by default, resort to hand-written SQL statements and the Dapper micro ORM.
* All other concerns will, by default, resort to hand-written SQL statements and the Dapper micro ORM. SQL is my first love, so I'm OK with this.

## Distributed Locks

Since Didact's metadata is centrally stored in a relational database, requirements like distributed locks are automatically provided by and synchronized within the platform. This is one of the nice advantages for Didact's chosen architecture: it is extremely simple to run both a single node or multiple nodes/clusters of Didact Engine without requiring cumbersome infrastructure changes.
Since Didact's metadata is centrally stored in a relational database, requirements like distributed locks are automatically provided by and synchronized within the platform. This is one of the nice advantages for Didact's chosen architecture: it is extremely simple to run both a single node or [multiple nodes/clusters of Didact Engine](/core-concepts/architecture/didact-engine#multinode-and-clustering) without requiring cumbersome infrastructure changes.

## Performance Optimizations

Expand Down
67 changes: 67 additions & 0 deletions docs/core-concepts/didact-cli/environment-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Environment Variables

Since Didact CLI is a build once, deploy anywhere application, you are intended to take the prebuilt binaries, use them as is, and modify their behavior only through the use of **runtime environment variables**.

## Enginesettings.json

Namely, whatever root directory you run Didact CLI's executable file inside of, you need to add a special environment variable file called `clisettings.json`. This file is quite similar to `appsettings.json` but is intended for you to set runtime environment variables as needed.

::: tip Separation of concerns
These runtime environment variables are for Didact CLI *only*. Didact Engine and Didact UI have their own runtime environment variables.
:::

The full template for `clisettings.json` is shown below:

```json
{
"Database": {
"Provider": "SQLServer",
"ConnectionString": "<YOUR_CONNECTION_STRING_HERE>"
},
"LicenseKey": "<YOUR_LICENSE_KEY_HERE>"
}
```

However, feel free to read each field's corresponding doc section for more details.

### Database.Provider

| Descriptor | Value |
| --- | --- |
| Key | Database.Provider |
| Type | `string` |
| Description | Didact's database provider key. |
| Required | `true` |
| Default | `SQLServer` |

The database provider names are shown below:

| Provider Name | Provider Key | Status |
| --- | --- | --- |
| SQL Server | `SQLServer` | Supported |
| Azure SQL Database | `SQLServer` | Supported |
| PostgreSQL | `PostgreSQL` | Planned |

### Database.ConnectionString

| Descriptor | Value |
| --- | --- |
| Key | Database.ConnectionString |
| Type | `string` |
| Description | Didact's database connection string. |
| Required | `true` |
| Default | N/A |

### LicenseKey

| Descriptor | Value |
| --- | --- |
| Key | LicenseKey |
| Type | `string` |
| Description | The license key for your Didact paid plan. |
| Required | `true` for customers only |
| Default | N/A |

::: warning For customers only
If you are not a Didact customer / only use the Community Edition, you can omit this field. If you *are* a Didact customer, make sure to include this license key or else your enhanced features may not be unlocked.
:::
26 changes: 8 additions & 18 deletions docs/core-concepts/flows/flows-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ using DidactCore;

public class ExampleFlow : IFlow
{
private readonly IFlowConfigurator _flowConfigurator;
public ExampleFlow() { }

public ExampleFlow(IFlowConfigurator flowConfigurator)
{
_flowConfigurator = flowConfigurator;
}

public async Task<IFlowConfigurator> ConfigureAsync() {}
public Task<IFlowConfigurator> ConfigureAsync(IFlowConfigurator flowConfigurator) {}

public async Task ExecuteAsync(IFlowExecutionContext context) {}
}
Expand Down Expand Up @@ -70,24 +65,19 @@ I intentionally made this method async to avoid a painful code refactoring and b

It's possible that you may never need asynchronous functionality in `ConfigureAsync`, but in that case, you will still need to satisfy the method signature. No problem, just add `await Task.CompletedTask` as shown below:

```cs{14}
```cs
using DidactCore;

public class ExampleFlow : IFlow
{
private readonly IFlowConfigurator _flowConfigurator;
public ExampleFlow() { }

public ExampleFlow(IFlowConfigurator flowConfigurator)
public async Task<IFlowConfigurator> ConfigureAsync(IFlowConfigurator flowConfigurator)
{
_flowConfigurator = flowConfigurator;
}
flowConfigurator
.WithTypeName(GetType().Name);

public async Task<IFlowConfigurator> ConfigureAsync()
{
await Task.CompletedTask;
return _flowConfigurator
// ...
;
return Task.FromResult(flowConfigurator);
}
}
```
Expand Down
8 changes: 5 additions & 3 deletions docs/core-concepts/licensing-system/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ const exampleDidactLicenseKey = import.meta.env.VITE_EXAMPLE_DIDACT_LICENSE_KEY;

## How to obtain a license key

To unlock the enhanced features of the Didact platform, you need to purchase a paid plan in the customer portal, called Didact Hub. You can [login here](https://hub.didact.dev).
To unlock the enhanced features of the Didact platform, you need to purchase a paid plan in the customer portal, called Didact Console.

Inside of Didact Hub, you will find a licensing page where your license key is generated upon purchasing your paid plan.
<!-- You can [login here](https://hub.didact.dev). -->

Inside of Didact Console, you will find a licensing page where your license key is generated upon purchasing your paid plan.

Your license key should look something like the example one below:

Expand All @@ -20,7 +22,7 @@ Your license key should look something like the example one below:

As mentioned in [Terminology](/core-concepts/licensing-system/terminology#license-key), your license key is a sensitive, secret value that is scoped only to your organization per the terms of the commercial license for Didact and is **not** meant to be shared anywhere else. Handle this license key with care.

You will need to use it in order to authenticate Didact with the license server, so you may need to copy and paste it from Didact Hub. That's fine, just make sure to delete or securely store your local copy so that the key is not accidentally leaked anywhere.
You will need to use it in order to authenticate Didact with the license server, so you may need to copy and paste it from Didact Console. That's fine, just make sure to delete or securely store your local copy so that the key is not accidentally leaked anywhere.

## How to use the license key

Expand Down
4 changes: 2 additions & 2 deletions docs/core-concepts/licensing-system/terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The license server is built with resilience and reliability in mind. If you woul

## License key

The license key is the unencrypted, simple API key that you get from Didact Hub once you purchase a paid plan for Didact.
The license key is the unencrypted, simple API key that you get from Didact Console once you purchase a paid plan for Didact.

This key is tied to your organization account in Didact Hub and is necessary for you to unlock the paid features of Didact.
This key is tied to your organization account in Didact Console and is necessary for you to unlock the paid features of Didact.

An example license key is shown below:

Expand Down
24 changes: 23 additions & 1 deletion docs/getting-started/quickstart/deploy-flow-library.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# Deploy Flow Library
# Deploy Flow Library

Now that you have created your Flow Library and installed Didact's applications, it's time to deploy your Flow Library to a Library Source so that Didact Engine can find and synchronize it.

## Create build artifacts

To deploy your Flow Library, you'll use the Didact CLI that you previously installed.

1. Open a terminal and navigate to the root directory of your Flow Library (where your .csproj file is).
2. Publish your Flow Library to a local folder using the dotnet CLI.

```bash
dotnet publish
```

## Deploy build artifacts

3. Now navigate to your publish folder that contains the build artifacts (the .dll files and and so on).
4. Inside the publish folder, use Didact CLI to deploy your build artifacts and create a Library Source within Didact's database.

```bash
didact library deploy
```
Loading
Loading