Bundle layout & ZIP
Required js/, css/, assets/ folders, zip from scratch, size limits, and safe HTML rules for Apps.
Each Kenalko App is one ZIP archive with a fixed folder tree. Kenalko validates paths on ZIP upload in the dashboard and on Publish. The ZIP itself is not stored — extracted files go to File manager (quota = file bytes, not ZIP size).
Start from scratch
- 1Create a project folder
On your machine, e.g.
my-portal/(name is up to you). - 2Add the required tree
At minimum
index.html,js/,css/, and optionallyassets/— see the tree below. - 3Link files in HTML
Use relative paths only (
js/app.js— no CDN). - 4Zip and upload
ZIP contents should be
index.html+ folders at the top level — see Creating the ZIP.
Required folder tree
Only these four zones. No other top-level folders (images/, src/, public/, etc. are rejected).
my-portal/
├── index.html ← required to publish (main entry)
├── about.html ← optional extra HTML at root
├── js/
│ ├── app.js
│ └── vendor/
│ └── helpers.mjs ← OK: nested paths under js/
├── css/
│ └── style.css
└── assets/
├── logo.png
├── menu/
│ └── item.jpg ← OK: nested paths under assets/
└── data/
└── catalog.json | Zone | Contents | Subfolders |
|---|---|---|
| Root | .html/ .htm only | — |
js/ | .js, .mjs only | ✓ (e.g. js/vendor/lib.mjs) |
css/ | .css only | ✓ |
assets/ | Media, data, documents (png, webp, json, svg, fonts, pdf, docx/xlsx/pptx, legacy doc/xls/ppt, csv, txt, …) | ✓ — no html/js/css here |
Minimal index.html
Required for publish. Scripts and styles only from files:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My portal</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1 id="title">Loading…</h1>
<!-- load js/app.js via external script tag (src=js/app.js) before /body -->
</body>
</html> Before the closing </body>, load external JS from js/app.js (relative path, no CDN).
In js/app.js, wait for the SDK then read opener data:
Kenalko.ready().then(function () {
var init = Kenalko.getInitData();
document.getElementById('title').textContent = 'Hello, ' + (init.opener.name || init.opener.username);
}); API details: Kenalko JavaScript.
Wrong vs right
| ❌ Rejected | ✅ Use instead |
|---|---|
app.js or style.css at root | js/app.js, css/style.css |
images/logo.png (extra top-level folder) | assets/logo.png |
assets/app.js or assets/page.html | Move to js/ or root HTML |
js/theme.css | css/theme.css |
nested/js/app.js | js/app.js |
| Inline script in HTML | External file under js/ + src="js/…" |
onclick="…" on HTML | addEventListener in js/ |
Script from a CDN (https://…) | Bundle all JS locally |
Size limits
| Bucket | Limit |
|---|---|
| HTML + js/ + css/ (combined) | 25 MB |
| Per code file | 25 MB |
| assets/ (combined) | 1 GB |
Per file under assets/ | 25 MB |
| Files per bundle | 500 |
| ZIP upload (compressed) | 1100 MB |
You still need enough overall File manager quota.
HTML & safety rules
- No inline script in HTML — external files under
js/with asrcattribute only. - No inline event attributes (
onclick=, etc.). - No external
src/hrefURLs for scripts, styles, or images. - No nested ZIP, encrypted entries, or
..paths.
Call your backend via Kenalko.fetch (public HTTPS, JSON) — not a CDN script tag.
Creating the ZIP
Recommended — from inside the project folder:
cd my-portal
zip -r ../my-portal.zip index.html js css assets
# include every root *.html, e.g. about.html Less ideal — one wrapper folder in the archive:
my-portal.zip
└── my-portal/
├── index.html
└── js/ … Kenalko may strip that prefix only when index.html is inside the wrapper. Safer: zip the folder contents directly (command above).