@isthatuzii/create-nano-app
Version:
Desktop application scaffolding tool for the Nano Framework
97 lines (68 loc) • 2.46 kB
Markdown
# {{PROJECT_NAME}}
A Nano Framework application built with Rust + {{FRAMEWORK}}.
## Getting Started
### Prerequisites
- [Rust](https://rustup.rs/) (latest stable)
- [Node.js](https://nodejs.org/) (18+)
- {{PACKAGE_MANAGER}}
### Development
```bash
# Install dependencies
{{INSTALL_COMMAND}}
# Start development server with hot reload
{{PACKAGE_MANAGER}} run nano:hot
# Or build and run manually
{{PACKAGE_MANAGER}} run nano
```
### Available Scripts
- `{{PACKAGE_MANAGER}} run dev` - Start frontend development server
- `{{PACKAGE_MANAGER}} run build` - Build frontend for production
- `{{PACKAGE_MANAGER}} run nano` - Build frontend and run desktop app
- `{{PACKAGE_MANAGER}} run nano:hot` - Development with hot reload
- `{{PACKAGE_MANAGER}} run nano:release` - Build portable release executable
### Rust Commands
```bash
# Check Rust code for errors
cargo check
# Run Rust backend directly
cargo run
# Build optimized release
cargo build --release
```
## Project Structure
```
{{PROJECT_NAME}}/
├── src-nano/ # Rust backend source
│ ├── main.rs # Application entry point
│ ├── server.rs # HTTP server with API routes
│ ├── config.rs # Configuration management
│ └── modules/ # Backend modules
├── src/ # {{FRAMEWORK}} frontend source
├── dist/ # Built frontend (generated)
├── nano.config.json # Nano Framework configuration
├── Cargo.toml # Rust dependencies
└── package.json # Node.js dependencies
```
## Configuration
Edit `nano.config.json` to customize:
- Window properties (size, decorations, etc.)
- Server settings (host, port)
- Development options (devtools, hot reload)
## API Routes
The backend provides these API endpoints:
- `GET /api/system-info` - Get system information
- `GET /api/greet?name=<name>` - Greeting endpoint
- `POST /api/notify` - Send notifications
## Building for Distribution
```bash
# Build portable executable
{{PACKAGE_MANAGER}} run nano:release
# Find your executable in:
./nano-portable-release/
```
## Documentation
- [Nano Framework Docs](https://nano-framework.dev)
- [{{FRAMEWORK}} Documentation]({{FRAMEWORK_DOCS}})
- [Rust Documentation](https://doc.rust-lang.org/)
## License
This project was created with Nano Framework.