Skip to content

Compiling and running the demos

The three sample applications — HelloKitto, TasKitto and KEmployee — are the quickest way to see Kittox working on your own machine. You can also try them live in the browser first.

No packages to install

Kittox has no design-time components, so there is nothing to install into the Delphi IDE to build an example: you don't register any package and you don't add anything to the global library path. Each shipped example .dproj already references the framework source folders on its own search path, so you just open the project, compile and run.

Open the example project — a single, version-independent .dproj per deployment mode, located directly under Examples/<App>/Projects/ (e.g. Examples/HelloKitto/Projects/HelloKitto.dproj). The shipped .dproj compiles on any supported Delphi (10.4 to the latest) — there is no per-version subfolder. Build it, run it, then browse to http://localhost:<port>/<appname> — the port is the Server/Port value in Config.yaml.

Delphi edition

Connecting to a client/server database (SQL Server, PostgreSQL, Oracle, remote Firebird) uses the FireDAC / DBExpress client-server drivers, which ship only with Delphi Enterprise or Architect. Delphi Professional includes local/embedded drivers only (SQLite, InterBase ToGo) plus ADO/dbGo — see the UseKitto note below.

Preparing the database

Every example runs on any of the four supported engines. HelloKitto and TasKitto ship the SQL scripts to create and populate their demo database under Examples/<App>/DB/ — a <App>_<Engine>_DDL.sql to create the tables and a <App>_<Engine>_Data.sql to fill them:

EngineHelloKittoTasKitto
Microsoft SQL Server✓ (DDL split into tables + _DDL_Views)
PostgreSQL✓ (plus KittoX_PostgreSQL_CreateDB.sql)
Firebird
Oracle✓ (plus _CreateUser.sql)
  1. Create the database — create an empty database (SQL Server / PostgreSQL / Firebird) or a schema/user (Oracle). Use lower-case names on PostgreSQL and Firebird.
  2. Run the scripts in order — first the *_DDL* script, then the *_Data script for your engine. The exact order (and engine notes) is in each example's DB/README. TasKitto also ships a *_ShiftDates.sql helper that re-centres the Activity Dashboard demo dates on today — run it whenever the dashboard looks empty.

KEmployee needs no scripts: it uses the EMPLOYEE sample database that ships with Firebird — just point the connection at it (see Examples/KEmployee/DB/Readme.txt).

The UseKitto unit — enabling database engines (and features)

Each example has a small Source/UseKitto.pas unit, referenced by the project .dpr. Its uses clause is where the application opts into the pieces it needs: every EF.DB.* database adapter and FireDAC.Phys.* driver self-registers by ClassId in its own initialization, so simply listing a unit here makes that engine available (the order is irrelevant). The examples ship with all four engines enabled:

pascal
uses
  EF.DB.FD,                                         // FireDAC data-access layer
  FireDAC.Phys.MSSQL, FireDAC.Phys.MSSQLMeta,       // SQL Server
  FireDAC.Phys.IBBase, FireDAC.Phys.FB,             // Firebird
  FireDAC.Phys.PG, FireDAC.Phys.PGWrapper,          // PostgreSQL
  FireDAC.Phys.Oracle, FireDAC.Phys.OracleMeta,     // Oracle
  // EF.DB.ODAC,                                     // Oracle via Devart ODAC (optional, commented)
  Kitto.Html.All,                                   // core controllers
  Kitto.Web.Enterprise,                             // Chart/Calendar/Map/Dashboard (Enterprise)
  Kitto.Web.Rest,                                   // opt-in REST/JSON API under /api/v4
  Kitto.Auth.JWT,                                   // JWT authenticator
  ...
  • Not on Delphi Enterprise/Architect? The FireDAC.Phys.* client-server drivers won't compile on Professional (e.g. "unit FireDAC.Phys.MSSQL not found"). Either upgrade the license, or remove the client-server driver uses and target a local database (SQLite / InterBase, or ADO/dbGo).
  • Oracle via ODAC: the optional Devart ODAC path is present but commented — uncomment EF.DB.ODAC (and add the ODAC library path) to enable the ODAC adapter.
  • Browser-only app? Just omit Kitto.Web.Rest and no /api routes are linked.

Pointing an example at your own database

Each example's Home/Metadata/Config.yaml defines one connection block per engine under Databases: and selects the active one with DefaultDatabaseName. Switch engine by setting DefaultDatabaseName to the matching entry and filling in that block's Server / Database / User_Name / Password:

yaml
# Examples/HelloKitto/Home/Metadata/Config.yaml
DefaultDatabaseName: FireDAC_MSSQL
#DefaultDatabaseName: FireDAC_PostgreSQL
#DefaultDatabaseName: FireDAC_Firebird
#DefaultDatabaseName: FireDAC_Oracle
#DefaultDatabaseName: ODAC_Oracle

Databases:
  FireDAC_MSSQL: FD
    Connection:
      DriverID: MSSQL
      Server: 127.0.0.1, 1433
      Database: HelloKitto
      User_Name: SA
      Password: 12345
  # ... one block per engine ...

The value after each name (FD, ODAC, …) is the adapter ClassId enabled by UseKitto. The full connection reference — every engine, all driver options, and the optional Devart ODAC path for Oracle — is on the Databases configuration page.

Next steps

Released under Apache License, Version 2.0.