Skip to content

nimbus-engine/nimbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌩️ Nimbus Framework

anon-bob-2_a_Create_a_modern_GitH

Version Platform .NET Framework License

A lightweight, XML-based WPF framework for building modern Windows desktop applications with Hot Reload, declarative logic, and zero compilation wait time.

Features β€’ Installation β€’ Quick Start β€’ Documentation β€’ Examples


🌟 Features

  • πŸ”₯ Hot Reload - Edit your XML and see UI/Logic changes instantly without restarting.
  • πŸ› οΈ Built-in DevTools - Browser-based inspector (localhost:9222) for state, logs, and debugging.
  • ⚑ Declarative Logic - Write application logic in XML (<If>, <Loop>, <Set>, <Http>).
  • πŸ“¦ Single EXE Build - Compile your entire project into a standalone executable.
  • 🎨 Modern UI - Includes Windows 11 style components (GlassCard, Acrylic, Mica).
  • πŸ”Œ Plugin System - Extend functionality with C# plugins (.cs files).
  • πŸš€ Lightweight - Runs on any Windows machine with .NET 4.0+.

πŸ“₯ Installation

Option 1: Build from Source

To use the framework, you need to compile the engine first.

# 1. Clone the repository
git clone https://github.com/nimbus-engine/nimbus.git
cd nimbus-engine
cd src

# 2. Build the engine (using C# Compiler)
build.bat

# 3. Add to PATH (Optional)
# Move nimbus.exe to a folder in your system PATH to use it globally.

Option 2: Download Release

Download the latest binary from the Releases Page.


πŸš€ Quick Start

image

1. Create a Project

Create a new file named App.xml. This single file can contain your UI, Logic, and Styles.

<?xml version="1.0" encoding="utf-8"?>
<App Name="My First App" Width="600" Height="400" Theme="Dark">
    <UI>
        <Grid Background="#1E1E1E">
            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                <TextBlock Text="Hello, Nimbus!" FontSize="32" Foreground="White" Margin="0,0,0,20"/>
                <Button Content="Click Me!" 
                        Background="#0078D4" Foreground="White" Padding="20,10"
                        onClick="OnButtonClick"/>
                <TextBlock Name="lblStatus" Text="" Foreground="#888" Margin="0,15,0,0"/>
            </StackPanel>
        </Grid>
    </UI>

    <Logic>
        <Handler Name="OnButtonClick">
            <Set Target="lblStatus" Property="Text" Value="You clicked the button!"/>
            <Toast Message="Welcome to Nimbus" Type="success"/>
        </Handler>
    </Logic>
</App>

2. Run the App

nimbus run App.xml

3. Develop with Hot Reload

nimbus dev App.xml

This starts the DevTools server. Open http://localhost:9222 in your browser to inspect variables and view logs.


πŸ“– Documentation

CLI Commands

Command Usage Description
Run nimbus run <file> Runs the application normally.
Dev nimbus dev <file> Runs with Hot Reload and DevTools enabled.
Build nimbus build <file> Compiles the XML into a standalone .exe.
New nimbus new <name> Creates a new project structure.

Build Arguments

When building for production:

nimbus build App.xml --output ./dist --name MyApp --icon app.ico
  • --output, -o: Output directory (default: build)
  • --name, -n: Name of the executable.
  • --icon, -i: Path to .ico file.
  • --console: Keep console window (for debugging).

πŸ’‘ Examples

1. Counter (State Management)

Demonstrates variables and arithmetic operations.

<App Name="Counter" Width="300" Height="200">
    <UI>
        <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
            <TextBlock Name="txtCount" Text="0" FontSize="48" HorizontalAlignment="Center"/>
            <StackPanel Orientation="Horizontal" Margin="0,20,0,0">
                <Button Content="-" Width="40" onClick="Dec"/>
                <Button Content="+" Width="40" Margin="10,0,0,0" onClick="Inc"/>
            </StackPanel>
        </StackPanel>
    </UI>

    <Logic>
        <Var Name="count" Value="0" Type="int"/>

        <Handler Name="Inc">
            <Increment Var="count"/>
            <Set Target="txtCount" Property="Text" Value="{count}"/>
        </Handler>

        <Handler Name="Dec">
            <Decrement Var="count"/>
            <Set Target="txtCount" Property="Text" Value="{count}"/>
        </Handler>
    </Logic>
</App>

2. HTTP Request (API Integration)

Fetching data from a REST API.

<Handler Name="LoadData">
    <Set Target="lblStatus" Property="Text" Value="Loading..."/>
    
    <!-- Make GET request -->
    <HttpRequest Method="GET" 
                 Url="https://api.example.com/users" 
                 ToState="usersJson"/>
                 
    <If Condition="{usersJson} != ''">
        <Set Target="lblStatus" Property="Text" Value="Data Loaded!"/>
        <Plugin Name="JsonPlugin" Method="parse" Params="{usersJson}" ToState="users"/>
    </If>
</Handler>

3. Modal Dialogs & Control Flow

<Handler Name="DeleteItem">
    <Confirm Message="Are you sure you want to delete this file?" Title="Delete File">
        <Yes>
            <!-- User clicked Yes -->
            <Call Handler="PerformDelete"/>
            <Toast Message="File deleted" Type="success"/>
        </Yes>
        <No>
            <!-- User clicked No -->
            <Toast Message="Cancelled" Type="info"/>
        </No>
    </Confirm>
</Handler>

πŸ“‚ Project Structure

For larger applications, we recommend the following structure:

MyProject/
β”œβ”€β”€ App.xml             # Entry point
β”œβ”€β”€ nimbus.json         # Project configuration
β”œβ”€β”€ pages/              # UI Pages
β”‚   β”œβ”€β”€ Home.xml
β”‚   └── Settings.xml
β”œβ”€β”€ components/         # Reusable UI components
β”‚   └── Header.xml
β”œβ”€β”€ assets/             # Images and Icons
└── plugins/            # C# Plugins
    └── MyPlugin.cs

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Screenshots

image image image image image image

Made with ❀️ by the Nimbus Team

About

Build lightweight and beautiful Windows applications using only XML (and C#). No Visual Studio required.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors