Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Environment Variables

To use environment variables within the markdown itself, add a `.env` file to the `./docs/` directory. Make sure to prefix the environment variables with `VITE` as normal.
15 changes: 8 additions & 7 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ export default defineConfig({
items: [
{ text: 'Create a Flow Library', link: '/getting-started/quickstart/create-a-flow-library' },
{ text: 'Write a Flow', link: '/getting-started/quickstart/write-a-flow' },
{ text: 'Configure dependency injection', link: '/getting-started/quickstart/configure-dependency-injection' },
{ text: 'Installation', link: '/getting-started/quickstart/installation'},
// { text: 'Install Didact Engine', link: '/getting-started/quickstart/install-didact-engine' },
// { text: 'Install Didact UI', link: '/getting-started/quickstart/install-didact-ui' },
{ text: 'Deploy Flow Library', link: '/getting-started/quickstart/deploy-flow-library' }
// { text: 'Configure dependency injection', link: '/getting-started/quickstart/configure-dependency-injection' },
{ text: 'Setup a database', link: '/getting-started/quickstart/setup-a-database' },
{ text: 'Install Didact CLI', link: '/getting-started/quickstart/install-didact-cli'},
{ text: 'Deploy Flow Library', link: '/getting-started/quickstart/deploy-flow-library' },
{ text: 'Install Didact Engine', link: '/getting-started/quickstart/install-didact-engine' },
{ text: 'Install Didact UI', link: '/getting-started/quickstart/install-didact-ui' },
]
},
{
Expand Down Expand Up @@ -323,10 +324,10 @@ export default defineConfig({
items: [
{ text: 'version', link: '/api/didact-cli/version' },
{ text: 'update' },
{ text: 'config', link: '/api/didact-cli/config' },
// { text: 'version update', link: '/api/didact-cli/version-update' },
// { text: 'install', link: '/api/didact-cli/install' },
{ text: 'database get' },
{ text: 'database set', link: '/api/didact-cli/database-set' },
{ text: 'migrate', link: '/api/didact-cli/migrate' },
{ text: 'engine install' },
{ text: 'engine get', link: '/api/didact-cli/engine-get' },
{ text: 'engine set', link: '/api/didact-cli/engine-set' },
Expand Down
26 changes: 26 additions & 0 deletions docs/api/didact-cli/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Config

Sets configurations required for Didact CLI to interact with the platform.

```bash-vue
didact config [--provider "<DB_PROVDER_KEY>" --connection-string "<DB_CONNECTION_STRING>" --license-key "<LICENSE_KEY>"]
```

## Options
- `--provider` (string): The [database provider key](/core-concepts/architecture/metadata-database#database-providers) for your database provider of choice.
- `--connection-string` (string): The connection string for the database.
- `--license-key` (string): An API key from [Didact Console](https://console.didact.dev) that unlocks enhanced features.

## Examples

Set the database provider and database connection string.

```bash
didact config --provider "SQLServer" --connection-string "localhost"
```

Set the license key.

```bash
didact config --license-key "someAPIKeyabd123..."
```
32 changes: 32 additions & 0 deletions docs/api/didact-cli/migrate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Migrate

Runs migrations against Didact's metadata database.

```bash-vue
didact migrate [--provider "<DB_PROVDER_KEY>" --connection-string "<DB_CONNECTION_STRING>"]
```

<!-- ## Arguments
| Name | Required | Description |
| --- | :---: | --- |
| `database migrate` | ✅ | blah |

## Options
| Option | Type | Required | Description |
| --- | :---: | :---: | --- |
| `--provider` | string | No | The database key for the associated database provider. |
| `--connection-string` | string | No | The connection string for the database. | -->

## Options
- `--provider` (string): The [database provider key](/core-concepts/architecture/metadata-database#database-providers) for your database provider of choice.
- `--connection-string` (string): The connection string for the database.

If the `--provider` and `--connection-string` are specified in [didact config](/api/didact-cli/config), then they are not necessary here.

## Examples

Run migrations against a SQL Server database.

```bash
didact migrate --provider "SQLServer" --connection-string "localhost"
```
45 changes: 37 additions & 8 deletions docs/core-concepts/architecture/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@

To help you fully understand how Didact works as a **platform**, I want to explain the overall Flow workflow here in a master, birds-eye-view document. Please read through the Core Concepts and Guides sections to learn more concrete details on how to use and configure the platform.

## Create a database service
## Metadata database

First off, stand up a database service. This can be as simple as a local database running on your machine or a cloud database. Upon starting, Didact Engine will make a database migration against this service to either create or, if necessary, update the metadata database.
### Create a database service

::: tip
[Database migrations](/core-concepts/didact-engine/database-migrations) are based off of [directives](/core-concepts/didact-engine/directives).
First off, stand up a database service. This can be as simple as a local database running on your machine or a cloud database.

### Install Didact CLI

Next, install Didact CLI. You can use an install script from the [didact-install-scripts](https://github.com/DidactHQ/didact-install-scripts) repository directly in your terminal. There is an install script for Windows, Linux, and Mac OS, so simply copy and paste the appropriate script into your terminal and then execute the command.

You can also directly download the Didact CLI binary from the [Releases page](https://github.com/DidactHQ/didact/releases) of the main [Didact repository](https://github.com/DidactHQ/didact).

::: info
I am not currently planning to offer a Docker image for Didact CLI, but if users start requesting it, then I am happy to oblige.
:::

### Run database migration

Upon installing Didact CLI, run the following command in your terminal:

```bash
didact database migrate --provider "SQLServer" --connection-string "<YOUR_CONNECTION_STRING>"
```
Replace `<YOUR_CONNECTION_STRING>` with your actual database connection string.

::: warning
This CLI command will run SQL DDL statements against your database, so make sure to use a connection that grants DDL privileges. After you run the migrations and launch Didact Engine, you can define a different connection string - one with lesser privleges - for Didact Engine's normal operations.
:::

## Flow Library
Expand All @@ -26,12 +47,20 @@ Once your Flow Library is ready, you build and publish it to a specific location

## Didact Engine

### Install Prebuilt binary
### Installation

You can install Didact Engine by running the [engine install command](/api/didact-cli/engine-install) from the Didact CLI, by downloading the binary from the [Releases page](https://github.com/DidactHQ/didact/releases) of the main [Didact repository](https://github.com/DidactHQ/didact) on GitHub, or by pulling its Docker image.

### Install Prebuilt Docker image
### Configure enginesettings.json

Didact Engine is a self-contained dotnet executable that requires an `enginesettings.json` file for a few application settings and/or environment variable declarations.

## Didact UI

### Install Prebuilt binary
### Installation

You can install Didact UI by running the [ui install command](/api/didact-cli/ui-install) from the Didact CLI, by downloading the binary from the [Releases page](https://github.com/DidactHQ/didact/releases) of the main [Didact repository](https://github.com/DidactHQ/didact) on GitHub, or by pulling its Docker image.

### Configure uisettings.json

### Install Prebuilt Docker image
Didact UI is a self-contained dotnet executable that requires an `uisettings.json` file for a few application settings and/or environment variable declarations.
18 changes: 13 additions & 5 deletions docs/core-concepts/architecture/metadata-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ One of Didact's core components is a metadata SQL database.

## Database Providers

Didact's data model is designed for traditional relational database management systems (RDBMS). The supported database providers are listed below:
Didact's data model is designed for traditional relational database management systems (RDBMS). Various database providers and their support status are listed below:

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

### SQL Server

Expand Down Expand Up @@ -50,6 +50,14 @@ Redis is optimized for fast retrieval and simple key-value lookups. Key-value lo

This is drastically different from other background job libraries like Hangfire or Sidekiq, for example. In both of these libraries, the object relations are comparatively lightweight and focus more on the serialization of methods, method arguments, and simple configurations of the jobs.

## Database Migrations

The Didact CLI is required to run database migrations.

::: warning
When database migrations are ran, make sure that Didact CLI uses a connection string with DDL privileges.
:::

## ORM Philosophy

I am taking what you might call a hybrid approach to using an ORM. Specifically, since Didact is a dotnet-centric platform, the ORM I would use would is, of course, Entity Framework Core.
Expand Down
19 changes: 5 additions & 14 deletions docs/getting-started/contributing.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
---
title: Open Source Contributing
title: Contributing
---

# Open Source Contributing
# Contributions

Since Didact is currently taking the polyrepo approach to code organization, it will make everyone's lives much easier if issues are opened *with respect to what repository they belong with*.
At this time, I am not placing much emphasis on community contributions; I have been deeply focused on architecture, API-design, application configurations, and data modeling, and on multiple occasions I have made tweaks to the data model in particular to better conform Didact to the vision that I have for it.

In other words:
As a result, **I would gently recommend withholding contributions for the time being** while I finalize the APIs and data model in these first versions. Instead, [ open up issues](https://github.com/DidactHQ/didact/issues), [create discussions](https://github.com/DidactHQ/didact/discussions), or [request new features on the roadmap](https://didact.featurebase.app/roadmap).

- For issues with the REST API and execution engine, please open up issues in the [didact-engine](https://github.com/DidactHQ/didact-engine) repo.
- For issues with the VueJS web dashboard, please open up issues in the [didact-ui](https://github.com/DidactHQ/didact-ui) repo.
- For issues with the console application, please open up issues in the [didact-sentinel](https://github.com/DidactHQ/didact-sentinel) repo.
- For issues with core nuget package, please open up issues in the [didact-core](https://github.com/DidactHQ/didact-core) repo.

It's not the end of the world by any means if you don't follow this guideline, but it will save me work and issue duplication if this general guide is followed.

::: info No need to die on that hill
Again, I want to emphasize that I am **not** anti-monorepo: if the issue tracking becomes unmaintainable, I'm happy to consider an alternative approach to code organization.
:::
I apologize for this temporary inconvenience, but I'd rather you not expend energy on writing source code for a PR right now.
16 changes: 12 additions & 4 deletions docs/getting-started/quickstart/create-a-flow-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const targetFrameworkVersion = import.meta.env.VITE_TARGET_FRAMEWORK_VERSION;

# Create a Flow Library

The heart of the Didact Platform are your jobs which we call `Flows`. The Flows must exist in a dedicated class library project which we will call your `Flow Library` going forward. In this guide, I walk you through how to create and prepare a class library for Flow design.
The magic of Didact's orchestration happens in your dedicated .NET class libraries, called Flow Libraries. These class libraries contain your `Flows`, which are container classes for your jobs. For simplicity, we will focus on making one flow library here and will name it `Flow Library`.

## New class library project

To get started, you first need to create a new, dedicated class library dotnet project.
To get started, you first need to create your flow library.

We will utilize the [dotnet CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/) for easy, cross-platform usage; however, feel free to use Visual Studio or any other IDE of your choice if you prefer a GUI over a CLI.

Expand All @@ -28,9 +28,9 @@ dotnet new classlib -o FlowLibrary -f {{ targetFrameworkVersion }}
This command will create a new class library project for you. The `-o` command specifies the project name and folder name, and the `-f` specifies the target framework version.
:::

::: warning Target framework version
<!-- ::: warning Target framework version
If you are familiar with class library projects, you may be puzzled as to why you need to specify `{{ targetFrameworkVersion }}` as the target framework version rather than a .NET Standard version like `netstandard2.1`. This is explained later in the docs (see Plugins), but for the moment, just know that this is both **intentional** and **required**.
:::
::: -->

3. Now navigate inside your new project folder:

Expand All @@ -46,4 +46,12 @@ Run the following command to add Didact Core as a NuGet package dependency in yo

```bash
dotnet add package DidactCore
```

## Configure the .csproj

We also need to make specific configurations to the flow library's .csproj file. These configurations are necessary for the build steps and ultimate deployment of your flow library to a deployment source, where Didact Engine will later absord it and execute your Flows.

```cs
TODO
```
35 changes: 35 additions & 0 deletions docs/getting-started/quickstart/install-didact-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Install Didact CLI

To migrate the database and interact with the rest of the Didact platform, you need the Didact CLI.

## Installation

To install Didact CLI, you can use an install script from the [didact-install-scripts](https://github.com/DidactHQ/didact-install-scripts) repository directly in your terminal. There is an install script for Windows, Linux, and Mac OS, so simply copy and paste the appropriate script into your terminal and then execute the command.

You can also directly download the Didact CLI binary from the [Releases page](https://github.com/DidactHQ/didact/releases) of the main [Didact repository](https://github.com/DidactHQ/didact).

::: info
I am not currently planning to offer a Docker image for Didact CLI, but if users start requesting it, then I am happy to oblige.
:::

## Configure CLI settings

We need to provide, at a minimum, a connection string for Didact CLI to access the Didact database, so run the [didact config](/api/didact-cli/config) command below:

```bash
didact config --provider "<DB_PROVDER_KEY>" --connection-string "<DB_CONNECTION_STRING>"
```

Replace `<DB_PROVDER_KEY>` with a valid [database provider key](/core-concepts/architecture/metadata-database#database-providers) and `<DB_CONNECTION_STRING>` with a database connection string.

::: warning
As expounded upon below, Didact CLI needs a connection string with DDL privileges so that it can run migrations against the database. After migrations are ran, you don't necessarily have to keep using that same connection string: you can replace it with one that has lesser privileges. However, subsequent CLI operations will still need connection strings with CRUD privileges. You can read more in [metadata database](/core-concepts/architecture/metadata-database).
:::

## Run database migrations

If this is your first time using Didact on your given database, then you need to run the [didact migrate](/api/didact-cli/migrate) command against it to setup the data model. Open a terminal and run the following command to execute the database migrations:

```bash
didact migrate
```
8 changes: 3 additions & 5 deletions docs/getting-started/quickstart/install-didact-engine.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Install Didact Engine

## Get the code
## Installation

## Environment variables
## Configure enginesettings.json

## Directive

## Deploy
## Launch
8 changes: 3 additions & 5 deletions docs/getting-started/quickstart/install-didact-ui.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Install Didact UI

## Get the code
## Installation

## Environment variables
## Configure uisettings.json

## Engine tuning

## Deploy
## Launch
9 changes: 9 additions & 0 deletions docs/getting-started/quickstart/setup-a-database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Setup a database

Didact requires a metadata database to properly orchestrate your Flows, so you need to setup a database. It can be something simple like a local database, a Docker image, or a cloud database.

Read [database providers](/core-concepts/architecture/metadata-database#database-providers) from the Core Concepts to learn what providers are supported.

::: info
You will need to run migrations against this database to setup the data model, but don't worry: that is covered in the next step.
:::
Loading
Loading