<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator>
  <link href="https://www.beyonderluu.com/feed.xml" rel="self" type="application/atom+xml" />
  <link href="https://www.beyonderluu.com/" rel="alternate" type="text/html" hreflang="en" />
  <updated>2026-10-17T02:10:00+00:00</updated>
  <id>https://www.beyonderluu.com/feed.xml</id>
  
  <title type="html">luthebao</title>
  <subtitle>Personal site of luthebao (BaoLT) — native apps, developer tools, and the occasional Flash emulator. Write-ups on the software I build.</subtitle>
  
  <author>
    <name>BaoLT</name>
    
  </author>
  
  
  
  
  <entry>
    <title type="html">Collecting reference data from the official server for MCGame</title>
    <link href="https://www.beyonderluu.com/2026/10/17/mcgame-reference-data/" rel="alternate" type="text/html" title="Collecting reference data from the official server for MCGame" />
    <published>2026-10-17T00:00:00+00:00</published>
    <updated>2026-10-17T00:00:00+00:00</updated>
    <id>https://www.beyonderluu.com/2026/10/17/mcgame-reference-data</id>
    <content type="html" xml:base="https://www.beyonderluu.com/2026/10/17/mcgame-reference-data/">&lt;p&gt;&lt;a href=&quot;/2026/10/06/mcgame/&quot;&gt;MCGame&lt;/a&gt; is only as good as its fidelity to the original game. Every RPC name, argument, and callback payload has to match what the unmodified Flash client expects. The decompiled client shows what the code &lt;em&gt;can&lt;/em&gt; do; only the official server shows what actually happens in practice — which callbacks arrive, in what order, and with what data.&lt;/p&gt;

&lt;p&gt;This post outlines how to collect that reference data from the official server and turn it into useful contributions to the &lt;a href=&quot;https://github.com/luthebao/mcgame&quot;&gt;mcgame repository&lt;/a&gt;. It is deliberately an overview rather than a step-by-step manual: the tools evolve, but the workflow stays the same.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Ground rules.&lt;/strong&gt; Use only your own account. Record passively: observe what the unmodified client does, and never modify, replay, or inject calls against the official server. Treat every recording as sensitive, because it contains your credentials, session tokens, and character data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;why-reference-data-matters&quot;&gt;Why reference data matters&lt;/h2&gt;

&lt;p&gt;Most MCGame features start from a gap: a panel that opens empty, a button that does nothing, a callback the client waits for and never receives. Closing that gap requires three things the client code alone cannot reliably provide:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;The sequence&lt;/strong&gt; — which calls the client makes for a given action, and which callbacks the server answers with.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The shape&lt;/strong&gt; — argument order and types, and the exact payload keys the client reads.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Realistic values&lt;/strong&gt; — item IDs, rewards, configuration, and timing that make the feature behave like the original.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A recording of a real session against the official server provides all three.&lt;/p&gt;

&lt;h2 id=&quot;where-to-observe-the-traffic&quot;&gt;Where to observe the traffic&lt;/h2&gt;

&lt;p&gt;The client talks to the server over encrypted RTMP (RTMPE) with AMF0 payloads, so network sniffing tools see only ciphertext. The practical vantage point is the &lt;strong&gt;client itself&lt;/strong&gt;: run the game in a Flash runtime that can log RPCs after decryption and decoding.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/2026/05/21/long-live-flash/&quot;&gt;Llflash&lt;/a&gt;, the Rust Flash Player emulator I maintain, does this in its desktop build. With its RPC audit log enabled, it writes one decoded line for every outbound call and every inbound server callback. Because the logger lives in the client, it works the same against the official server and against a local MCGame stack — which is exactly what makes comparisons possible.&lt;/p&gt;

&lt;h2 id=&quot;starting-a-session-with-your-own-account&quot;&gt;Starting a session with your own account&lt;/h2&gt;

&lt;p&gt;The official portal launches the game through a link that carries the account’s credentials as query parameters, for example:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;https://s3-vuaphapthuat.goplay.vn/s/s12/GameLoader.swf?user=ABCXYZ&amp;amp;pass=123456
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s12&lt;/code&gt; identifies the game server, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user&lt;/code&gt; / &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pass&lt;/code&gt; let the loader sign in directly. Opening your own launch link in the logging-enabled runtime produces a transcript of the whole session, from the connection handshake onward.&lt;/p&gt;

&lt;p&gt;Treat that link as a password. It ends up in the recording — in the connection details and the login handshake — so redact the username, password, and session tokens before sharing a transcript anywhere, and keep raw recordings on your own machine.&lt;/p&gt;

&lt;h2 id=&quot;recording-sessions-that-are-useful&quot;&gt;Recording sessions that are useful&lt;/h2&gt;

&lt;p&gt;A good recording is short and focused. In practice:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;One feature per session.&lt;/strong&gt; Log in, perform only the action you are studying — open a shop, claim a reward, start a fight — and quit.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Cover the variations.&lt;/strong&gt; Record the success case, then the edge cases: insufficient currency, a full inventory, an already-claimed reward. Error callbacks are part of the contract too.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Note the context.&lt;/strong&gt; Write down what you did and what the screen showed, so the transcript can be read later without guessing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;comparing-against-mcgame&quot;&gt;Comparing against MCGame&lt;/h2&gt;

