You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/create-an-edge-app/SKILL.md
+15-31Lines changed: 15 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,56 +7,40 @@ description: The recommended way to create an Edge App
7
7
8
8
## When Creating an Edge App
9
9
10
-
- Create a new directory for a new Edge App inside the `edge-apps/` directory.
11
-
- The directory name should follow the `kebab-case` naming convention.
10
+
- Scaffold the new Edge App using the `bun create` template from inside the `edge-apps/` directory:
11
+
```bash
12
+
bun create edge-app-template --no-git <app-name>
13
+
```
14
+
- The app name should follow the `kebab-case` naming convention.
15
+
- After scaffolding, add an `id` field to `screenly.yml` and `screenly_qc.yml` before running `bun run dev`.
12
16
-**Consult Figma designs** before starting implementation.
13
17
- Ensure the [Figma MCP server](https://mcp.figma.com/mcp) is set up in Claude Code.
14
18
- Use the Figma MCP server to access design specifications, mockups, and UI requirements.
15
19
- Extract design tokens such as colors, spacing, typography, and component specifications from Figma.
16
20
- Ensure the implementation matches the approved designs in Figma before proceeding with development.
17
21
18
-
## Directory Structure
22
+
## Reference Apps
19
23
20
-
The new Edge App directory structure should closely resemble that of the following Edge Apps:
24
+
For reference on more complex implementations, consult:
21
25
22
-
- QR Code (`edge-apps/qr-code/`)
23
-
- Menu Board (`edge-apps/menu-board/`)
24
-
- Grafana (`edge-apps/grafana/`)
25
-
- CAP Alerting (`edge-apps/cap-alerting/`)
26
+
- QR Code (`edge-apps/qr-code/`) — simple, low-footprint example
27
+
- Menu Board (`edge-apps/menu-board/`) — more complex layout
28
+
- CAP Alerting (`edge-apps/cap-alerting/`) — advanced settings and data fetching
26
29
27
-
These Edge Apps heavily rely on the Edge Apps library, which lives inside the `edge-apps/edge-apps-library/` directory.
28
-
29
-
- Most of the scripts inside the `package.json` of each of these apps execute the `edge-apps-scripts` command.
30
-
- All of these apps depend on the `@screenly/edge-apps` library, which maps to `workspace:../edge-apps-library`.
31
-
-`edge-apps/[new-edge-app]/src/main.ts` is a required file.
32
-
- Running `bun run build` inside `edge-apps/[new-edge-app]` will run `edge-apps-scripts build`, which is very opinionated.
33
-
34
-
Refer to `edge-apps/qr-code/` as a complete working template to understand the full directory structure and configuration.
35
-
36
-
- While it still uses the `@screenly/edge-apps` library, it features a simpler implementation with a lower code footprint compared to the other aforementioned Edge Apps, making it an excellent starting point for new projects.
37
-
- The library abstracts much of the complexity, allowing developers to focus on core functionality with minimal boilerplate.
30
+
All apps depend on the `@screenly/edge-apps` library (`workspace:../edge-apps-library`) and use `edge-apps-scripts` for tooling.
38
31
39
32
### About the Manifest Files
40
33
41
-
The new app should have the following manifest files:
42
-
43
-
-`screenly.yml`
44
-
-`screenly_qc.yml`
45
-
46
-
See `edge-apps/qr-code/screenly.yml` for a working example. More information about the manifest files can be found in the [Edge Apps documentation in the `Screenly/cli` repository](https://raw.githubusercontent.com/Screenly/cli/refs/heads/master/docs/EdgeApps.md).
47
-
48
-
When creating the manifest files, ensure to:
49
-
50
-
- Omit the `id` field, as it will be added later when the new app gets deployed.
34
+
- Add any app-specific settings under the `settings` key, sorted alphabetically.
35
+
- More information about manifest files can be found in the [Edge Apps documentation in the `Screenly/cli` repository](https://raw.githubusercontent.com/Screenly/cli/refs/heads/master/docs/EdgeApps.md).
51
36
52
37
### About `index.html`
53
38
54
-
The `index.html` file should follow these best practices:
55
39
- Organize HTML code into templates and Web Components as the app grows in complexity.
56
40
- Use HTML content templates first for simpler structures.
57
41
- Consider using Web Components for more complex UI components that require encapsulation and reusability.
58
42
59
43
### About `README.md`
60
44
61
45
- Include instructions on how to create, build, test, format, lint, and deploy the app.
62
-
- Do not add details like the directory structure, as the code frequently changes.
46
+
- Do not add details like the directory structure, as the code frequently changes.
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,16 @@ If you are not familiar with Edge Apps, we suggest you review our [developer doc
35
35
-[Weather App](https://github.com/Screenly/Playground/tree/master/edge-apps/weather) - A simple weather app.
36
36
-[Welcome App](https://github.com/Screenly/Playground/tree/master/edge-apps/welcome-app) - A customizable welcome screen app.
37
37
38
+
### Creating a New Edge App
39
+
40
+
To scaffold a new Edge App, run the following from the `edge-apps/` directory:
41
+
42
+
```bash
43
+
bun create edge-app-template --no-git <your-app-name>
44
+
```
45
+
46
+
This generates a new app with TypeScript, the Screenly design system, manifest files, and all standard scripts pre-configured. See [`edge-apps/README.md`](/edge-apps/README.md) for full details.
47
+
38
48
### TypeScript Library (New)
39
49
40
50
The Playground also offers an Edge Apps library that contains utilities for building Edge Apps including helper functions.
|`display_errors`| Display errors on screen for debugging purposes | optional |`false`|
26
+
|`message`| The message to display on screen | required |`Hello, World!`|
27
+
|`override_locale`| Override the default locale with a supported language code | optional |`en`|
28
+
|`override_timezone`| Override the default timezone with a supported timezone identifier (e.g., `Europe/London`, `America/New_York`). Defaults to the system timezone if left blank | optional | - |
29
+
30
+
## Development
31
+
32
+
```bash
33
+
bun install # Install dependencies
34
+
bun run dev # Start development server
35
+
```
36
+
37
+
## Testing
38
+
39
+
```bash
40
+
bun test
41
+
```
42
+
43
+
## Screenshots
44
+
45
+
Generate screenshots at all supported resolutions:
46
+
47
+
```bash
48
+
bun run screenshots
49
+
```
50
+
51
+
Screenshots are saved to the `screenshots/` directory.
help_text: For debugging purposes to display errors on the screen.
17
+
type: boolean
18
+
schema_version: 1
19
+
message:
20
+
type: string
21
+
default_value: Hello, World!
22
+
title: Message
23
+
optional: false
24
+
help_text: |
25
+
The message to display on screen.
26
+
override_locale:
27
+
type: string
28
+
default_value: en
29
+
title: Override Locale
30
+
optional: true
31
+
help_text: |
32
+
Override the default locale with a supported language code (e.g., en, fr, de). Defaults to English if not specified.
33
+
override_timezone:
34
+
type: string
35
+
default_value: ''
36
+
title: Override Timezone
37
+
optional: true
38
+
help_text: |
39
+
Override the default timezone with a supported timezone identifier (e.g., Europe/London, America/New_York). Defaults to the system timezone if left blank.
0 commit comments