title: How to achieve security and hiding code from unauthorized user on web page?
body: <p>I'm creating a statistics web page which can see sensitive information.</p>
  
  <p>The webpage has a sort of table which has massive data in it, editable and stored in Server's database. But It needs to be hidden before the user got proper authentications(Like log-in). (Table itself and it's code too). But I found that most of the questions in stack overflow say it is basically impossible. But when I see lots of well-known websites, it seems they are hiding them well. So I guess there are some solutions to the problem.</p>
  
  <p>At first, I build a full-stack of React - Express - Node - MariaDB toolchain. </p>
  
  <p>The <code>react client</code> is responsible for rendering contents of a webpage and editable tables and request for submitting edited content.</p>
  
  <p>The <code>node with express</code> are responsible for retrieving data from DB, updating DB (Provides data to manipulate from client-side -- that's all)</p>
  
  <p>It comes to a problem when I'm considering security on client-side code. I want to hide all content of the page (not just data from the server, but also its logic and features)</p>
  
  <p>To achieving my goals, I consider several things, but I doubt if it is right and working well if I create.</p>
  
  <ol>
  <li><p>Using Serverside rendering -- Cannot use due to performance reason and lack of resources available</p>
  
  <ul>
  <li>Serverside rendering can hide logic from the user cause it omits the only HTML from the server and all actions are submitted to the server and the server handle the actions and provide its result.</li>
  <li>So I can provide only the login page at first, and if login is successful, I can send the rest of HTML and it's logics from the server.</li>
  <li>The problem is that my content in the webpage is massive and will be interacted with the user very often, and applying virtualization on my table (by performance reason), it's data and rendering logic should be handled by the web browser.</li>
  </ul></li>
  <li><p>Combining SSR and Client-Side Rendering</p>
  
  <ul>
  <li>My inspection for this is not sure, I doubt if it is possible.</li>
  <li>Use SSR for hiding content of the site from unauthorized users, and if authorized, the web browser renders its full content on demand. (Code and logics should be hidden before authorization, the unauthorized user only can see the login page)</li>
  <li>Is it possible to do it?</li>
  </ul></li>
  <li><p>Get code on demand.</p>
  
  <ul>
  <li>Also my inspection, this is what I am looking for. But I strongly doubt if it is possible.</li>
  <li>Workflow is like below
  If a user is not logged in:: User only can see the login page and its code
  If the user is logged in:: User can see features of the page like management, statistics, etc.
  If the user approaches specific features:: Rendering logic and HTTP request interface is downloaded from the server (OR less-performance hindering logic or else...) and it renders what users want to see and do.</li>
  </ul></li>
  </ol>
  
  <p>It is okay not to find ways from the above idea. Can you provide some outlines for implement such kind of web page? I'm quite new to Web Programming, so I cannot find proper ways. I want to know how can I achieve this with what kinds of solutions, library, structure.</p>
  
  <p>What lib or package should I use for this?
  How can I implement this?</p>
  
  <p>OR can you describe to me how modern websites achieve this? (I think the SAP system quite resembles with what I wanna achieve)</p>