Write your front in Go!

Overview

Hogosuru

Hogosuru is a part of a personel project and export to the community and provide a framework to easly provide write front end in go. He use a rewrite syscall/js (that catch error) and wrap Object and Interface provide by browser

Hogosuru provide implementation for the WEB API http,event,fetch,json,xmlhttprequest,blob,broadcastchannel,indexeddb, localstorage ... with a goal to provide all JS API access https://developer.mozilla.org/fr/docs/Web/API and write full web app in GO

How to use

Just import the module with go module
go get github.com/realPy/hogosuru

The project is written to work with tinygo but compatible with the go official compiler

Try example

Start project in tinygo docker

docker run -it -v $PWD:/go/src/hogosuru tinygo/tinygo bash

Build

docker run --rm -it -w /go/src/hogosuru -v $PWD:/go/src/hogosuru tinygo/tinygo bash 
cp hogosuru/hogosuru.go /usr/local/go/src/syscall/js/
tinygo build  -o ./example/wasm_main/wasm.wasm --no-debug -target wasm example/wasm_main/main.go
tinygo build  -o ./example/wasm_main/dragandrop.wasm --no-debug -target wasm example/wasm_main/dragandrop/main.go

Run server to the the result in js developer console

go run example/server/main.go

Dont forget to get to use the wasm_exec.js provide by tinygo.

How to help

This is a young project and there are a lot of work to do
All help is welcome. If you are interested by this project, please contact me

Implemented API/Object status

API/Object Implemented Support MDN URL
Arraybuffer Partial https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
Attr Full https://developer.mozilla.org/fr/docs/Web/API/Attr
Blob Full + stream additional support https://developer.mozilla.org/fr/docs/Web/API/Blob
Broadcast Channel Full https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
CustomEvent Full https://developer.mozilla.org/fr/docs/Web/API/CustomEvent
DataTransfer Partial implemented https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer
Document Mostly https://developer.mozilla.org/fr/docs/Web/API/Document
DragEvent Full https://developer.mozilla.org/en-US/docs/Web/API/DragEvent
Element Partial implemented https://developer.mozilla.org/fr/docs/Web/API/Element
Event Partial implemented https://developer.mozilla.org/fr/docs/Web/API/Event
EventTarget Full https://developer.mozilla.org/fr/docs/Web/API/EventTarget/EventTarget
Fetch Partial implemented https://developer.mozilla.org/fr/docs/Web/API/Fetch_API
File Full https://developer.mozilla.org/fr/docs/Web/API/File
FileList Full https://developer.mozilla.org/fr/docs/Web/API/FileList
FormData Partial implemented https://developer.mozilla.org/fr/docs/Web/API/FormData
HTMLInputElement Partial implemented https://developer.mozilla.org/fr/docs/Web/API/HTMLInputElement
HTMLCollection Full https://developer.mozilla.org/fr/docs/Web/API/HTMLCollection
Indexedddb Partial implemented https://developer.mozilla.org/fr/docs/Web/API/IndexedDB_API
JSON Full https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/JSON
MessageEvent Full https://developer.mozilla.org/fr/docs/Web/API/MessageEvent
NamedNodeMap Full https://developer.mozilla.org/fr/docs/Web/API/NamedNodeMap
Node Full https://developer.mozilla.org/en-US/docs/Web/API/Node
NodeList Considerated at Full (Partial implemented but no more need ) https://developer.mozilla.org/fr/docs/Web/API/NodeList
Response Partial implemented https://developer.mozilla.org/fr/docs/Web/API/Response
Storage Full https://developer.mozilla.org/fr/docs/Mozilla/Add-ons/WebExtensions/API/storage
Stream Partial implemented https://developer.mozilla.org/fr/docs/Web/API/Streams_API
uint8array Partial implemented https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
WebSocket Full https://developer.mozilla.org/fr/docs/Web/API/WebSocket
XMLHttpRequest Partial implemented https://developer.mozilla.org/fr/docs/Web/API/XMLHttpRequest/XMLHttpRequest

