Creating Your First App
Prerequisites
Section titled “Prerequisites”- Bun installed (
bun --version≥ 1.0) - A running ElyOS instance (via Docker or locally) — required for uploading the app and testing within the ElyOS system (not just standalone mode). See: Docker-based setup
Creating a Project
Section titled “Creating a Project”Use the ElyOS CLI to create a new app project:
bunx @elyos-dev/create-appThe interactive wizard walks you through the setup:
- App ID — kebab-case identifier (e.g.
my-app) - Display name — what users see
- Description — short description
- Author —
Name <email>format - Template —
blank,basic,advanced,datatable, orsidebar - Permissions —
database,notifications,remote_functions
Or provide the name and template directly:
bunx @elyos-dev/create-app my-app --template blankbunx @elyos-dev/create-app my-app --template basicbunx @elyos-dev/create-app my-app --template advancedbunx @elyos-dev/create-app my-app --template datatable --no-installAvailable Templates
Section titled “Available Templates”| Template | Best for |
|---|---|
starter | Clean slate — only the SDK, you decide what goes in |
basic | Simple UI app, no server-side logic |
advanced | With server functions and a Settings component |
datatable | CRUD app with DataTable and server CRUD operations |
sidebar | App with sidebar navigation (AppLayout mode, menu.json) |
blank template
Section titled “blank template”The blank template is the most minimal starting point: only the SDK and required files are included. After selecting the template, the wizard asks three follow-up questions to optionally add the most common features:
- Sidebar navigation? — if yes, creates the
src/components/folder with anOverview.sveltecomponent andmenu.json - Server functions? — if yes, creates
server/functions.tswith an example function - Database migrations? — if yes, creates
migrations/001_init.sqlwith a sample table definition. The ElyOS installer automatically runs migrations on install and prefixes table names with the plugin schema (plugin__app_id) - i18n translations? — if yes, creates the
locales/folder withhu.jsonanden.jsonfiles
Generated structure (with all options):
my-app/├── manifest.json├── src/│ ├── App.svelte # Main component│ ├── main.ts # Entry point│ └── components/ # (if sidebar: yes)│ └── Overview.svelte├── server/ # (if server functions: yes)│ └── functions.ts├── migrations/ # (if database migrations: yes)│ └── 001_init.sql├── locales/ # (if i18n: yes)│ ├── hu.json│ └── en.json└── assets/ └── icon.svgbasic template
Section titled “basic template”The basic template generates a simple single-page app. Ideal for beginners and simple apps.
Generated structure:
my-app/├── manifest.json├── src/│ ├── App.svelte # Main component│ └── main.ts # Entry point├── locales/│ ├── hu.json│ └── en.json└── assets/ └── icon.svgadvanced template
Section titled “advanced template”The advanced template includes server-side logic and a Settings component. Ideal for apps that need server functions.
Generated structure:
my-app/├── manifest.json├── src/│ ├── App.svelte # Main component│ ├── main.ts # Entry point│ └── components/│ └── Settings.svelte├── server/│ └── functions.ts # Server-side functions├── locales/│ ├── hu.json│ └── en.json└── assets/ └── icon.svgdatatable template
Section titled “datatable template”The datatable template generates a full CRUD app with a DataTable component and server-side CRUD operations. Ideal for data management apps.
Generated structure:
my-app/├── manifest.json├── src/│ ├── App.svelte # Main component│ ├── main.ts # Entry point│ └── components/│ ├── DataTable.svelte│ └── Settings.svelte├── server/│ └── functions.ts # CRUD server functions├── locales/│ ├── hu.json│ └── en.json└── assets/ └── icon.svgsidebar template
Section titled “sidebar template”The sidebar template generates a sidebar navigation layout where the app consists of multiple pages. ElyOS uses its AppLayout component for display — a navigation bar appears on the left side of the app window, with the selected page content on the right.
Generated structure:
my-app/├── manifest.json├── menu.json # Sidebar navigation definition├── src/│ ├── App.svelte # Main component (sidebar + routing)│ └── components/│ ├── Overview.svelte│ └── Settings.svelte├── locales/│ ├── hu.json│ └── en.json└── migrations/ # Database migrations (if database permission) └── 001_init.sqlThe menu.json defines the sidebar menu items:
[ { "id": "overview", "labelKey": "menu.overview", "component": "Overview" }, { "id": "settings", "labelKey": "menu.settings", "component": "Settings" }]The labelKey values have no namespace — the system automatically prepends the app:{id}. prefix when looking up translations.
Project Structure
Section titled “Project Structure”The generated project structure:
my-app/├── manifest.json # App metadata (required)├── package.json # Dependencies and scripts├── vite.config.ts # Build configuration├── tsconfig.json # TypeScript configuration├── src/│ ├── main.ts # Entry point, Mock SDK init│ ├── App.svelte # Main component│ └── components/ # Sub-components (in advanced/datatable template)├── server/ # Server-side functions (advanced/datatable)│ └── functions.ts├── locales/ # Translations│ ├── hu.json│ └── en.json└── assets/ └── icon.svg # App iconManual Creation (Copying sdk-demo)
Section titled “Manual Creation (Copying sdk-demo)”If you’re working within the monorepo, you can copy the sdk-demo example:
cp -r examples/apps/sdk-demo examples/apps/my-appcd examples/apps/my-app# Modify manifest.json (id, name, description)bun installInstalling Dependencies
Section titled “Installing Dependencies”cd my-appbun installThe @elyos/sdk package is available on the npm registry and JSR — it includes TypeScript type definitions and the developer Mock SDK.
First Build
Section titled “First Build”bun run buildThis creates the dist/index.iife.js file — the bundle loaded by ElyOS.
Next Steps
Section titled “Next Steps”- Developer workflow — standalone dev mode and Mock SDK
- manifest.json reference — all fields in detail
- Build and upload —
.elyospkgpackage and installation