Build awesome Golang desktop apps and beautiful interfaces with Vue.js, React.js, Framework 7, and more...

Overview

Guark

Guark allows you to build beautiful user interfaces using modern web technologies such as Vue.js, React.js..., while your app logic handled and powered by the amazing Go.

Installation ❘ Getting Started ❘ Contributing ❘ License

Guark Vue Template

🖳 About The Project

Guark is an open-source framework to build cross platform desktop GUI applications.

📢 What Guark stands for?

Go + Quark = Guark

🔮 Guark mission

Simplify cross platform desktop apps development.

🎸 How it works

Demo Video: https://youtu.be/_k_tq9sj-do

Guark backend and logic part handled by native Go code, while the user interfaces built with modern web technologies (Vue.js, React.js, etc...), and with Guark javascript API you can communicate between your Go and UI framework, and calling your exported Go functions and plugin(s) methods.

💌 Main Features

  • Desktop applications with GO ♥
  • One codebase for Gnu/Linux, macOS, and Windows.
  • UI Hot Reload.
  • You can use any front end framework.
  • Supports Chrome, and native webview engine or both.
  • Windows MSI bundler builtin.

📜 Installation

1. Install guark CLI tool:

go get -u github.com/guark/guark/cmd/guark

2. Some Requirements:

// fedora
sudo dnf install gtk3-devel webkit2gtk3-devel gcc-c++ pkgconf-pkg-config

// Ubuntu
sudo apt install libgtk-3-dev libwebkit2gtk-4.0-dev build-essential

// Windows
// https://jmeubank.github.io/tdm-gcc/download/

Getting Started

After installing guark CLI tool, the next step is to create a new guark project based on the template that you like:

Create a new project

# cd to empty directory and run:
guark init --template vue --mod github.com/username/appname

Start Dev Server

After creating new project run:

guark run

Export your first GO function to JS API

1. Create a new file in lib/funcs directory:
// lib/funcs/foo_bar.go

import (
    "github.com/guark/guark/app"
)

func FooBar(c app.Context) (interface{}, error) {

   c.App.Log.Debug("Foo bar called")

   return "This is a my return value to javasript", nil
}
2. Then export it to Guark JS API in lib/config.go file:
// Exposed functions to guark Javascript api.
var Funcs = app.Funcs{
    "foo": funcs.FooBar,
}
3. Then you can call your function in javascript:
import g from "guark"

g.call("foo")
    .then(res => console.log(res))
    .catch(err => console.error(err))

See Vue template as an example: https://github.com/guark/vue

Guark Engines:

You can change the engine in guark.yaml file.

  • webview: Uses native system webview.
  • chrome: Uses and requires google chrome.
  • hybrid: Uses chrome if exists in the system, if chrome not available guark will switch to native webview by default.

Build Your App

You can build your app with

guark build

Bundle Windows App

After building your app you can bundle your windows app into msi using WIX.

guark bundle

Wix required!

Install it from: https://wixtoolset.org/

Cross Compiling To Windows From Gnu/Linux:

You can build windows app from your linux based system, using mingw64

1. Install mingw64:

// Fedora
sudo dnf install mingw64-gcc

// Ubuntu
sudo apt install binutils-mingw-w64

2. Configure guark-build.yaml File:

Double check the binary paths in guark-build.yaml.

3. Build The App:

# this command will build and compile linux, and windows app. you can find your compiled apps in `dist/` directory.
guark build --target linux --target windows

You can use any cross compiler for example: guark build --target darwin. just change the options in guark-build.yaml file.

Note

You can also bundle windows app into MSI file from your linux based system via guark bundle, but you need to install wix tools:

# fedora
dnf install msitools

# Ubuntu
sudo apt-get install wixl

Contributing

PRs, issues, and feedback from ninja gophers are very welcomed.

License

Guark is provided under the MIT License.