Local MD5 sum of file with drag and drop

You can test a local example of local hash
Go to https://realpy.github.io/hogosuru/example/static/draganddrop.html

Open you console developer. Drag some file and see result :)

Comments
  • great work! i'm interested in this but example page still not updated?

    great work! i'm interested in this but example page still not updated?

    great work! i'm interested in this but example page still not updated?

    possible to show the example single page app first? will be better if hv a minimal pwa too but single page app will suffice .

    opened by hiqsociety 5
  • awesome

    awesome

    this is really useful and impressive. its really nice of you to make this..

    Will be using this with gio

    https://github.com/gioui/gio https://github.com/gioui/gio-x

    opened by gedw99 3
  • considering using this for serious production use... any production case studies / actual production use case now?

    considering using this for serious production use... any production case studies / actual production use case now?

    considering using this for serious production use...

    1. any production case studies / actual production use case now?
    2. who is using it?
    3. recommended for production use?
    4. what kind of limitations / gotchas / caveats need to look out for? can u pls help specify these onto the front page / readme?

    thx

    opened by hiqsociety 2
  • Add forEach() for nodeList Element

    Add forEach() for nodeList Element

    Is actually not possible to iterate natively in nodeList element.

    See https://developer.mozilla.org/fr/docs/Web/API/NodeList/forEach

    In the meantime, do :

    menuSelector, _ := d.QuerySelectorAll(".navbar-item")
    
    for i := 0; i < menuSelector.Length(); i++ {
        item, _ := menuSelector.Item(i)
    }
    
    opened by YukiNokumo 1
  • go-language-fatal-error-all-goroutines-are-asleep-deadlock

    go-language-fatal-error-all-goroutines-are-asleep-deadlock

    https://github.com/realPy/hogosuru/blob/ee8533a3b579978e160160fd61859aa80b6c1e89/promise/promise.go#L249

    use with wg.Wait() no channels or select {} https://stackoverflow.com/questions/26927479/go-language-fatal-error-all-goroutines-are-asleep-deadlock

    opened by idevorel 6
