Skip to content

Commit d13cf8a

Browse files
committed
docs: update Arduino App specification for clarity and completeness
1 parent 7c6699e commit d13cf8a

File tree

1 file changed

+42
-12
lines changed

1 file changed

+42
-12
lines changed

docs/app-specification.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,47 @@
11
# Arduino App specification
2-
This is the specification for the `Arduino App` (from now on called App) format to be used with `arduino-app-cli`.
2+
This is the specification for the `Arduino App` (from now on called App) format to be used with `arduino-app-cli` and `Arduino App Lab`.
33

4+
## Arduino App Folder structure
45
An App is a self-contained folder that includes the following components:
5-
- `app.yaml` (mandatory) the file descriptor of the app in YAML format.
6-
- `sketch` (optional) the folder containing an Arduino [Sketch](https://arduino.github.io/arduino-cli/1.3/sketch-specification/))
7-
- `python` (optional) the folde containin the Python code
6+
- `app.yaml` (mandatory) the file descriptor of the app in YAML format.
7+
- `sketch` (optional) the folder containing an Arduino [Sketch](https://arduino.github.io/arduino-cli/1.3/sketch-specification/)).
8+
- `python` (optional) the folder containing the Python code.
9+
At least one on `sketch` or `python` folder must be present.
810

911
The App must be self-contained (it does not contain references to external files) because this means it can be exported, shared, or zipped easily.
1012

11-
## Arduino App Folder structure
13+
Example of a `my-app` folder structure
1214
```
13-
myapp/
15+
my-app/
16+
README.md
1417
app.yaml
1518
sketch/
1619
sketch.ino
1720
sketch.yaml
1821
python/
1922
main.py
20-
requirements.txt
2123
```
2224

25+
## `README.md` file
26+
An (optional) readme file in markdown.
27+
The link to local resources must be in the same folder of the app. For example, a png inside the folder `myapp/docs/my-banner.png` can be referenced using ![My App](docs/my-banner.png) syntax.
28+
29+
### `app.yaml` file descriptor
30+
The `app.yaml` (or `app.yml`) is a YAML file that describes an App.
2331

24-
## App descriptor file
25-
The `app.yaml` is the YAML specificaiotn of an APP.
32+
- `name`: (optional) a short name of the app.
33+
- `description`: (optional) a brief description of the app.
34+
- `icon`: (optional) the emoji of the app
35+
- `ports`: (optional) a list of ports to be exposed externally. If not given a random port is opened (if necessary).
36+
- `bricks` (optional) a list of bricks used by the app with its variable definitions.
2637

27-
- `name` - the name of the app.
38+
Example:
2839
```yaml
2940
name: My Arduino App
3041
description: An example app showcasing what you can do
3142
icon: 🍓
43+
ports:
44+
- 7000
3245

3346
bricks:
3447
- arduino/dbstorage:
@@ -39,5 +52,22 @@ bricks:
3952
model: gemma-1
4053
- arduino/objectdetection:
4154
model: yolo
42-
- arduino/mqtt
43-
```
55+
```
56+
57+
58+
### `sketch` sub folder
59+
The content of the `sketch` subfolder contains the Ardiuno skecth.
60+
It must omply with the [Sketch specification](https://arduino.github.io/arduino-cli/1.3/sketch-specification/).
61+
62+
If present it must contain the followign files:
63+
- `sketch.ino`
64+
- `sketch.yaml` that is compliant to the [Sketch project file](https://arduino.github.io/arduino-cli/1.3/sketch-project-file/)
65+
66+
### `python` sub folder
67+
The content of the `python` contains the python code.
68+
69+
If present, it must contain the `main.py` with the python code of the main.
70+
Optionally, a `requirements.txt` with additional python package dependencies to be installed.
71+
72+
### Other
73+
The folder can be added to the folder structure

0 commit comments

Comments
 (0)