Comments
  • Installation on windows using zserge instead of webview

    Installation on windows using zserge instead of webview

    Device:

    • OS: Windows
    • Version: 10
    • Go Version: 1.15

    Describe the bug When running the installation on Windows, it is trying to use zserge/webview instead of webview/webview.

    go get: github.com/zserge/[email protected] updating to
            github.com/zserge/[email protected]: parsing go.mod:
            module declares its path as: github.com/webview/webview
                    but was required as: github.com/zserge/webview
    

    Cloning from the guark repository itself, seems to compile ok, but when trying to init I get an error:

    2020/11/03 07:43:39 Request error: 404 for https://api.github.com/repos/guark/-vue/contents/guark.yaml

    To Reproduce Steps to reproduce the behavior:

    1. go get -u github.com/guark/guark/cmd/guark

    Expected behavior Should use github.com/webview/webview dependency and not the older zserge/webview

    opened by SGarno 15
  • no window show on macos

    no window show on macos

    Device:

    • OS: [MacOS]
    • Version: 13.6
    • Go Version: 14.3

    Describe the bug when i run command guark dev

    ❯ guark dev
    ✔ UI server started successfully.
    ✔ Starting guark dev app...
    DEBU[0000] config loaded.                                context=guark
    DEBU[0000] Initialize plugins.                           context=guark
    DEBU[0000] Init: dialog plugin.                          context=app
    DEBU[0000] Init: notify plugin.                          context=app
    DEBU[0000] Init: clipboard plugin.                       context=app
    DEBU[0000] Plugins Initialized.                          context=guark
    DEBU[0000] starting guark server.                        context=guark
    DEBU[0000] Starting new window.                          context=guark
    DEBU[0000] ---- HOOK: App created! ----                  context=app
    DEBU[0000] ---- HOOK: App mounted! ----                  context=app
    

    all looks right.app run but no window show.

    opened by goodking-bq 14
  • guark run - level=fatal msg=

    guark run - level=fatal msg="exec: \"\": executable file not found in %PATH%" lebel=app

    Device:

    • OS: Windows
    • Version: 10
    • Go Version: g1.16.2

    Describe the bug guark run fails with the following error

    D:\src\guark>guark run
    warning ..\..\package.json: No license field
    ✔ UI server started successfully.
    ✔ Starting guark dev app...
    time="2021-03-12T14:32:36+01:00" level=fatal msg="exec: \"\": executable file not found in %PATH%" lebel=app
    exit status 1
    exit status 1
    

    To Reproduce

    1. go get -u github.com/guark/guark/cmd/guark
    2. guark init --template vue --mod tools.rpi/Ghardo/guark
    3. guark run

    tools.rpi/Ghardo/guark is a git repo in my private network

    opened by Ghardo 7
  • Go get deprecated

    Go get deprecated

    Device:

    • OS: Linux Mint
    • Version: 20.2 Uma
    • Go Version: go1.17.6

    Describe the bug I wanted install Guark (your instructions) and I had this message:

    CODE: go get -u github.com/guark/guark/cmd/guark

    OUTPUT: go get: installing executables with 'go get' in module mode is deprecated. Use 'go install [email protected]' instead. For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.

    github.com/guark/guark/cmd/guark/utils

    go/pkg/mod/github.com/guark/[email protected]/cmd/guark/utils/output.go:25:14: o.spinner.Active undefined (type *yacspin.Spinner has no field or method Active)

    I intent to solve this problem but it doesn't worked:

    CODE: go install github.com/guark/[email protected]

    OUTPUT: go install: github.com/guark/[email protected]: module github.com/guark/[email protected] found (v0.1.1), but does not contain package github.com/guark/guark

    What I can to do?

    opened by argigeek 3
  • How Guark Communicates with GO from Javascript ?

    How Guark Communicates with GO from Javascript ?

    Hi @melbahja,

    Thanks for building a great tool. I really loved this.

    But i have question i would like to know how guark communicates with GO functions from JS Webview under hood ?

    Does it communicates via websocket, http or what ?

    Thank you

    opened by khanakia 2
  • Dev 0.1.0

    Dev 0.1.0

    v0.1.0 release WIP.

    v0.1.0 Goals

    • Clean actions code.
    • Add: runtime configuration ~~.guarkrc~~ build.yaml file to specify cross compilers.
    • Fix: embed all assets in the binary.
    • Fix: serve files from FS instead of local http server (windows only).
    • Add: manifest for windows (meta file).
    • Add: embed icon and manifest in windows binaries.
    • Add: entry point (open with).
    • Add: bundler (eg: AppImage)
    • Resolve: #15 and #12
    Not Ready Yet 
    opened by melbahja 2
  • Installation error

    Installation error

    Device:

    • OS: Windows
    • Version: 10
    • Go Version: 1.13

    Describe the bug When I try to install it appears undefined vars and does not install completely

    To Reproduce Steps to reproduce the behavior:

    1. Empty project
    2. go get -u github.com/guark/guark/cmd/guark

    Screenshots Image

    opened by fj-onathan 2
  • failed to install debian

    failed to install debian

    Device:

    • OS: debian
    • Version: buster (10)
    • Go Version: go version go1.15.3 linux/amd64

    Describe the bug

    Unable to install due to go dependencies

    To Reproduce

    1. Install Ubuntu dependencies successfully
    2. Install guark as described in readme

    Expected behavior

    I expected guark to install correctly :-)

    Screenshots

    [email protected]:~$ go get -u github.com/guark/guark/cmd/guark
    # github.com/theckman/yacspin/vendor/golang.org/x/sys/unix
    go/src/github.com/theckman/yacspin/vendor/golang.org/x/sys/unix/affinity_linux.go:14:20: undefined: _CPU_SETSIZE
    go/src/github.com/theckman/yacspin/vendor/golang.org/x/sys/unix/affinity_linux.go:14:35: undefined: _NCPUBITS
    go/src/github.com/theckman/yacspin/vendor/golang.org/x/sys/unix/affinity_linux.go:17:25: undefined: cpuMask
    
    opened by yippyskippy 1
  • install fail

    install fail

    Device:

    • OS: [Windows]
    • Version:10
    • Go Version: 1.14.6

    Describe the bug install fail

    To Reproduce Run "go get -u github.com/guark/guark/cmd/guark"

    Expected behavior go: found github.com/guark/guark/cmd/guark in github.com/guark/guark v0.0.1 go: github.com/mattn/go-colorable upgrade => v0.1.7 go: github.com/logrusorgru/aurora upgrade => v2.0.3+incompatible go: github.com/mattn/go-isatty upgrade => v0.0.12 go: github.com/cpuguy83/go-md2man/v2 upgrade => v2.0.0 go: golang.org/x/sys upgrade => v0.0.0-20200724161237-0e2f3a69832c go: github.com/lunixbochs/vtclean upgrade => v1.0.0 go: gopkg.in/yaml.v2 upgrade => v2.3.0 go: github.com/zserge/webview upgrade => v0.0.0-20200724072439-e0c01595b361 go get: github.com/zserge/[email protected] updating to github.com/zserge/[email protected]: parsing go.mod: module declares its path as: github.com/webview/webview but was required as: github.com/zserge/webview

    opened by cool222 1
  • added the ability to use a temporary profile for lorca

    added the ability to use a temporary profile for lorca

    There is an issue on windows with lorca where it doesn't close gracefully, causing the app then launch a chrome browser window. By using a temporary profile, chrome doesn't remember that it wasn't closed gracefully and will not complain.

    This is also a bandaid fix for #53

    opened by Luberry 0
  • Embeded resources on Windows is created using \ instead of / in resource path

    Embeded resources on Windows is created using \ instead of / in resource path

    Device:

    • OS: Windows
    • Version: 10
    • Go Version: 1.15

    Describe the bug On windows, a guark build generates embedded paths using \ instead of /.

    This creates a build error

    ⠇ Building Windows App...# example.com/test/myApp/lib
    lib\embed.go:13:5: unknown escape
    lib\embed.go:15:3: duplicate key "" in map literal
            previous key at lib\embed.go:13:3
    lib\embed.go:15:5: unknown escape
    lib\embed.go:16:3: duplicate key "" in map literal
            previous key at lib\embed.go:13:3
    lib\embed.go:16:5: unknown escape
    lib\embed.go:17:3: duplicate key "" in map literal
            previous key at lib\embed.go:13:3
    lib\embed.go:17:5: unknown escape
    lib\embed.go:18:3: duplicate key "" in map literal
            previous key at lib\embed.go:13:3
    lib\embed.go:18:5: unknown escape
    

    To Reproduce Steps to reproduce the behavior:

    1. Install guark on windows
    2. Build demo

    Expected behavior

    File IDs should be

    "/css/app.1748279e.css": &[]byte{...}

    instead of

    "\css\app.1748279e.css": &[]byte{...}

    Additional context Hack:

    		embeds = append(embeds, &Item{
    			ID:   strings.Replace(files[i], e.Root, "", 1),
    			Path: files[i],
    			Data: gzdata.Bytes(),
    		})
    

    to

    		embeds = append(embeds, &Item{
    			ID:   strings.Replace(strings.Replace(files[i], e.Root, "", 1), "\\", "/", -1),
    			Path: files[i],
    			Data: gzdata.Bytes(),
    		})
    
    opened by SGarno 0
  • Window build exe opening the chrome window

    Window build exe opening the chrome window

    Hi,

    Thanks for creating this tool. Love to work.

    After I build the windows EXE when I open it for the first time it is working fine. Without closing the window when I open second-time multiple windows appear and only one window contains actual data the other screens are blank.

    After I close all the window, every time i click on EXE it is opening in chrome instead of an inbuilt window and it is showing "Chrome is controlled by automated software"

    image

    opened by brpradeepprabhu90 7
  • Dialog bug

    Dialog bug

    Device:

    • OS: macOS Big Sur
    • Version: 11.2
    • Go Version: 1.16.5

    Describe the bug Sometimes dialog function (dialog.info, dialog.error, dialog.file) doesn't pop up after calling it via button click. And if it's already show up, I can't close it.

    To Reproduce Steps to reproduce the behavior:

    1. Just create fresh guark app with guark init --template vue --mod github.com/username/appname
    2. Run guark run
    3. Try to click one of dialog button.

    Expected behavior Dialog should be pop up when calling it via button click, and can be close as well.

    Screenshots Some screen recording https://drive.google.com/file/d/1VwiWlF_EN7aVX_IrEOhfN50gLNrxkB8q/view?usp=sharing

    Additional context Not sure this will be useful, but I'm running on MacBook Pro Retina 13", Early 2015, with 8 GB RAM

    opened by hussaini 2
  • Init With No Template?

    Init With No Template?

    I was wondering if there is a way to init a new project without any UI frameworks, but still get the bare bones skeleton of the necessary files?

    Or if don't have to init what would be the bare bones skeleton files that would otherwise be needed?

    Thanks for the help.

    opened by wwderw 1
  • How to prevent console messages getting intercepted.

    How to prevent console messages getting intercepted.

    When a standard console.log() is issued, Guark seems to intercept this and sends it through logrus(?) with json formatting. How can this be disabled or at least change the format to text instead of JSON?

    I have changed the Guark logrus to use console formatting, and it works for all things going through the app context, but for some reason the console.log gets intercepted and do not go through the Guark log. I am not sure where this is occurring.

    Any ideas would be appreciated.

    opened by SGarno 0
  • How to run in debug & test mode?

    How to run in debug & test mode?

    How can I run Guark in debug mode from VSCode? Engine.new is undefined since it requires the guark cli.

    Also, I need to run tests that interoperate with the UI and Guark. How can I bootstrap tests where Guark is enabled?

    opened by SGarno 1
