3 ms·
Show HN: Clace – Nginx Unit alternative – app server for internal apps
I have been building https://github.com/claceio/clace https://github.com/claceio/clace, an open source project for developing internal web tools.
Nginx Unit supports multiple languages but the user is responsible for managing the language runtime and dependency installation. Clace takes the approach of supporting only one language but makes app installation simpler, with no dependencies to manage. Apps are installed (from GitHub or local source) to a particular domain:path. All sub paths within that top level path are available for use within that app. This means that you can manage multiple apps on a single Clace server, without having to worry about a change in one app breaking other apps.
Clace apps are written in Starlark, which provides a simple python-like glue language to work with external APIs which are exposed through plugins. Clace and its plugins are implemented in go, the app code to plugin boundary is used to implement a security sandbox.
Apps use a no-build step approach, using Starlark and go HTML templates for hypermedia driven web apps with HTMX and Tailwind support. A gitops type deployment model is used for app updates, with staged deployment and preview environments. For example, an app at example.com:/myapp will have a staging app at example.com:/myapp_cl_stage. This allows any changes to be verified in staging before being made live.
To install and try it out, run
curl -L https://clace.io/install.sh | sh
source $HOME/clhome/bin/clace.env
clace server start &
clace app create --auth-type=none --approve /disk_usage github.com/claceio/clace/examples/disk_usage # This installs a du like webapp
clace app create --auth-type=none --approve /book github.com/claceio/apps/utils/bookmarks # This installs a bookmark manager which uses sqlite for persistence
The installed apps are available at https://localhost:25223/disk_usage https://localhost:25223/disk_usage and https://localhost:25223/book https://localhost:25223/book. Try it out, would appreciate any feedback.
- ajayvk 3y agoClace uses SQLite as the filesystem for storing app files. This has some advantages in terms of being able to store the file etag hash value, brotli compress the files, deduplicate files across apps (especially useful for preview apps which have lots of duplicate data) etc. Clace is also designed for very light footprint, thousands of apps can be installed on a server. Since apps are lazy loaded, the memory/cpu load on the system is minimal. Clace request routing is designed for Hypermedia driven apps. This makes HTMX driven user interfaces easy to build since the full page and partial request are automatically handled at the routing level. See https://github.com/claceio/apps/blob/main/utils/bookmarks/app.star https://github.com/claceio/apps/blob/main/utils/bookmarks/ap... for an example app. https://demo.clace.io/ https://demo.clace.io/ has some demo apps, all running on a single Clace server instance.