Hey,

I have been working on a new open source project 
https://github.com/claceio/clace for the past few months. Clace is an 
Apache-2 licensed platform for building secure internal web applications. 
The end goal is to allow fully custom applications as well as workflow type 
applications. Custom apps are supported currently, workflows will come 
later. Clace allows you to build Hypermedia first web applications, where 
the server API returns HTML instead of JSON. With the HTMX[1] library on 
the client side, it makes developing and maintaining interactive websites 
much easier as compared to the regular Javascript SPA model.

Clace is a single binary go application, using sqlite for app metadata. 
Clace apps are written in Starlark [2], which gives a python based syntax. 
The API routes are defined to be Hypermedia first, using the Chi 
library[7]. Each API specifies what HTML to return for a full page reload 
and what to return for a partial request from HTMX. Go HTML templates are 
used for the response. The starlark code runs in a sandbox, it can make 
external calls through plugins. The plugin boundary is used to enforce 
security policies[3]. This allows for policies like permit GET requests but 
not POST/DELETE, which are difficult to do with a container or jail based 
approach.

Clace bundles esbuild to allow importing javascript libraries as ESModules. 
TailwindCSS/DaisyUI watcher integration is supported, although many simple 
apps can use classless CSS libraries. The goal is to have a no build 
approach, the dev artifacts are checked into git and directly used for 
serving prod. Importing new ESM libraries or new TailwindCSS classes 
requires a one time setup operation, which runs automatically in dev mode. 
Other than that, most code changes do not need a build step. Content hash 
based file names with a virtual file system is used, similar to hashfs[4]. 
This allow for aggressive static content caching, even without a build step 
doing file renames. For deployment, certmagic[5] is used for automatic TLS 
certs. App routing is supported based on path and/or domain, allowing for 
deployment flexibility. The plan is to allow plugins to be loaded 
dynamically using go-plugin[6], currently two plugins are built into the 
server, exec for running CLI command and http for REST API calls. Building 
UI for CLI tools and backend for frontend type use-cases are supported 
currently.

https://github.com/claceio/clace/tree/main/examples/ has some simple sample 
apps (the *_gen* files are auto generated), the sample apps are running 
online at https://demo.clace.io/

If you are building Web interfaces with Go HTML templates, I believe Clace 
will make the development process much easier. Do try it out and let me 
know any feedback.

Regards
Ajay

[1]: https://htmx.org/
[2]: https://github.com/google/starlark-go
[3]: https://clace.io/docs/applications/appsecurity/#security-model
[4]: https://github.com/benbjohnson/hashfs
[5]: https://github.com/caddyserver/certmagic
[6]: https://github.com/hashicorp/go-plugin
[7]: https://github.com/go-chi/chi

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/87dbe1af-32e1-4517-8681-80642789f8dcn%40googlegroups.com.

Reply via email to