MCPcopy Index your code
hub / github.com/KrailOrg/krail

github.com/KrailOrg/krail @0.16.13.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.16.13.0 ↗ · + Follow
3,618 symbols 9,053 edges 653 files 982 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

krail

License Gitter Build Status Coverage Status

Krail provides a framework for rapid Java web development by combining Vaadin, Guice, Apache Shiro, Apache Commons Configuration and others. For more information, see the comprehensive Tutorial, which also makes a reasonable demo. (You can clone directly from the Tutorial repo). Note that the tutorial is based on the Vaadin 7 version of Krail - it should still be possible to follow it, but it will not be updated until the move to Eclipse Vert.x is done (or fails!)

This core library provides:

  • Site navigation, using a sitemap configured by annotation or Guice
  • Authentication / Authorisation framework, including page access control
  • Vaadin Server Push (with option to disable it)
  • Event Bus
  • Extensive I18N support
  • User options
  • Application configuration through ini files, database etc
  • JSR 303 Validation (integrated with I18N)
  • Forms support
  • User notifications

The framework is highly configurable, and virtually any element of it can be replaced by using Guice bindings.

Development Focus

The current focus for development is to provide full Forms support, running on Vertx. So far, thanks to the great contribution from Marco Collovati, running on Vertx has shown no specific issues.

It is intended that the same code can be run both on Vertx and a conventional web server environment, and a bootstrapping mechanism is provided for that purpose.

The extensive Documentation, includes a Tutorial, user Guide and Developer Guide. The Tutorial is currently limited to the Vaadin 7 version, and needs rewriting to include new features.

Source Code

Originally written in Java the source is gradually being migrated to Kotlin. Tests are a mix of JUnit, Spock and Spek. The intention is to end up with an all-Kotlin solution, but porting is usually only done when code changes are required for other reasons.

Versions

Krail version Vaadin
0.12.x.x version 7
0.13.x.x-v7compat version 8, running version 7 compatibility
0.14.x.x and beyond, pure Vaadin 8

Download

Gradle

repositories {
    jcenter()
}
'uk.q3c.krail:krail:0.16.12.0'

Maven

<repository>
    <id>jcenter</id>
    <url>http://jcenter.bintray.com</url>
</repository>

<dependency>
    <groupId>uk.q3c.krail</groupId>
    <artifactId>krail</artifactId>
    <version>0.16.12.0</version>
</dependency>

Direct

Download

Limitations

Testing on Vertx has been limited, particularly on clustered Vertx. Having said that, functional tests run on Vertx have shown no issues except that Push does not correctly disable.

Status

  • Vaadin 8.3.3 is integrated with:
  • Guice 4.1.0
  • Shiro 1.4.0,
  • MBassador (Event Bus)
  • Apache Commons Configuration
  • Guava cache

Functional Test Application

There is a functional test application which can also be used to explore functionality - though the Tutorial may be better for that

Project Build

Gradle is used (made a lot easier thanks to the Gradle Vaadin plugin.

Acknowledgements

Thanks to:

Marco Collovati for his work on Vaadin - Vertx integration, and support for core Krail development

Dirk Lietz for his review and feedback for the Tutorial

Mike Pilone for his blog post on Vaadin Shiro integration

ej technologies for an open source licence of JProfiler

Vaadin

Guice

Apache Shiro

JUnit

Guava (cache and utilities)

MBassador Event Bus

Flag Icons

Apache Commons Configuration

Gradle

Gradle Vaadin plugin

Gradle Docker Plugin

Gradle Bintray Plugin

Bintray

Docker

Logback

slf4j

AssertJ

Mycila

Mockito

spock

Spek

FindBugs Mockk

Extension points exported contracts — how you extend this code

KrailView (Interface)
* A view is constructed by the [ViewFactory] from a Provider defined in the sitemap building process. When * the view [7 …
src/main/kotlin/uk/q3c/krail/core/view/KrailView.kt
SpecialComponentInterface (Interface)
(no doc)
src/test/kotlin/uk/q3c/krail/core/view/component/TestViews.kt
DialogIconFactory (Interface)
This interface implements the default behavior for loading icons for the dialog. You can override this class to apply an [6 …
src/main/java/de/steinwedel/messagebox/icons/DialogIconFactory.java
Dummy (Interface)
(no doc)
src/test/kotlin/uk/q3c/krail/core/guice/CoreBindingsCollatorTest.kt
ButtonIconFactory (Interface)
This interface defines the essential methods for a ButtonIconFactory @author Dieter Steinwedel [6 implementers]
src/main/java/de/steinwedel/messagebox/icons/ButtonIconFactory.java
ViewFactory (Interface)
Implementation return an injected KrailView instance, scoped to UIScoped. The interface is provided primarily to [19 implementers]
src/main/java/uk/q3c/krail/core/view/ViewFactory.java
VaadinSessionProvider (Interface)
The provides an interface for an implementation to wrap the static method of obtaining the current VaadinSession, mainly [20 …
src/main/java/uk/q3c/krail/core/shiro/VaadinSessionProvider.java

Core symbols most depended-on inside this repo

get
called by 318
src/main/java/uk/q3c/krail/core/view/ViewFactory.java
put
called by 236
src/main/kotlin/uk/q3c/krail/core/form/Form.kt
add
called by 199
src/main/java/uk/q3c/krail/core/guice/threadscope/ThreadCache.java
append
called by 149
src/main/java/uk/q3c/krail/core/navigate/sitemap/MasterSitemap.java
from
called by 109
src/main/java/uk/q3c/krail/persist/jpa/Select.java
navigationState
called by 56
src/main/java/uk/q3c/krail/core/navigate/sitemap/Sitemap.java
addChild
called by 54
src/main/java/uk/q3c/krail/core/navigate/sitemap/Sitemap.java
navigateTo
called by 53
src/main/java/uk/q3c/krail/core/navigate/Navigator.java

Shape

Method 2,630
Class 776
Interface 130
Function 67
Enum 15

Languages

Java63%
Kotlin37%

Modules by API surface

src/main/kotlin/uk/q3c/krail/core/form/Validator.kt89 symbols
src/main/java/de/steinwedel/messagebox/MessageBox.java54 symbols
src/main/java/uk/q3c/krail/core/navigate/sitemap/DefaultSitemapBase.java52 symbols
src/main/java/uk/q3c/krail/core/navigate/sitemap/Sitemap.java41 symbols
src/main/kotlin/uk/q3c/krail/core/form/Form.kt35 symbols
src/main/kotlin/uk/q3c/krail/core/env/Bootstrap.kt32 symbols
src/main/java/uk/q3c/krail/core/guice/CoreBindingsCollator.java31 symbols
src/main/kotlin/uk/q3c/krail/core/form/PropertyConfiguration.kt30 symbols
src/main/java/uk/q3c/krail/core/navigate/NavigationState.java30 symbols
src/test/java/uk/q3c/krail/core/data/TestEntity2.java28 symbols
src/main/java/uk/q3c/krail/core/ui/ScopedUI.java28 symbols
src/test/kotlin/fixture/ReferenceUserSitemap.kt27 symbols

For agents

$ claude mcp add krail \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact