Skip to content

itk-dev/ai-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Bibliotek (ai-lib)

A shared catalog of AI assistants for the Danish public sector. ai-lib lets contributors export, share, search, and import assistants — using the OpenWebUI JSON format as the interchange — and provides moderation and metadata around what ends up in the catalog.

Tech stack

  • Docker and Docker Compose v2
  • itkdev-docker-compose on your PATH
  • A working Traefik reverse proxy
  • PHP 8.4 / Symfony 8
  • Nginx + Traefik
  • MariaDB
  • Mailpit (outbound mail capture, local only)
  • ITK Dev Docker development setup (symfony-8 template)
  • Taskrunner Task (Taskfile.yml)

Status: early development. The application is being scaffolded — see the Base setup milestone and open issues.

The platform is built up across milestones:

  • Catalog — browse and list shared AI assistants with metadata.
  • Search & filtering — full-text search, filter by tags/category, and sorting.
  • Assistant details — full metadata and a readable configuration preview.
  • JSON export — download an assistant as OpenWebUI-compatible JSON.
  • JSON import (share/upload flow) — upload/paste OpenWebUI JSON to share an assistant, with validation and optional moderation.
  • User management — login, roles/permissions, and profiles.
  • OpenWebUI tag/workflow — AI-generated tags and OpenWebUI round-trip.

Local development

Run task (or task --list) to see every available target.

Common commands

# Run Composer inside the phpfpm container
task composer -- <command>

# Run a Symfony console command
task console -- <command>

# Apply PHP coding standards
task coding-standards-php-apply

# Lint Twig templates
task coding-standards-twig-check

# Format YAML
task coding-standards-yaml-apply

# Lint Markdown
task coding-standards-markdown-check

# Normalize composer.json
task coding-standards-composer-apply

# Run every coding-standards check
task coding-standards-check

# Run the PHPUnit test suite
task test

# Run PHPUnit with coverage and enforce the 100% gate
task test-coverage

Frontend assets

The project uses Tailwind CSS on top of Symfony's AssetMapper, with Stimulus for behaviour. There is no Node toolchain — the Tailwind binary is managed by symfonycasts/tailwind-bundle. See ADR 002 for the rationale.

# One-time: download the Tailwind binary (also runs lazily on first build)
itkdev-docker-compose php bin/console tailwind:build

# Build the compiled stylesheet
itkdev-docker-compose php bin/console tailwind:build

# Watch source files and rebuild on change (development)
itkdev-docker-compose php bin/console tailwind:build --watch

# Compile and version the full importmap + assets (production)
itkdev-docker-compose php bin/console asset-map:compile

# Inspect what AssetMapper sees
itkdev-docker-compose php bin/console debug:asset-map

Heads-up: there is no live Tailwind watcher running by default, and cache:clear does not rebuild the stylesheet. After editing a template that introduces a utility class not already in use (e.g. pt-2, grid-cols-1), run tailwind:build — or keep a tailwind:build --watch terminal open while you style.

Source files live under assets/:

  • assets/app.js — JavaScript entrypoint, boots Stimulus.
  • assets/styles/app.css — Tailwind entrypoint (@import "tailwindcss";).
  • assets/controllers/ — Stimulus controllers, auto-registered by filename (nav_toggle_controller.jsdata-controller="nav-toggle").

For one-off commands without a dedicated task, fall back to the underlying tools, e.g. docker compose --profile dev run --rm prettier <args> or itkdev-docker-compose <args>.

The commands below describe the intended ITK Dev standard setup. The actual Docker + Symfony scaffolding is added in #1 Set up Docker + Symfony; until that is merged, some commands will not yet be available.

Requirements

Getting started

# Clone the repository
git clone https://github.com/itk-dev/ai-lib.git
cd ai-lib

# List all available tasks
task

# Install site
task site-install

# Open the site
task open

The site is served through Traefik on a *.local.itkdev.dk domain (the exact URL is printed by the start task).

Testing

Tests live under tests/ (PSR-4 namespace App\Tests\) and run with PHPUnit inside the phpfpm container. Code coverage is enforced at 100% in CI — pull requests that drop coverage below that threshold fail the Tests workflow.

# Run the full suite (no coverage)
task test

# Run the suite under Xdebug coverage and enforce the 100% gate
task test-coverage

task test-coverage runs PHPUnit with XDEBUG_MODE=coverage, writes a Clover report to coverage/clover.xml, and then runs rregeer/phpunit-coverage-check against the report. The same two steps run in the Tests GitHub Actions workflow on every pull request; a coverage figure below 100% fails the build.

References

Prototype routes

View Route
Home / front page #/
Login #/login
Catalog / search #/search
Assistant details #/assistant/:id
Upload / import #/upload
My assistants #/uploads
Favorites #/favorites
Collections #/collections

The prototype is a client-side mock (data stored locally in the browser), not production code.

About

Library that holds ai assistants and other distributable config for openwebui

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors