Giter Site home page Giter Site logo

netgrif / nae-backend-application-starter Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 454 KB

Backend Starter project for Netgrif Application Engine

Home Page: https://engine.netgrif.com/

Dockerfile 9.66% Groovy 45.01% Java 45.33%
java workflow petri-nets petriflow spring-boot spring netgrif

nae-backend-application-starter's Introduction

Netgrif Application Engine Backend Starter

This is a starter project for Netgrif Application Engine to make easier to start implementing your own NAE based application.

It helps if you are familiar with Spring Boot framework, but it is not necessary to enjoy possibilities of process driven application.

Requirements

The Application engine has some requirements for runtime environment. The following table is summary of requirements to run and use the engine:

Name Version Description Recommendation
Java 11+ Java Development Kit OpenJDK 11
Redis 5+ Key-value in-memory database used for user sessions and caching Redis 6.2.6
MongoDB 4.4+ Main document store database MongoDB 4.4.11
Elasticsearch 7.17+ Index database used for better application search Elasticsearch 7.17.3

If you are planning on developing docker container based solution you can use our docker-compose configuration to run all necessary databases to develop with NAE.

Installation

This project can be used as a base to your NAE application. Before you start coding please consider doing following steps to personalize project:

  • Rename root java package
  • Edit maven project attributes in pom.xml, mainly groupId and artifactId
  • Generate security certificates for token encryption

As it is Java Maven project it is assumed that you have some experience with Java programming language.

Generate certificates

You should generate own certificates to encrypt token used by NAE.

 mkdir -p src/main/resources/certificates && cd src/main/resources/certificates && openssl genrsa -out keypair.pem 4096 && openssl rsa -in keypair.pem -pubout -out public.crt && openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in keypair.pem -out private.der && cd ../../../..

Class Description

The project consists of several important classes to configure NAE to work for your use case. You are free to change its names a configuration.

CustomActionDelegate

ActionDelegate class is a gateway to inject your custom functions to Petriflow processes. Every public method and property of this class is available to call from process action. It extends NAE ActionDelegate that contains all Action API, so you can use all its functionality to even more extend its capabilities.

CustomRunner

Runner is special kind of component class that extends CommandLineRunner (or another variants). It is used to run some logic right after application starts but before it is ready to serve requests. NAE call the run method of a runner class to execute its logic.

Project contains one runner class to make easier to start. You can use it to import you processes or create process instances.

CustomRunnerController

The class defines order of runners execution. NAE contains some own runner classes to set up the application. There is highlighted area where it is recommended to place your runner classes (like for example the provided one).

StarterApplication - Main class

The main class is to start the whole application but also for overriding bean definition of NAE default spring beans. In the project only two beans are recommended to override RunnerController and ActionDelegate to start you own implementation.

Further help

If you need any help with the project you can write us a help request as an issue or engage in a discussion in the NAE repository.

nae-backend-application-starter's People

Contributors

machacjozef avatar renczesnetgrif avatar renczesstefan avatar tuplle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ajunlonglive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.