&lt;p&gt;The most valuable step is the comparison. Perform the same action against a local MCGame stack, record it the same way, and compare the two call sequences:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A &lt;strong&gt;callback present only in the official recording&lt;/strong&gt; is one MCGame does not send yet.&lt;/li&gt;
  &lt;li&gt;A &lt;strong&gt;call present only in the official recording&lt;/strong&gt; is one the client never reaches locally, usually because an earlier callback was missing or malformed.&lt;/li&gt;
  &lt;li&gt;When the sequences match, compare the &lt;strong&gt;payloads&lt;/strong&gt; pair by pair to find wrong keys, types, or values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MCGame’s own server logs complement this view: they show which calls reached a handler, which had no handler registered, and which failed.&lt;/p&gt;

&lt;h2 id=&quot;turning-findings-into-a-contribution&quot;&gt;Turning findings into a contribution&lt;/h2&gt;

&lt;p&gt;Reference data is most useful once it is written down where others can build on it. The mcgame repository has a place for each stage:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Research notes&lt;/strong&gt; — what you observed, with redacted transcript excerpts, go under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs/research/&lt;/code&gt; following the repository’s naming convention.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;An issue&lt;/strong&gt; — describe the gap between the official behaviour and MCGame, and link the research note. This is the best place to discuss scope before writing code.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A pull request&lt;/strong&gt; — implement the missing handler or fix the payload, following the conventions in the repository’s contributing guidelines: method names exactly as the client spells them, payload keys as the client expects, and long SQL in Postgres functions.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Feature memory&lt;/strong&gt; — once a feature works, record what you learned in its &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs/memory/&lt;/code&gt; entry so the next contributor does not have to capture it again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Partial contributions are welcome. A clean, redacted recording of a single feature, with notes on what it shows, is already valuable — someone else can pick up the implementation.&lt;/p&gt;

&lt;h2 id=&quot;closing&quot;&gt;Closing&lt;/h2&gt;

&lt;p&gt;The official servers will not be online forever, and every session recorded now is data that cannot be recovered later. If you still play, a few focused recordings — collected carefully and shared responsibly — are one of the most effective ways to help MCGame stay faithful to the original game.&lt;/p&gt;</content>
    
    
    <author>
      <name>BaoLT</name>
    </author>
    
    <summary type="html">A high-level guide to recording what the official game server actually sends, and turning those recordings into contributions to the MCGame project.</summary>
    <category term="flash" /><category term="rtmp" /><category term="preservation" /><category term="mcgame" />
  </entry>
  
  <entry>
    <title type="html">MCGame — A self-hosted Go server for a legacy Flash MMO client</title>
    <link href="https://www.beyonderluu.com/2026/10/06/mcgame/" rel="alternate" type="text/html" title="MCGame — A self-hosted Go server for a legacy Flash MMO client" />
    <published>2026-10-06T00:00:00+00:00</published>
    <updated>2026-10-06T00:00:00+00:00</updated>
    <id>https://www.beyonderluu.com/2026/10/06/mcgame</id>
    <content type="html" xml:base="https://www.beyonderluu.com/2026/10/06/mcgame/">&lt;p&gt;&lt;strong&gt;MCGame&lt;/strong&gt; is a server for running the backend of a Flash MMO client on your own machine. It is written in &lt;a href=&quot;https://go.dev/&quot;&gt;Go&lt;/a&gt; 1.23 and deployed as a Docker Compose stack. It speaks the same wire protocol as the original service, so an unmodified Flash client connects to it without patches.&lt;/p&gt;

&lt;p&gt;The project exists for software preservation and interoperability: when the original service goes offline, the client should still be able to run. Source code is at &lt;a href=&quot;https://github.com/luthebao/mcgame&quot;&gt;github.com/luthebao/mcgame&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Please note.&lt;/strong&gt; MCGame is an independent, unofficial project. It is not affiliated with the original game’s developers or publishers. Read the repository’s &lt;a href=&quot;https://github.com/luthebao/mcgame/blob/main/DISCLAIMER.md&quot;&gt;DISCLAIMER&lt;/a&gt; before using, copying, or distributing anything in it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Concern&lt;/th&gt;
      &lt;th&gt;Implementation&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Language&lt;/td&gt;
      &lt;td&gt;Go 1.23&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Transport&lt;/td&gt;
      &lt;td&gt;RTMPE v6 (HMAC-SHA256, Diffie-Hellman, RC4) with AMF0 payloads&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Persistence&lt;/td&gt;
      &lt;td&gt;&lt;a href=&quot;https://supabase.com&quot;&gt;Supabase&lt;/a&gt; Postgres&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Cache&lt;/td&gt;
      &lt;td&gt;Redis&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Administration&lt;/td&gt;
      &lt;td&gt;Web dashboard (Next.js)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Deployment&lt;/td&gt;
      &lt;td&gt;Docker Compose; monolith by default, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;line&lt;/code&gt; servers over gRPC&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;quick-start&quot;&gt;Quick start&lt;/h2&gt;

