Examples
Forge includes several example applications demonstrating different framework capabilities. Each example is a complete, runnable app you can use as a starting point for your own projects.
Running Examples
# Run any example with the CLIforge dev examples/todo-app
# Or using cargo during developmentcargo run -p forge_cli -- dev examples/todo-appExample Applications
Beginner
| Example | Description | Key Features |
|---|---|---|
| example-deno-app | Minimal starter app | Basic window, IPC |
| react-app | React + TypeScript starter | React integration, bundling |
| nextjs-app | Next.js integration | SSR patterns |
Intermediate
| Example | Description | Key Features |
|---|---|---|
| todo-app | Todo list with persistence | runtime:fs, file storage |
| weather-app | Weather with API calls | runtime:net, runtime:sys |
| text-editor | Simple text editor | Dialogs, clipboard, menus |
Advanced
| Example | Description | Key Features |
|---|---|---|
| system-monitor | System resource monitor | Multi-window, tray, process |
| svelte-app | Secure vault with SvelteKit | runtime:svelte, encryption |
| wasm-forge-example | WebAssembly integration | runtime:wasm |
| developer-toolkit | Full-featured dev tools | Code signing, crypto, shell |
Creating a New App
The quickest way to start a new Forge app is copying an example:
# Copy the todo-app as a starting pointcp -r examples/todo-app my-new-app
# Edit the manifestnano my-new-app/manifest.app.toml
# Run your appforge dev my-new-appApp Structure
All examples follow the standard Forge app structure:
my-app/├── manifest.app.toml # App configuration and capabilities├── deno.json # Deno configuration (TypeScript, imports)├── src/│ └── main.ts # Deno entry point (app logic)└── web/ └── index.html # WebView content (UI)Capability Patterns
Examples demonstrate different capability configurations:
Minimal (example-deno-app)
[capabilities.channels]allowed = ["*"]File Access (todo-app)
[capabilities.fs]read = ["~/.forge-todo.json"]write = ["~/.forge-todo.json"]Network + Notifications (weather-app)
[capabilities.net]fetch = ["https://api.open-meteo.com/*"]
[capabilities.sys]notifications = trueFull Access (developer-toolkit)
[permissions.fs]read = ["**/*"]write = ["**/*"]
[permissions.process]allow = ["codesign", "signtool", "openssl"]