Releases(v1.4.0)
  • v1.4.0(Mar 31, 2022)

  • v1.3.0(Mar 21, 2022)

    What's Changed

    • Feature/serviceworkglobal by @realPy in https://github.com/realPy/hogosuru/pull/135
    • Feature/worker by @realPy in https://github.com/realPy/hogosuru/pull/136
    • New documentation

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.2.0...v1.3.0

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Mar 13, 2022)

    What's Changed

    • Clipboard , Navigator and Permissions support API by @realPy in https://github.com/realPy/hogosuru/pull/132

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.1.0...v1.2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Mar 2, 2022)

    What's Changed

    • Feature/url by @realPy in https://github.com/realPy/hogosuru/pull/125
    • [refactoring] Adding GetJsValueOf function in baseobject by @adricorse in https://github.com/realPy/hogosuru/pull/127
    • Feature/eventsource by @realPy in https://github.com/realPy/hogosuru/pull/128
    • Use init func to help autodiscover by @realPy in https://github.com/realPy/hogosuru/pull/130

    New Contributors

    • @adricorse made their first contribution in https://github.com/realPy/hogosuru/pull/127

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.1...v1.1.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Dec 13, 2021)

    Some bugs correction :)

    What's Changed

    • Feature/mouse event by @realPy in https://github.com/realPy/hogosuru/pull/123
    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/124

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0...v1.0.1

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Nov 9, 2021)

    After long hours of personal work (300 commits) , I'm glad to announce the first 1.0.0 of hogosuru.👏

    The code has not changed during the last few weeks, I mainly focused on the unit testing part with the requirement to release the first stable version once all the tests have been completed. Goal reached!🥳

    The example part has been moved to a dedicated repot You can take inspiration from the simple example of "websocket-tester".

    Some components are already available like datatable, toaster, pagination. Other features will soon arrive, some native to JS, others specific to hogosuru

    Happy coding!

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc7(Nov 2, 2021)

    What's Changed

    • Feature/test by @realPy in https://github.com/realPy/hogosuru/pull/65
    • add json test by @realPy in https://github.com/realPy/hogosuru/pull/66
    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/67
    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/110
    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/115

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0-rc5...v1.0.0-rc7

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc6(Oct 23, 2021)

    What's Changed

    • Feature/test by @realPy in https://github.com/realPy/hogosuru/pull/65
    • add json test by @realPy in https://github.com/realPy/hogosuru/pull/66
    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/67
    • Unitest/fetch by @realPy in https://github.com/realPy/hogosuru/pull/68
    • Add websocket unit test by @realPy in https://github.com/realPy/hogosuru/pull/70
    • add unit test on map by @realPy in https://github.com/realPy/hogosuru/pull/72
    • Feature/abortcontroller by @realPy in https://github.com/realPy/hogosuru/pull/73
    • Feature/fetchcancelable by @realPy in https://github.com/realPy/hogosuru/pull/77
    • correct bug by @realPy in https://github.com/realPy/hogosuru/pull/78
    • Improve/array buffer by @realPy in https://github.com/realPy/hogosuru/pull/79
    • Improve/array buffer by @realPy in https://github.com/realPy/hogosuru/pull/80
    • Feature/remove internal syscall by @realPy in https://github.com/realPy/hogosuru/pull/88
    • push develop to main by @realPy in https://github.com/realPy/hogosuru/pull/89
    • Add init on example by @realPy in https://github.com/realPy/hogosuru/pull/90
    • Correct missing init on example by @realPy in https://github.com/realPy/hogosuru/pull/91
    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/92

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0-rc5...v1.0.0-rc6

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc5(Oct 12, 2021)

    What's Changed

    • Correct Promise webassembly when error occurs by @realPy in https://github.com/realPy/hogosuru/pull/64

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0-rc4...v1.0.0-rc5

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc4(Oct 11, 2021)

    What's Changed

    • Develop by @realPy in https://github.com/realPy/hogosuru/pull/63

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0-rc3...v1.0.0-rc4

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc3(Oct 8, 2021)

    What's Changed

    • Correct bugs by @realPy in https://github.com/realPy/hogosuru/pull/62

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0-rc2...v1.0.0-rc3

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc2(Oct 6, 2021)

    What's Changed

    • Improve docs by @realPy in https://github.com/realPy/hogosuru/pull/59
    • add link components by @realPy in https://github.com/realPy/hogosuru/pull/60
    • correct crash on nil promise by @realPy in https://github.com/realPy/hogosuru/pull/61

    Full Changelog: https://github.com/realPy/hogosuru/compare/v1.0.0-rc1...v1.0.0-rc2

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc1(Oct 3, 2021)

  • v0.0.1-beta(Aug 10, 2021)

Owner
null
Run WASM tests inside your browser

wasmbrowsertest Run Go wasm tests easily in your browser. If you have a codebase targeting the wasm platform, chances are you would want to test your

Agniva De Sarker 132 Nov 20, 2022
Go compiler running entirely in your browser

wasm-go-playground This is the Go compiler ("gc") compiled for WASM, running in your browser! It can be used to run a simple playground, à la play.gol

Chris 237 Nov 10, 2022
A watchdog for Kubernetes rolebindings. Barks (Slack notifications) when something is happening on your front porch.

Cave canem - Beware of the dog A fun little application that acts as a watchdog for Kubernetes rolebindings. If something happens on the front porch i

Simon Zengerling 2 Jan 3, 2022
Write controller-runtime based k8s controllers that read/write to git, not k8s

Git Backed Controller The basic idea is to write a k8s controller that runs against git and not k8s apiserver. So the controller is reading and writin

Darren Shepherd 50 Dec 10, 2021
Web-based gdb front-end application