&lt;p&gt;Requirements: Docker with the Compose v2 plugin, GNU Make (macOS and Linux), and the Supabase CLI for applying migrations. Go 1.23 is only needed if you build the server on the host.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/luthebao/mcgame.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;mcgame

make game setup   &lt;span class=&quot;c&quot;&gt;# one-time: generates docker/.env with fresh secrets&lt;/span&gt;
make game up      &lt;span class=&quot;c&quot;&gt;# database, migrations (and seeds on a fresh database), then every service&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The first &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;up&lt;/code&gt; builds the images and takes a few minutes. Day-to-day operations:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make game down    &lt;span class=&quot;c&quot;&gt;# stop all services; data is preserved&lt;/span&gt;
make game reset   &lt;span class=&quot;c&quot;&gt;# restore the database and storage to the migrations and seeds, then start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On Windows, the bundled Go tool replaces &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make&lt;/code&gt; and has no dependency on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sh&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;openssl&lt;/code&gt;, or Node:&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;go&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bin/game.exe&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;/cmd/game&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bin\game&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bin\game&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;up&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The following ports must be free: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;8000&lt;/code&gt; (Supabase API gateway), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;54322&lt;/code&gt; (Postgres, bound to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;127.0.0.1&lt;/code&gt;), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;54323&lt;/code&gt; (Studio, bound to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;127.0.0.1&lt;/code&gt;), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;6379&lt;/code&gt; (Redis), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1935&lt;/code&gt; (RTMP edge), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;8888&lt;/code&gt; (nginx asset edge), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3000&lt;/code&gt; (admin dashboard), and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2112&lt;/code&gt; (metrics).&lt;/p&gt;

&lt;h2 id=&quot;connecting-a-client&quot;&gt;Connecting a client&lt;/h2&gt;

&lt;p&gt;The client is a Flash SWF, so it needs a Flash runtime. The repository includes the standalone Flash Player 32 debug projector for Windows and macOS. Open it, choose &lt;strong&gt;File → Open…&lt;/strong&gt;, and enter:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;http://localhost:8888/s/sv/GameLoaders.swf?isExpand=true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Log in with an account from the seeded &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;public.accounts&lt;/code&gt; table, select a line, and create or choose a character. The client locates the server through &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;frontend/s/sv/profile/config.xml&lt;/code&gt;; changing its &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;resource&amp;gt;&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;logic&amp;gt;&lt;/code&gt; values points the client at a different host.&lt;/p&gt;

&lt;h2 id=&quot;architecture&quot;&gt;Architecture&lt;/h2&gt;

&lt;p&gt;MCGame follows a four-layer clean architecture. Dependencies point inward, and the wiring happens in one place:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cmd/gameserver/main.go                  # dependency wiring
  └─ internal/presentation/             # RTMP and gRPC handlers
       └─ internal/application/         # use-case services
            └─ internal/domain/         # entities and repository interfaces
                 └─ internal/infrastructure/   # Postgres, Redis, RTMP, gRPC
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A request travels from the Flash client through RTMPE and the RTMP server connection, into a command dispatcher, then through a handler, an application service, and a repository down to Postgres. Handlers register against the dispatcher by RPC name, which keeps each feature self-contained.&lt;/p&gt;

&lt;p&gt;Data lives in a single Postgres instance split into three schemas: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;public&lt;/code&gt; for authentication, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;player&lt;/code&gt; for runtime state, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data&lt;/code&gt; for static game templates.&lt;/p&gt;

&lt;h3 id=&quot;wire-compatibility&quot;&gt;Wire compatibility&lt;/h3&gt;

&lt;p&gt;Because the client is unmodified, the server has to match it exactly. That drives a few conventions throughout the codebase:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;RPC method names mirror the client verbatim, including its original misspellings.&lt;/li&gt;
  &lt;li&gt;AMF0 numbers arrive as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;float64&lt;/code&gt;, so handlers type-switch on arguments instead of assuming integers.&lt;/li&gt;
  &lt;li&gt;DTO field names follow what the client expects, and identifier-like fields such as icon and resource codes are serialised as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int64&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Callback argument lists must match the client’s ActionScript signatures precisely; the decompiled client is kept in the repository as a read-only reference.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;scaling-topology&quot;&gt;Scaling topology&lt;/h3&gt;

&lt;p&gt;By default everything runs in one process. For larger deployments the same binary can be split into a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; server (authentication and line registry) and one or more &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;line&lt;/code&gt; servers (gameplay) that communicate over gRPC.&lt;/p&gt;

&lt;h2 id=&quot;admin-dashboard&quot;&gt;Admin dashboard&lt;/h2&gt;

&lt;p&gt;A Next.js dashboard ships with the stack on port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3000&lt;/code&gt;. It covers day-to-day operation of a server without touching SQL: player management and item delivery, items and creatures, boss and general loot tables, daily sign-in rewards, gift-code campaigns, events, line management, game configuration, and a map viewer.&lt;/p&gt;

&lt;h2 id=&quot;extending-the-server&quot;&gt;Extending the server&lt;/h2&gt;