Owner
Guark.
Build Cross Platform GUI Desktop Apps With GO.
Guark.
The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!

Axiom is a dynamic infrastructure framework to efficiently work with multi-cloud environments, build and deploy repeatable infrastructure focussed on

pry0cc 3k Nov 27, 2022
✒ A self-hosted, cross-platform service to sign iOS apps using any CI as a builder

iOS Signer Service A self-hosted, cross-platform service to sign iOS apps using any CI as a builder Introduction There are many reasons to install app

null 879 Nov 24, 2022
A golang based exp for CVE-2021-4034 dubbed pwnkit (more features added......)

PwnKit-go-LPE (CVE-2021-4034) A golang based exp for CVE-2021-4034 dubbed pwnkit @@@@@@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@@@@@

lUc1f3r11 4 Nov 9, 2022
DockerSlim (docker-slim): Don't change anything in your Docker container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)

Minify and Secure Docker containers (free and open source!) Don't change anything in your Docker container image and minify it by up to 30x making it

docker-slim 15.5k Nov 25, 2022
Take a list of domains and scan for endpoints, secrets, api keys, file extensions, tokens and more...

Take a list of domains and scan for endpoints, secrets, api keys, file extensions, tokens and more... Coded with ?? by edoardottt. Share on Twitter! P

