# How to use the app boilerplate

This guide shows you how to fork and set up the Ledger app boilerplate to start building a  app.

The boilerplate showcases the Ledger Device SDK and the surrounding development tooling: Docker containers, Speculos emulator, and the Ragger test framework. It includes examples for APDU handling, UI flows, cryptography, and build/test/CI integration.

**Who this is for:**

- Developers beginning  app development.
- Developers who want a concise reference for build, test, and CI logic in a  app.

**Supported devices:** Nano S+, Nano X, Stax, Flex, and Nano Gen5.

## Quick start

### C

### Fork the app boilerplate (C)

[Click here](https://github.com/LedgerHQ/app-boilerplate) to fork the repository and start your project.

### Set up the VSCode extension

[Use Ledger's VSCode developer tools](../../beginner/vscode-extension) to build, run on Speculos, run functional tests, and load on a device from the VSCode UI.

### Rust

### Fork the app boilerplate (Rust)

[Click here](https://github.com/LedgerHQ/app-boilerplate-rust) to fork the repository and start your project.

### Set up the VSCode extension

[Use Ledger's VSCode developer tools](../../beginner/vscode-extension) to build, run on Speculos, run functional tests, and load on a device from the VSCode UI.

## Continuous Integration (CI)

Two workflows are required for app submission: **Build\_and\_functional\_tests** and **Guidelines\_enforcer**.

> **Warning:** Setting up an efficient CI pipeline is crucial for your project's success. The <b>Guidelines enforcer</b> and <b>Build and run functional tests</b> workflows are <b>mandatory</b> for submitting your device application for review.

### C

### Build\_and\_functional\_tests

[Build\_and\_functional\_tests](https://github.com/LedgerHQ/app-boilerplate/blob/master/.github/workflows/build_and_functional_tests.yml) builds the app and runs functional tests using Ragger and Speculos.

### Guidelines\_enforcer

[Guidelines\_enforcer](https://github.com/LedgerHQ/app-boilerplate/blob/master/.github/workflows/guidelines_enforcer.yml) calls a reusable guidelines\_enforcer workflow used for submission checks.

### Rust

### Build\_and\_functional\_tests

[Build\_and\_functional\_tests](https://github.com/LedgerHQ/app-boilerplate-rust/blob/main/.github/workflows/build_and_functional_tests.yml) builds the app and runs functional tests using Ragger and Speculos.

### Guidelines\_enforcer

[Guidelines\_enforcer](https://github.com/LedgerHQ/app-boilerplate-rust/blob/main/.github/workflows/guidelines_enforcer.yml) calls a reusable workflow used for submission checks.

## Troubleshooting

**The `Guidelines_enforcer` workflow fails in CI.**
Review the workflow logs to identify the specific rule that failed. Common causes include missing or incorrectly formatted app metadata (in `ledger_app.toml`) and icon size issues. Refer to the [development requirements](../requirements/development) page for the full list of checks.

**Speculos does not launch on macOS.**
Make sure XQuartz is running and that you have enabled "Allow client connections" under **XQuartz > Preferences > Security**. Then restart the Docker container.

## Next steps

After forking either boilerplate and reviewing the included CI workflows and guidelines, adapt the application to your project by:

- Updating metadata in `ledger_app.toml`.
- Implementing your APDU handlers.
- Designing UI flows that follow the [graphic library usage guidelines](../design-guidelines/intro).

When your app is ready, follow the [submission process](../../submission-process/process) to submit it for review.
