sreyansjain
I have been working mostly on liveview or other server driven frameworks. I have one question.
Can hologram leak unwanted data?
For example lets say a user struct contains name, profile_picture, email and mobile.
I have a UserAvatar component that generates user avatars using name and profile_picture.
Now if I pass the whole user struct to it
<UserAvatar user={@user} />
will the email and mobile also get passed down to the browser.
While they might not be directly visible in the template, but can someone see the other details by changing the js in browser.
Please advise.
P.S: I am exploring hologram and so far it looks pretty good. The action and command system is simple and powerful. Thanks.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
bartblast
Short answer: Hologram won’t “leak” data across users, but anything you send to the browser for the current user is visible to that user (e.g., via DevTools). Think of it like a REST response: only send what the current user is allowed to see.
What gets compiled to JavaScript
template/0andaction/3, plus componentinit/2(see also: Hologram Elixir → JS compilation)init/3(page and component),command/3What data reaches the browser
About secrets (same rules as frontend JS frameworks)
action/3,template/0, helpers they call, or componentinit/2. As with React/Vue/Svelte, anything hardcoded in client-compiled code ships in the bundle and is visible to anyone.OK (user-authorized data in server
init/3, visible only to that user in the mount payload):OK (user-scoped, least‑privilege token if truly needed client-side):
Not OK (global/shared secret compiled to the public bundle):
TL;DR
Glad to hear the actions/commands model clicks!
derek-zhou
If your bundle contains malicious 3rd party js then your user’s privacy is compromised anyway.
sreyansjain
Thank you so much for the detailed response.
I am sorry I used so much of your time for this.
I get what you explain. Thank you so much.
FlyingNoodle
As far as I understand there is quite a big difference compared to liveview.
Let’s say I have a user that has some attribute that should not be visible for the user, let’s say “is_blocked”. In liveview I can safely pass the entire user struct to a component and all I need to do is make sure that I don’t actually put
{@user.is_blocked}in the template. Pretty easy.However, if I understand correctly, in hologram I would be able to get to this info through Dev tools if I pass the entire struct so I would have to be careful to only pass the args that are supposed to be visible to the user.
Did I understand this correctly? If so, that is quite a big difference.
bartblast
No worries at all! These kinds of questions are really valuable to the community - I’m sure other developers moving from server-side frameworks to Hologram have similar security concerns. Understanding the client-side data flow is crucial, so I’m glad we could clear that up.
bartblast
You get a very simple action/command programming model with zero latency, but you need to account for actions/templates living client-side. So use:
For example, if a bank is processing a credit score using trade secrets, internal algorithms, and user data that should only be visible to the bank, you’d use a command that calls your Phoenix context or some service and returns the data for the template (like the final score or approval status). Actions and templates are basically your view layer that lives in the user’s browser.
The action/command model gives you a clean separation that works nicely in practice, with usage patterns emerging for different cases like server-to-client state updates, and patterns will likely emerge around these client/server data decisions as well.
Looking ahead, I have ideas for additional tooling like a DSL for defining data shapes, and eventually a local-first data layer where user data syncs declaratively and automatically between client and server.
The mindset shift is: “What does this user need to see/interact with?” goes client-side (and gets instant responsiveness), everything else stays server-side.