&lt;p&gt;Adding a feature follows a fixed path, one step per layer:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Define the domain entity and repository interface under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal/domain/&amp;lt;feature&amp;gt;/&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Implement the Postgres repository under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal/infrastructure/persistence/postgres/&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Add the use-case service under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal/application/&amp;lt;feature&amp;gt;/&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Add the handler under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal/presentation/rtmp/handlers/&amp;lt;feature&amp;gt;/&lt;/code&gt; with the signature &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;func(ctx *rtmp.RPCContext, args []interface{}) (interface{}, error)&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Register it through &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RegisterHandlers(dispatcher)&lt;/code&gt; and wire it from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cmd/gameserver/main.go&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Configuration is environment-only: defaults live in code and are overridden by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MCGAME_*&lt;/code&gt; variables, which Compose populates from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker/.env&lt;/code&gt;. The test suite runs with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make test&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make test-race&lt;/code&gt; enables the race detector.&lt;/p&gt;

&lt;h2 id=&quot;security-and-operations&quot;&gt;Security and operations&lt;/h2&gt;

&lt;p&gt;The default configuration targets local development, and the project has not been through a formal security audit. Before exposing an instance beyond your own machine:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Rotate every secret in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker/.env&lt;/code&gt;, including the dashboard and Studio credentials.&lt;/li&gt;
  &lt;li&gt;Keep Postgres and Studio bound to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;127.0.0.1&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Treat player data as your responsibility, including compliance with the privacy laws that apply to you.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;licensing-and-scope&quot;&gt;Licensing and scope&lt;/h2&gt;

&lt;p&gt;The code written for this project is licensed under &lt;a href=&quot;https://github.com/luthebao/mcgame/blob/main/LICENSE&quot;&gt;Apache 2.0&lt;/a&gt;. Third-party material keeps its own terms and is not covered by that license: the vendored RTMP and AMF0 forks (Boost Software License 1.0), the Supabase-derived Docker files, and the game client files, assets, and Flash Player projector. You are responsible for ensuring you have the right to use those materials in your jurisdiction. Rights holders who want something removed can open an issue on the repository.&lt;/p&gt;

&lt;h2 id=&quot;status&quot;&gt;Status&lt;/h2&gt;

&lt;p&gt;MCGame is under active development. The database schema, migrations, and internal packages may change without notice, and there is no stability guarantee between commits. Contributions are welcome — open an issue to discuss a change first, and see the repository’s contributing section for the conventions above.&lt;/p&gt;</content>
    
    
    <author>
      <name>BaoLT</name>
    </author>
    
    <summary type="html">A Go server that lets an unmodified Flash MMO client connect to a backend you run yourself — RTMPE, AMF0, Supabase Postgres, Redis, and an admin dashboard, packaged as a single Docker Compose stack.</summary>
    <category term="go" /><category term="flash" /><category term="rtmp" /><category term="preservation" />
  </entry>
  
  <entry>
    <title type="html">Llflash — A Flash Player emulator in Rust, with a one-line RTMP host install</title>
    <link href="https://www.beyonderluu.com/2026/05/21/long-live-flash/" rel="alternate" type="text/html" title="Llflash — A Flash Player emulator in Rust, with a one-line RTMP host install" />
    <published>2026-05-21T00:00:00+00:00</published>
    <updated>2026-05-21T00:00:00+00:00</updated>
    <id>https://www.beyonderluu.com/2026/05/21/long-live-flash</id>
    <content type="html" xml:base="https://www.beyonderluu.com/2026/05/21/long-live-flash/">&lt;p&gt;&lt;strong&gt;Llflash&lt;/strong&gt; is an Adobe Flash Player emulator written in &lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt;, targeting both desktop and the web via WebAssembly. It’s a fork of &lt;a href=&quot;https://ruffle.rs/&quot;&gt;Ruffle&lt;/a&gt; with one headline addition: &lt;strong&gt;RTMP support&lt;/strong&gt;, delivered through a small native messaging host that pairs with the browser extension. The rest of the runtime tracks upstream — ActionScript 1, 2, and 3 are all supported, enough to bring most legacy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.swf&lt;/code&gt; content back to life: games, animations, learning tools, and the multiplayer-streaming SWFs that vanilla Ruffle can’t reach because browsers don’t expose raw TCP.&lt;/p&gt;

&lt;p&gt;Desktop builds and the RTMP native messaging host are published on the &lt;a href=&quot;https://github.com/luthebao/luthebao/releases/tag/llflash&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash&lt;/code&gt; release&lt;/a&gt;. Questions, bug reports, and feature requests are handled through the &lt;a href=&quot;https://github.com/luthebao/luthebao/discussions&quot;&gt;luthebao discussions tab&lt;/a&gt;; there is no public issue tracker.&lt;/p&gt;

&lt;h2 id=&quot;setup&quot;&gt;Setup&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Install the browser extension.&lt;/strong&gt; &lt;em&gt;Coming soon&lt;/em&gt; — the Chrome Web Store / Firefox Add-ons listing isn’t published yet. Until then, you can side-load the unpacked extension from the &lt;a href=&quot;https://github.com/luthebao/luthebao/releases/tag/llflash&quot;&gt;release page&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Install the RTMP native messaging host&lt;/strong&gt; with the one-liner for your OS (see below). This is the small out-of-process helper that lets SWFs reach &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rtmp://&lt;/code&gt; servers.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Visit any page that uses Flash.&lt;/strong&gt; The extension picks up &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.swf&lt;/code&gt; embeds automatically and routes RTMP traffic through the host you just installed — no per-site configuration.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;install-the-rtmp-native-messaging-host&quot;&gt;Install the RTMP native messaging host&lt;/h2&gt;

