Skip to content

Hello Kittox

./images/HelloKitto.png

HelloKitto is a sample application that you can use to explore the Kittox way of doing things, understand the basic concepts behind the framework, get ideas and copy-paste snippets for your own experimentations.

Also, copying and renaming the application directory and the project within is the fastest way to create a new application.

Live Demos

Click here to launch Live Demo of Kittox Examples

Use UserName: "guest" and Password "password" to enter demos!

Features

The features of Kittox used by HelloKitto are:

  • Multiple config files:
    • ConfigHelloWorld.yaml defines the smallest possible Kittox application, the classic "Hello World".
    • Config.yaml is the HelloKitto application itself.
    • ConfigEmbedded.yaml shows how to embed (part of) a Kittox application in an existing web page through an iframe.
  • FireDAC-based database connection to SQL Server, PostgreSQL or Firebird (selectable via DefaultDatabaseName in Config.yaml).
  • JWT authentication (Auth: JWT / Inner: DB) — stateless authentication envelope: signed token in an HttpOnly cookie, no server-side session-id lookup. The DB inner authenticator stays in charge of the credential check (MD5-hashed passwords in KITTO_USERS). No DatabaseChoices / no environment combo on the login page: the active backend is whatever DefaultDatabaseName resolves to. See Config_AuthJWT.
  • DB authentication using a standard database table and hashed passwords.
    • With defaults.
  • HTMX theming.
  • Localization.
  • Models and model relationships (references and details).
  • Tree-based or Toolbar-based menu.
  • Tree menu with three levels
  • Tile menu for Smartphone and Tablet
  • Custom logo through the use of an HtmlPanel controller.
  • Tabbed views (TabPanel controller).
  • StatusBar controller.
  • Data display and editing with rules.
  • List grouping with a custom javascript template.
  • List filtering with multiple user filters.
  • A custom form layout.
  • Master/Detail display and edit forms.
  • Input writing in grid
  • Record coloring in grid
  • Rules to Prevent Adding and Prevent Deleting records
  • different kind of form views: new record in a tabpanel from menu new record from popup menu

Deployment modes

HelloKitto includes Delphi projects for all four deployment modes. All projects are in Examples/HelloKitto/Projects/:

ProjectModeOutput
HelloKitto.dprStandalone (GUI / Windows Service)Home/HelloKitto.exe
HelloKittoDesktop.dprDesktop Embedded (WebView2)Home/HelloKittoDesktop.exe
HelloKittoISAPI.dprISAPI (IIS)Home/HelloKittoISAPI.dll
mod_hellokitto.dprApache ModuleHome/mod_hellokitto.dll

All projects share the same Source/ directory (UseKitto.pas, Controllers.pas, Rules.pas) and the same Home/Metadata/ configuration. See the Deployment guide for step-by-step instructions for each mode.

Testing

In order to use HelloKitto you need to create the database using the scripts or backup files provided in the Examples/HelloKitto/DB directory, and edit Config.yaml so it points to your database and uses the correct authentication credentials.

Database scripts

The DB folder contains everything you need to recreate the HelloKitto sample database on Microsoft SQL Server, PostgreSQL or Firebird. All three dialects share the same logical schema (tables KITTO_USERS, HAIR, GIRL, DOLL, PARTY, INVITATION) and the same sample data (2 users, 6 hair colors, 8 girls, 8 dolls, 26 parties, 35 invitations). Boolean columns (KITTO_USERS.IS_ACTIVE, MUST_CHANGE_PASSWORD, INVITATION.ACCEPTED) use the native types of each engine: BIT on SQL Server, BOOLEAN on Firebird 3.0+ and PostgreSQL.

FileEnginePurpose
HelloKitto_SQLServer_DDL.sqlMS SQL ServerTables, foreign keys, primary key constraints
HelloKitto_SQLServer_Data.sqlMS SQL ServerINSERT script with the sample data (girls, dolls, hairs, parties, invitations, Kitto users)
HelloKitto_PostgreSQL_DDL.sqlPostgreSQLhellokitto schema, tables, constraints. kitto_users.is_active, kitto_users.must_change_password and invitation.accepted declared as native boolean; doll.picture is bytea
HelloKitto_PostgreSQL_Data.sqlPostgreSQLSample data (boolean values use TRUE/FALSE literals)
HelloKitto_Firebird_DDL.sqlFirebird 3.0+Tables + FKs translated to Firebird dialect; native BOOLEAN for the same columns the PostgreSQL DDL declares as boolean. Verified on Firebird 5.0 64-bit
HelloKitto_Firebird_Data.sqlFirebirdSame sample data as the SQL Server script (TRUE/FALSE literals for the native BOOLEAN columns)

Creating the database on SQL Server

  1. Create an empty database (for example HelloKitto) on your SQL Server instance.
  2. Run HelloKitto_SQLServer_DDL.sql against the new database to create the schema.
  3. Run HelloKitto_SQLServer_Data.sql to load the sample data.
  4. Update Home/Metadata/Config.yaml so the Databases node points to your SQL Server instance and adjust authentication credentials (see Config_Databases). HelloKitto ships with a FireDAC_MSSQL block ready to use.

Creating the database on PostgreSQL

  1. Create an empty database (for example hellokitto) on your PostgreSQL server, owned by a role of your choice (the example uses kittox_admin).
  2. Run HelloKitto_PostgreSQL_DDL.sql against the new database to create the hellokitto schema, the tables and the foreign keys.
  3. Run HelloKitto_PostgreSQL_Data.sql to load the sample data.
  4. In Home/Metadata/Config.yaml set DefaultDatabaseName: FireDAC_PostgreSQL and update the FireDAC_PostgreSQL block with your server, role and password. Make sure the Schema parameter matches the schema you created (default: hellokitto) — this controls the search_path set for every connection. See the PostgreSQL Schema and search_path section.

All three dialects use native boolean types for IS_ACTIVE, MUST_CHANGE_PASSWORD and INVITATION.ACCEPTED: BIT on SQL Server, BOOLEAN on Firebird 3.0+ and PostgreSQL. The standard DB authenticator and the YAML SQL fragments in HelloKitto's models work cross-dialect via the %DB.TRUE% / %DB.FALSE% and %DB.DATEDIFF macros — switching DefaultDatabaseName between SQL Server, PostgreSQL and Firebird requires no other YAML change.

Creating the database on Firebird

  1. On Firebird 3.0+ (HelloKitto is verified on Firebird 5.0 64-bit), create an empty database file via isql or your preferred tool, e.g.:
    create database 'D:\FirebirdDatabases\HELLOKITTO.FDB'
      user 'SYSDBA' password 'masterkey' default character set utf8;
  2. (Optional) Add an alias to databases.conf so the connection string is HELLOKITTO instead of the full path.
  3. Run HelloKitto_Firebird_DDL.sql on the new database (isql -i HelloKitto_Firebird_DDL.sql) to create the tables, FKs and constraints.
  4. Run HelloKitto_Firebird_Data.sql to load the sample data.
  5. In Home/Metadata/Config.yaml set DefaultDatabaseName: FireDAC_Firebird and update the FireDAC_Firebird block with your alias / path and credentials.

The pure-JS Firebird drivers used by some MCP servers and admin tools require WireCrypt = Disabled in firebird.conf (Firebird 3.0+ defaults to Required) and AuthServer = Srp, Srp256, Legacy_Auth + UserManager = Srp, Legacy_UserManager for username/password authentication.

Use the metadata of HelloKitto as both example and study material. You can find more details about the features in this wiki or in the Kittox Reference.

Released under Apache License, Version 2.0.