gilfoyle97 639 Nov 27, 2022
A port scan and service weakpass brute tool build by golang.

A port scan and service weakpass brute tool build by golang.

M1ku 73 Nov 22, 2022
EarlyBird is a sensitive data detection tool capable of scanning source code repositories for clear text password violations, PII, outdated cryptography methods, key files and more.

EarlyBird is a sensitive data detection tool capable of scanning source code repositories for clear text password violations, PII, outdated cryptograp

American Express 516 Nov 20, 2022
Hashing algorithms simplified (supports Argon2, Bcrypt, Scrypt, PBKDF2, Chacha20poly1305 and more in the future)

PHC Crypto Inspired by Upash, also implementing PHC string format Usage Currently there are two options of using this package: Import all Import speci

Reinaldy Rafli 23 Nov 27, 2022
Analyse binaries for missing security features, information disclosure and more.

extrude Analyse binaries for missing security features, information disclosure and more. ?? Extrude is in the early stages of development, and current

Liam Galvin 48 Oct 12, 2022
Build Go applications for IOS

go-build-for-ios Build Go applications for IOS This repository contains a PoC that lets you build any Go application for IOS platform. Cross-compilati

Marcin Tojek 20 Jul 18, 2022
Build & Scan - Container Image

BSImage (build&scan image) Requirements Trivy Docker BSImage (shell script version) Usage of build (shell script version) ./bsimage.sh start <image:ta

