Project Structure

All KMG projects should follow a consistent structure depending on the technology stack.

Python / Flask

my-project/
├── app.py                  # Application entry point
├── requirements.txt        # Python dependencies
├── Dockerfile
├── docker-compose.yml
├── .gitlab-ci.yml
├── templates/              # Jinja2 templates
│   ├── base.html           # Base layout
│   └── ...
├── static/                 # Static assets
│   ├── css/
│   ├── js/
│   ├── fonts/
│   ├── img/
│   └── favicon.ico         # KMG favicon
└── tests/
    └── test_*.py

PHP / Slim Framework

my-project/
├── html/                   # Web root (served by Nginx)
│   ├── index.php
│   ├── favicon.ico         # KMG favicon
│   └── assets/
│       ├── css/
│       ├── js/
│       └── fonts/
├── app/
│   ├── src/                # PHP source (PSR-4, App\ namespace)
│   │   ├── templates/      # Twig templates
│   │   ├── Middleware/
│   │   └── Plugins/
│   └── config/
│       ├── bootstrap.php
│       ├── container.php
│       └── routes.php
├── Dockerfile
├── docker-compose.yml
└── .gitlab-ci.yml

Ruby on Rails

my-project/
├── app/
│   ├── assets/
│   │   ├── stylesheets/
│   │   └── images/
│   │       └── favicon.ico # KMG favicon
│   ├── controllers/
│   ├── models/
│   └── views/
│       └── layouts/
│           └── application.html.erb
├── config/
├── Gemfile
├── Dockerfile
├── docker-compose.yml
└── .gitlab-ci.yml

Common Conventions

  • Every project must have a Dockerfile and docker-compose.yml
  • Every project must have a .gitlab-ci.yml for CI/CD
  • Every project should have a README.md and CLAUDE.md
  • Every project must include the KMG favicon.ico — place it in the static/public root appropriate to your stack
  • Nucleo Icons and Argon Dashboard assets are self-hosted; standard libraries (Popper.js, Bootstrap JS, Font Awesome) use CDNs
  • Authentication uses Keycloak OIDC where required

Favicon

Every KMG application must include the standard KMG favicon. This ensures consistent branding across browser tabs, bookmarks, and mobile home screens.

Where to place it

Stack Location
Python / Flask static/favicon.ico
PHP / Slim html/favicon.ico (web root)
Ruby on Rails app/assets/images/favicon.ico

How to reference it

Add the following in the <head> of your base layout template:

<!-- Flask / Jinja2 -->
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">

<!-- PHP / Twig -->
<link rel="icon" type="image/x-icon" href="/favicon.ico">

<!-- Rails / ERB -->
<%= favicon_link_tag 'favicon.ico' %>

Where to get it

Copy the favicon from any existing KMG project (e.g., admin-gui.neworder/html/favicon.ico) or download it from the design system repository.