portal 2025-09-08

I've been experimenting with creating single-purpose mini apps based on Portal. They are like Portal applets, I call them Portlets. Portal seems like a good fit to be a substrate, it provides many builtin viewers to visualize/inspect data. Additional custom UI specialized for a given task can be generated on-demand by LLMs. Here is the context I use, the goal is to craft it over time to single-shot small apps. It seems to work pretty well with Claude Code: https://github.com/dundalek/intools/blob/master/doc/portlet.md

1

Neat! I’ve held an assumption that a repl ui like Portal is useful beyond data inspection. I’m seeing it as a general purpose UI sandbox. Like being able to render and and experiment with UI components with minimal app scaffolding, and maximal dev tools, all right in your IDE. And the repl = a tight live reload mechanism. All very customizable. Bespoke à la carte UI, with instrumentation tools built into the “canvas”, that you can later compose into an “app” and deploy. But I’ve assumed it would be limited to Reagent framework based UI. Could any cljs UI be used? Like Replicant?

Also Easel project appeals to me in this direction, but is maybe more divorced from deployable cljs..

Very cool. A few things I haven't documented or don't have much documentation, but would be useful for these type of apps are: • You can pass a :main key to p/open to provide a cljs fn to control the entire UI • Portal will also automatically load a portal.user cljs file if it can find it on your class path, good for auto-loading custom viewers • p/repl will turn a clj repl into a cljs repl for interactively developing viewers (only works for jvm nrepl)

cool, very useful tips 👍

do you you also have a workflow for debugging viewers? the errors from the interpreter are difficult to work with

😅 1

Oh, what issues have you ran into? I've found that the sci stack trace to be helpful, especially when rendered in portal 😂

I remember I could not get a good stack trace. I will try to keep that in mind and get back with a concrete example if I encounter it again.

Exactly, I see Portal as an implementation of REBL focused on developer tooling. But since REBL is a general concept it means Portal can be extended to other areas as well.

Reagent/React can interop with JS libs, so I expect using Replicant should also be possible.

I am a big fan of Easel. Because it does not have the client-server split, it might be even better fit and simpler for small tools/apps. However, at this point due to maturity and ecosystem, web-based implementation like Portal is more practical.

🎯 1