&lt;p&gt;Llflash plays static SWFs entirely in the browser, but &lt;strong&gt;RTMP-based content&lt;/strong&gt; (legacy live-streaming SWFs, multiplayer games that talk to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rtmp://&lt;/code&gt; servers) needs an out-of-process helper — browsers can’t open raw TCP sockets. The &lt;strong&gt;RTMP native messaging host&lt;/strong&gt; is a small Rust binary the browser extension launches over Chrome / Firefox’s native-messaging protocol. Once registered, RTMP traffic inside any SWF is routed through it transparently.&lt;/p&gt;

&lt;p&gt;Use the command that matches your operating system.&lt;/p&gt;

&lt;h3 id=&quot;macos--linux&quot;&gt;macOS / Linux&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://github.com/luthebao/luthebao/releases/download/llflash/rtmp-host-install.sh | bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Supports &lt;strong&gt;macOS (Apple Silicon)&lt;/strong&gt; and &lt;strong&gt;Linux x86_64&lt;/strong&gt;. The script downloads the latest release tarball, drops the binary under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.llflash/rtmp-host/&lt;/code&gt;, and writes the native-messaging manifest (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;com.longliveflash.rtmp_host&lt;/code&gt;) into the right per-browser directory. Default target is Chrome — pass a browser name to install for a different one:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# chrome | chromium | edge | brave | firefox | all&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://github.com/luthebao/luthebao/releases/download/llflash/rtmp-host-install.sh | bash &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; firefox
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;windows&quot;&gt;Windows&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;PowerShell&lt;/strong&gt;:&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;irm&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;https://github.com/luthebao/luthebao/releases/download/llflash/rtmp-host-install.ps1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The PowerShell script behaves like the shell version: it downloads the latest zip, extracts to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%LOCALAPPDATA%\LongLiveFlash\rtmp-host\&lt;/code&gt;, and registers the native-messaging manifest. To pass a browser argument, save the script first and run it locally:&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$u&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;https://github.com/luthebao/luthebao/releases/download/llflash/rtmp-host-install.ps1&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iwr&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$u&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-OutFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rtmp-host-install.ps1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PowerShell&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ExecutionPolicy&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Bypass&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-File&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;\rtmp-host-install.ps1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;all&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After installation, restart the browser and reload the extension. The host then appears under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrome://extensions/&lt;/code&gt; (or the Firefox equivalent), and RTMP-backed SWFs should connect immediately.&lt;/p&gt;

&lt;h3 id=&quot;environment-overrides&quot;&gt;Environment overrides&lt;/h3&gt;

&lt;p&gt;Both scripts support the same environment overrides for pinning a release or changing the installation directory:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Variable&lt;/th&gt;
      &lt;th&gt;Default&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LLFLASH_REPO&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;luthebao/luthebao&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LLFLASH_TAG&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LLFLASH_INSTALL_DIR&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.llflash/rtmp-host&lt;/code&gt; (Unix) / &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%LOCALAPPDATA%\LongLiveFlash\rtmp-host&lt;/code&gt; (Windows)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;desktop-builds&quot;&gt;Desktop builds&lt;/h2&gt;

&lt;p&gt;Standalone desktop builds are listed on the &lt;a href=&quot;https://github.com/luthebao/luthebao/releases/tag/llflash&quot;&gt;release page&lt;/a&gt; alongside the install scripts:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash-rtmp-host-1.1.0-macOS-arm64.tar.gz&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash-rtmp-host-1.1.0-Linux-x64.tar.gz&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash-rtmp-host-1.1.0-Windows-x64.zip&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each archive contains the host binary plus the install script for that platform — which lets you audit the script and run it offline instead of piping it from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;curl&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;relationship-to-ruffle&quot;&gt;Relationship to Ruffle&lt;/h2&gt;

&lt;p&gt;Llflash is a fork of &lt;a href=&quot;https://github.com/ruffle-rs/ruffle&quot;&gt;Ruffle&lt;/a&gt;, not a rewrite. The AVM1/AVM2 interpreters, the renderer, and the SWF parser are Ruffle’s work — credit and thanks go to that project and its contributors. What this fork adds is the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rtmp://&lt;/code&gt; path: the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash-rtmp-host&lt;/code&gt; binary you just installed terminates the RTMP/RTMPE/RTMPT protocols outside the browser sandbox, and a thin bridge inside the wasm module forwards &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NetConnection&lt;/code&gt; / &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NetStream&lt;/code&gt; traffic to it. With that in place, SWFs that depend on Flash Media Server, Wowza, or any RTMP origin keep working — which is the gap that kept a noticeable slice of legacy Flash content from running under stock Ruffle.&lt;/p&gt;

&lt;p&gt;Everything else — including most ActionScript edge cases, codec coverage, and the desktop player — behaves like upstream Ruffle. Questions, bug reports, and feature requests live on the &lt;a href=&quot;https://github.com/luthebao/luthebao/discussions&quot;&gt;luthebao discussions tab&lt;/a&gt; (the source repository is private, so there is no public issue tracker).&lt;/p&gt;

&lt;h2 id=&quot;privacy&quot;&gt;Privacy&lt;/h2&gt;

&lt;p&gt;Long Live Flash is designed with user privacy in mind. The browser extension searches website HTML for embedded Flash content without storing or transmitting browsing activity.&lt;/p&gt;

&lt;p&gt;Flash content may store data locally using browser LocalStorage APIs and make network requests to third-party servers, potentially transmitting personally identifiable or “fingerprintable” information. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;llflash-rtmp-host&lt;/code&gt; extends that surface in one direction only: when a SWF opens an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rtmp://&lt;/code&gt; connection, the host establishes a TCP connection to that origin on the SWF’s behalf. Llflash itself does not inspect, log, or retain RTMP payloads — they pass through the host and back to the wasm runtime — but the destination server will see traffic from your IP address, exactly as it would have under the original Flash Player.&lt;/p&gt;

&lt;p&gt;LLFlash stores settings locally via the browser’s extension storage API. These settings don’t contain identifying information and aren’t transmitted to servers.&lt;/p&gt;

&lt;p&gt;When errors occur, users can optionally submit crash reports through the &lt;a href=&quot;https://github.com/luthebao/luthebao/discussions&quot;&gt;luthebao discussions tab&lt;/a&gt;. These reports include browser and site information but aren’t stored or transmitted without explicit user consent.&lt;/p&gt;

&lt;p&gt;The project is a fork of &lt;a href=&quot;https://github.com/ruffle-rs/ruffle&quot;&gt;Ruffle&lt;/a&gt;, which is open-source; LLflash’s additions are distributed via the &lt;a href=&quot;https://github.com/luthebao/luthebao/releases/tag/llflash&quot;&gt;release page&lt;/a&gt; above.&lt;/p&gt;

&lt;p&gt;Exercise caution with untrusted content. Llflash is not responsible for the privacy practices of third parties; review the privacy policies and terms of the websites and services you visit.&lt;/p&gt;</content>
    
    
    <author>
      <name>BaoLT</name>
    </author>
    
    <summary type="html">A Rust Flash Player emulator — a Ruffle fork that adds RTMP support through a one-line native-messaging host, bringing legacy streaming and multiplayer SWFs back to life.</summary>
    <category term="rust" /><category term="flash" /><category term="wasm" />
  </entry>
  
  <entry>
    <title type="html">MMStock — Native terminal for the Vietnamese stock-futures market</title>
    <link href="https://www.beyonderluu.com/2026/05/20/mm-vnstock/" rel="alternate" type="text/html" title="MMStock — Native terminal for the Vietnamese stock-futures market" />
    <published>2026-05-20T00:00:00+00:00</published>
    <updated>2026-05-20T00:00:00+00:00</updated>
    <id>https://www.beyonderluu.com/2026/05/20/mm-vnstock</id>
    <content type="html" xml:base="https://www.beyonderluu.com/2026/05/20/mm-vnstock/">&lt;p&gt;&lt;strong&gt;MMStock&lt;/strong&gt; is a native desktop terminal for the Vietnamese stock-futures market. It connects directly to the VPS data feed (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;web7.vps.com.vn&lt;/code&gt;), with no intermediate backend, and renders charts, indicators, and the real-time price stream entirely on the client.&lt;/p&gt;

&lt;p&gt;The app is written in &lt;a href=&quot;https://odin-lang.org/&quot;&gt;Odin&lt;/a&gt; on top of &lt;a href=&quot;https://github.com/floooh/sokol&quot;&gt;Sokol&lt;/a&gt;, &lt;a href=&quot;https://github.com/ocornut/imgui&quot;&gt;Dear ImGui&lt;/a&gt;, and &lt;a href=&quot;https://github.com/epezent/implot&quot;&gt;ImPlot&lt;/a&gt;. Builds are available for macOS (Apple Silicon and Intel), Linux x86_64, and Windows x86_64.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/assets/img/posts/mmstock/terminal.png&quot; alt=&quot;MMStock terminal showing two side-by-side chart panels with candlesticks, VPVR volume-by-price overlays, BLT-MACD and BLT-RSI indicator subpanels, and a multi-timeframe table&quot; /&gt;
  &lt;figcaption&gt;MMStock — two chart panels with VPVR overlays and the BLT-MACD/RSI indicators&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;download&quot;&gt;Download&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/luthebao/luthebao/releases/tag/mmstock&quot;&gt;&lt;strong&gt;Download MMStock&lt;/strong&gt;&lt;/a&gt; — macOS and Windows builds available on the release page.&lt;/p&gt;

&lt;h3 id=&quot;one-liner-install&quot;&gt;One-liner install&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;macOS / Linux:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://github.com/luthebao/luthebao/releases/download/mmstock/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Windows (PowerShell):&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;irm&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;https://github.com/luthebao/luthebao/releases/download/mmstock/install.ps1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;what-it-does&quot;&gt;What it does&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Charts&lt;/strong&gt; — candlestick, line, and Heiken Ashi, across multiple timeframes (1m, 5m, 15m, 30m, 1H, 4H, 8H, 1D, 1W, 1M).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Real-time stream&lt;/strong&gt; — live prices over WSS, historical bars over HTTPS, both from VPS directly.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Drawing tools&lt;/strong&gt; — per-chart horizontal line, rectangle, and point-line annotations.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Indicators&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;VPVR&lt;/strong&gt; — volume-by-price overlay.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;BLT-ID-RSI&lt;/strong&gt; — a Pine-script port combining RSI with Fast (RMA 5) and Slow (WMA 45) moving averages, regular and hidden bull/bear divergence detection, a VMC gold buy signal, a Stoch-RSI sell signal, and a configurable multi-timeframe table.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;architecture&quot;&gt;Architecture&lt;/h2&gt;

&lt;p&gt;MMStock is a single Odin binary containing the user interface (ImGui and ImPlot rendered through Sokol), the VPS HTTPS and WSS client, and a local SQLite store for cached bars. There is no server-side component to deploy: the terminal is the entire application, and updates are delivered as new binaries.&lt;/p&gt;

&lt;h2 id=&quot;why-a-native-client&quot;&gt;Why a native client&lt;/h2&gt;

&lt;p&gt;There are two reasons. First, rendering tens of thousands of bars at 60 fps with smooth pan and zoom is straightforward with ImPlot but difficult in a browser. Second, connecting directly to the market data feed removes an entire infrastructure layer — no API gateway, backend cache, or message queue — leaving fewer components to fail and nothing to host.&lt;/p&gt;

&lt;h2 id=&quot;status&quot;&gt;Status&lt;/h2&gt;

&lt;p&gt;MMStock is under active development. The Vietnamese stock-futures market is a specialised audience, so the product is shaped primarily around my own trading workflow, with the aim of making it equally useful to anyone with similar needs.&lt;/p&gt;</content>
    
    
    <author>
      <name>BaoLT</name>
    </author>
    
    <summary type="html">A native desktop terminal for the Vietnamese stock-futures market, written in Odin — charts, indicators, and a real-time VPS feed with no backend in between.</summary>
    <category term="odin" /><category term="trading" /><category term="desktop" />
  </entry>
  
  <entry>
    <title type="html">mac-cli — A multi-purpose macOS command-line tool</title>
    <link href="https://www.beyonderluu.com/2026/05/20/mac-cli/" rel="alternate" type="text/html" title="mac-cli — A multi-purpose macOS command-line tool" />
    <published>2026-05-20T00:00:00+00:00</published>
    <updated>2026-05-20T00:00:00+00:00</updated>
    <id>https://www.beyonderluu.com/2026/05/20/mac-cli</id>
    <content type="html" xml:base="https://www.beyonderluu.com/2026/05/20/mac-cli/">&lt;p&gt;&lt;strong&gt;mac-cli&lt;/strong&gt; is a multi-purpose command-line tool for macOS, written in &lt;a href=&quot;https://odin-lang.org/&quot;&gt;Odin&lt;/a&gt;. It consolidates three everyday utilities — disk cleaning, image and video optimisation, and screenshots — into a single small binary that is also easy for AI agents to drive. Only an Apple Silicon (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;arm64&lt;/code&gt;) build is currently published.&lt;/p&gt;

&lt;p&gt;Source and releases live at &lt;a href=&quot;https://github.com/luthebao/mac-cli&quot;&gt;github.com/luthebao/mac-cli&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;install&quot;&gt;Install&lt;/h2&gt;

&lt;p&gt;The following command installs the latest release binary and does not require the Odin toolchain:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/luthebao/mac-cli/main/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The script downloads the latest tarball and installs it to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/local/bin&lt;/code&gt; when that directory is writable, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.local/bin&lt;/code&gt; otherwise. It removes the macOS quarantine attribute so Gatekeeper does not block the first launch, and prints a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PATH&lt;/code&gt; hint if the chosen directory is not already on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PATH&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;self-update&quot;&gt;Self-update&lt;/h2&gt;

&lt;p&gt;The binary can update itself using the same installation logic:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mac-cli update            &lt;span class=&quot;c&quot;&gt;# install latest if newer&lt;/span&gt;
mac-cli update &lt;span class=&quot;nt&quot;&gt;--check&lt;/span&gt;    &lt;span class=&quot;c&quot;&gt;# report only; exits non-zero when update available&lt;/span&gt;
mac-cli update &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt;    &lt;span class=&quot;c&quot;&gt;# re-run the installer even if already current&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;commands&quot;&gt;Commands&lt;/h2&gt;

&lt;h3 id=&quot;clean--disk-cleaner&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clean&lt;/code&gt; — disk cleaner&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mac-cli clean                        &lt;span class=&quot;c&quot;&gt;# interactive cleaner&lt;/span&gt;
mac-cli clean &lt;span class=&quot;nt&quot;&gt;--risky&lt;/span&gt;                &lt;span class=&quot;c&quot;&gt;# include risky categories&lt;/span&gt;
mac-cli clean categories             &lt;span class=&quot;c&quot;&gt;# list all 16 cleanable categories&lt;/span&gt;
mac-cli clean uninstall              &lt;span class=&quot;c&quot;&gt;# remove apps + their leftovers&lt;/span&gt;
mac-cli clean maintenance &lt;span class=&quot;nt&quot;&gt;--dns&lt;/span&gt;      &lt;span class=&quot;c&quot;&gt;# flush DNS cache&lt;/span&gt;
mac-cli clean backup &lt;span class=&quot;nt&quot;&gt;--list&lt;/span&gt;          &lt;span class=&quot;c&quot;&gt;# list pre-delete backups&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The interactive cleaner scans every category and shows exactly what will be removed, and how much space will be reclaimed, before asking for confirmation:&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/assets/img/posts/mac-cli/clean-scan.png&quot; alt=&quot;mac-cli clean scanning the Mac and reporting 17.5 GB cleanable, with a summary of 205 items and a [Y/n] confirmation prompt&quot; /&gt;
  &lt;figcaption&gt;mac-cli clean — scan summary and confirmation prompt&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Any path outside the known-safe set is refused rather than deleted, so a faulty rule cannot affect an unintended directory. On completion, the tool reports the total space freed:&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/assets/img/posts/mac-cli/clean-result.png&quot; alt=&quot;mac-cli clean output showing several &apos;refused (path not safe)&apos; lines, then &apos;Freed 7.5 GB of disk space! Cleaned 159 items&apos;&quot; /&gt;
  &lt;figcaption&gt;mac-cli clean — “path not safe” refusals and the final freed-space tally&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3 id=&quot;clop--image--video-optimiser&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clop&lt;/code&gt; — image &amp;amp; video optimiser&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mac-cli clop                         &lt;span class=&quot;c&quot;&gt;# interactive picker&lt;/span&gt;
mac-cli clop &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; photo.png            &lt;span class=&quot;c&quot;&gt;# optimise in place&lt;/span&gt;
mac-cli clop &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; ~/Pictures &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt;        &lt;span class=&quot;c&quot;&gt;# recurse into a directory&lt;/span&gt;
mac-cli clop &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; 50% clip.mp4         &lt;span class=&quot;c&quot;&gt;# downscale by factor&lt;/span&gt;
mac-cli clop &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; webp cover.png       &lt;span class=&quot;c&quot;&gt;# convert image format&lt;/span&gt;
mac-cli clop &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; IMG_2156.jpg         &lt;span class=&quot;c&quot;&gt;# strip EXIF metadata&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clop&lt;/code&gt; delegates to format-specific CLIs (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pngquant&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jpegoptim&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gifsicle&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ffmpeg&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vips&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cwebp&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;heif-enc&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exiftool&lt;/code&gt;). If a required tool is missing, it offers an interactive &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew install&lt;/code&gt; on first use. Supported formats are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.png&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.jpg&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.jpeg&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gif&lt;/code&gt; for images, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.mp4&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.mov&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.m4v&lt;/code&gt; for video.&lt;/p&gt;

&lt;h3 id=&quot;shot--screenshots&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shot&lt;/code&gt; — screenshots&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mac-cli shot                         &lt;span class=&quot;c&quot;&gt;# interactive picker (type to filter)&lt;/span&gt;
mac-cli shot &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt;                      &lt;span class=&quot;c&quot;&gt;# capture full screen&lt;/span&gt;
mac-cli shot &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt;                      &lt;span class=&quot;c&quot;&gt;# list running GUI apps with PIDs&lt;/span&gt;
mac-cli shot &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 1234                 &lt;span class=&quot;c&quot;&gt;# capture a specific app by PID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Screenshots are saved to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/Desktop&lt;/code&gt; as PNG files. The first run may prompt for the Screen Recording permission under System Settings → Privacy.&lt;/p&gt;

&lt;h2 id=&quot;claude-code-agent-skill&quot;&gt;Claude Code agent skill&lt;/h2&gt;

&lt;p&gt;For &lt;a href=&quot;https://claude.com/claude-code&quot;&gt;Claude Code&lt;/a&gt; users, a companion agent skill lets Claude operate &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mac-cli&lt;/code&gt; directly — cleaning caches, capturing app-specific screenshots, optimising media, and more:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npx skills add luthebao/mac-cli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The skill expects the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mac-cli&lt;/code&gt; binary to be on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PATH&lt;/code&gt;, so install the tool first.&lt;/p&gt;

&lt;h2 id=&quot;build-from-source&quot;&gt;Build from source&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/luthebao/mac-cli.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;mac-cli
make build                           &lt;span class=&quot;c&quot;&gt;# → build/mac-cli&lt;/span&gt;
make &lt;span class=&quot;nb&quot;&gt;test
&lt;/span&gt;make &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Licensed under MIT.&lt;/p&gt;</content>
    
    
    <author>
      <name>BaoLT</name>
    </author>
    
    <summary type="html">A multi-purpose macOS command-line tool in Odin — disk cleaning, image and video optimisation, and screenshots behind one small, agent-friendly binary.</summary>
    <category term="odin" /><category term="macos" /><category term="cli" />
  </entry>
  
</feed>
