Skip to main content

DWKit Solution

We discuss issues related to DWKit solution in this section. Here we mean Visual Studio Solution, but you are free to use any other IDE to develop applications with DWKit.

Tutorial

The technology stack of the solution includes:

  • .NET
  • React
  • Supported databases: MS SQL, PostgreSQL. Coming soon: AzureSQL, Oracle, MySQL, Redis.

For deployment and further development, you will need the following toolkit:

Starting a DWKit-based project

  1. Download the StarterPack or one of the examples from the Download page.
  2. Unpack the archive.
  3. Find the scripts for the system deployment in the DB folder. Open the folder that corresponds to your database and run the scripts in the order specified in the readme.txt file. Usually, the order is the following: DWKitScript.sql (main DWKit scripts), Workflow_CreatePersistenceObjects.sql (WorkflowEngine scripts).
  4. Open the dwkit.sln file.
  5. Check the connection string to the database in the OptimaJet.DWKit.StarterApplication/appsettings.json file, ConnectionStrings section.
  6. Run the application via the IDE (in case you use Visual Studio, just press F5).

You will see a login form, to access the application, use the following default access parameters:

  • Login: admin
  • Password: 1

You will be further redirected to the main page of the application.

Application structure

The application includes two base projects:

  • src/OptimaJet.DWKit.Application
  • src/OptimaJet.DWKit.StarterApplication

Project OptimaJet.DWKit.Application contains a set of classes for initialization of the platform and support libraries. Find more details in the Initialization section.

Project OptimaJet.DWKit.StarterApplication is an MVC web application, which contains a set of controls and resources for the generation of web interface. Find more details in the Controllers section.

UI based on React

DWKit uses React to create user interfaces. The project includes three .jsx files (located in the OptimaJet.DWKit.StarterApplication/wwwroot/js/app folder):

  • app.jsx - application user interface for authorized users;
  • login.jsx - login form for unauthorized users;
  • admin.jsx - admin panel.

In case you change the JSX files, you will need to reassemble the React part of the application in the following way:

  1. Install NpmJS and webpack 4 in case you don't have them.

  2. Run a command in the root folder of the project (use the additional -p parameter for release):

    npm install
    webpack --progress
  3. Webpack will assemble three JavaScript applications: app.js (the main application file), login.js (login form), admin.js (admin panel).

Admin panel

Use the admin panel to adjust the application metadata. To access the admin panel, follow the link:

http://<url>/admin, where url corresponds to the URL of your website.

The admin panel changes the metadata and data in the database via the ConfigAPIController. The metadata are located in the metadata folder. You can change path to metadata folder in src/OptimaJet.DWKit.StarterApplication/appsettings.json in the Metadata section:

"Metadata": {
"path": "../../metadata/metadata.json"
}

In our samples we use custom path to metadata files. By default, the path is "Metadata/metadata.json" in the root of OptimaJet.DWKit.StarterApplication.

Can I add my own Views and Controllers into DWKit application?

Sure you can! DWKit main project is a regular ASP.NET Core MVC project, you can change anything in it. But we recommend you study its structure and controllers before changing anything. You can even combine several applications written in different client development stacks in one project!