Introduction Tired of using the plain gdb command-line interface to debug your Go/C/C++ applications? Godbg is a graphical web-based front end for gdb

Chris McGee 227 Nov 6, 2022
twitter clone front-end for Internet Engineering course - fall 99 built by go+echo

twitter backend build twitter-like back-end for internet engeering course - fall 99 with go+echo+gorm team mates Roozbeh Sharifnasab + Parsa Fadaee +

Roozbeh Sharifnasab 15 Nov 9, 2022
Create production ready microservices mono repo pattern wired with Neo4j. Microservices for other languages and front end repos to be added as well in future.

Create Microservices MonoRepo in GO/Python Create a new production-ready project with backend (Golang), (Python) by running one CLI command. Focus on

GoChronicles 14 Oct 26, 2022
This app is an attempt towards using go lang with graphql data fetch in react front end.

go_movies _A React js + GraphQL supported with backend in GoLang. This app is an attempt towards using go lang with graphql data fetch in react front

Abhijit Mukherjee 0 Dec 7, 2021
publish a tree-like data structure from a backend to a front-end

tree-publish publish a tree-like data structure from a backend to a front-end. It needs to be a tree in order to publish the data as JSON document. If

Lutz Behnke 0 Dec 20, 2021
Edgevpn-gui - Graphical front-end for EdgeVPN

EdgeVPN GUI Create Decentralized private networks A simple GUI for EdgeVPN built with fyne. ?? Features Manage EdgeVPN versions locally from the GUI.

Ettore Di Giacinto 13 Nov 9, 2022
😈 Simple micro-front-end framework.

Development and Maintenance Status RancherOS 1.x is no longer being actively maintained. There are two significant reasons behind this product decisio

Matt D 0 Jan 5, 2022
Responsible for provide data to the web front-end

Responsible for provide data to the web front-end. Generates names based on preseted datasets (list of example names), but you can upload a custom dataset (it must have at least 23 names)

Diego Victor 2 Sep 3, 2022
Thanks to Webassybly technology, we can develop front-end in Go+ language

gfront Thanks to Webassybly technology, we can develop front-end in Go+ language. Inspired of React, go-app and Go+ classfile Hello, world JS(React) i

Rangding Zhang 0 Feb 2, 2022
Fast :zap: reverse proxy in front of any GraphQL server for caching, securing and monitoring.

Fast ⚡ reverse proxy in front of any GraphQL server for caching, securing and monitoring. Features ?? Caching RFC7234 compliant HTTP Cache. Cache quer

GBox Proxy 25 Nov 5, 2022
Write your SQL queries in raw files with all benefits of modern IDEs, use them in an easy way inside your application with all the profit of compile time constants

About qry is a general purpose library for storing your raw database queries in .sql files with all benefits of modern IDEs, instead of strings and co

Sergey Treinis 25 Nov 5, 2022
A tool that helps you write code in your favorite IDE: your word processor!

WordIDE Have you ever wondered: How would it feel like to write code in a word processor? Me neither. But after months minutes of planning, I present

unsafecast 35 Jul 21, 2022
A next-generation testing tool. Orion provides a powerful DSL to write and automate your acceptance tests

Orion is born to change the way we implement our acceptance tests. It takes advantage of HCL from Hashicorp t o provide a simple DSL to write the acceptance tests.

Wesovi Labs 45 Aug 31, 2022
Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.

Terratest is a Go library that makes it easier to write automated tests for your infrastructure code. It provides a variety of helper functions and patterns for common infrastructure testing tasks,

Gruntwork 6.5k Nov 26, 2022
You can write slowly your words.

You can write slowly your words. Type Writer function with golang Usage 1 Daktilo(text(string), milliseconds(int)) Usage 2 Daktilo(text(string)) go ru

null 0 Jan 18, 2022
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.

StatusOK Monitor your Website and APIs from your computer.Get notified through Slack or E-mail when your server is down or response time is more than

Sanath Kumar 1.6k Nov 14, 2022