Skip to content

Project Files ​

A Luna Park project is a tree of files shown in the Explorer. Right-click in the Explorer and pick New to create one.

File types ​

TypePurposeLearn more
FolderGroups files. Folders don't change how the app works.
MediaAn uploaded image, video, or other asset.
ComponentA reusable piece of interface with its own logic.Components
PageA component reachable through a URL.Components
StoreGlobal state shared by all components.Store
TextRich text written in Luna Park's markdown, displayed with the Custom text element.
RouteA backend HTTP endpoint.Routes
DatabaseA table and its rows.Database
CronA backend job that runs on a schedule.Cron
ConfigurationStatic values (URLs, settings, keys) for the frontend, the backend, or both.Scripts and Functions
ScriptReusable logic functions without interface.Scripts and Functions
TypeReusable data types shared across the project.Scripts and Functions

Explorer actions: Cut (Ctrl + X), Copy (Ctrl + C), Paste (Ctrl + V), Rename (F2), and Delete (Del). Double-click a file to open it.

Scopes ​

Logic files (scripts, configurations) have a Scope in the Inspector. It decides where the code runs:

ScopeRuns inCan use
FrontendThe browserFrontend and Shared files
BackendThe serverBackend and Shared files
SharedBothShared files
DesktopNative desktop appsDesktop, Frontend, and Shared files

Routes, crons, and databases are always backend. Pages, components, and stores are always frontend.

Secrets

Never put secrets (API keys, passwords) in a Frontend or Shared file: they end up in the code sent to the browser. Use a Backend configuration instead.

On-disk format ​

In the desktop app, a project is a folder. The luna.config.json file sits at the root and sources live in src/, with one file per Explorer item:

FileName on disk
Page or component<name>.lpml
Route<name>.route.lpl
Script<name>.lpl
Store<name>.lps
Database<name>.db.json
Configuration<name>.json
Text<name>.md
Cron<name>.cron.lpl
Type<name>.type.json
MediaThe binary file, e.g. photo.beef1234.jpg

Design tokens are stored in src/.tokens/ and plugin settings in src/.plugins/. These text formats work well with Git and with AI agents.