Carlos Eduardo Vieira 1 Apr 12, 2022
Build LDAP services w/ Go

gldap gldap is a framework for building LDAP services. Among other things, it defines abstractions for: Server: supports both LDAP and LDAPS (TLS) pro

Jim 81 Nov 14, 2022
A Flask-based HTTP(S) command and control (C2) framework with a web frontend. Malleable agents written in Go and scripts written in bash.

▄▄▄▄ ██▓ █████▒██▀███ ▒█████ ██████ ▄▄▄█████▓ ▓█████▄ ▓██▒▓██ ▒▓██ ▒ ██▒▒██▒ ██▒▒██ ▒ ▓ ██▒ ▓▒ ▒██▒ ▄██▒██▒▒████ ░▓██ ░▄█ ▒▒██░ ██▒░

Ashley Nikirk 28 Nov 18, 2022
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Cossack Labs 1.6k Nov 21, 2022
Declarative penetration testing orchestration framework

Decker - Penetration Testing Orchestration Framework Purpose Decker is a penetration testing orchestration framework. It leverages HashiCorp Configura

Steven Aldinger 274 Nov 10, 2022
A framework for creating COM-based bypasses utilizing vulnerabilities in Microsoft's WDAPT sensors.

Dent More Information If you want to learn more about the techniques utlized in this framework please take a look at this article. Description This fr

Optiv Security 292 Nov 16, 2022
Ladon Pentest Scanner framework 全平台Go开源内网渗透扫描器框架,Windows/Linux/Mac内网渗透,使用它可轻松一键批量探测C段、B段、A段存活主机、高危漏洞检测MS17010、SmbGhost,远程执行SSH/Winrm,密码爆破SMB/SSH/FTP/Mysql/Mssql/Oracle/Winrm/HttpBasic/Redis,端口扫描服务识别PortScan指纹识别/HttpBanner/HttpTitle/TcpBanner/Weblogic/Oxid多网卡主机,端口扫描服务识别PortScan。

Ladon Scanner For Golang Wiki http://k8gege.org/Ladon/LadonGo.html 简介 LadonGo一款开源内网渗透扫描器框架,使用它可轻松一键探测C段、B段、A段存活主机、指纹识别、端口扫描、密码爆破、远程执行、高危漏洞检测等。3.6版本包含2

null 1.1k Nov 23, 2022
Secure Boot certificates from the Framework Laptop

Framework Laptop UEFI Secure Boot Certificates Source: Extracted from a live machine (FRANBMCP08) Date: 2021-10-21 KEK (Key Exchange Key) This certifi

Dustin L. Howett 20 Nov 21, 2022
evilginx2 is a man-in-the-middle attack framework used for phishing login credentials along with session cookies, which in turn allows to bypass 2-factor authentication protection.

evilginx2 is a man-in-the-middle attack framework used for phishing login credentials along with session cookies, which in turn allows to bypass 2-fac

null 0 Nov 4, 2021