<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: An Vo</title>
    <description>The latest articles on DEV Community by An Vo (@anvodev).</description>
    <link>https://dev.to/anvodev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F143605%2Fb432310e-5b8a-409c-af4d-eee4ebb8d472.jpg</url>
      <title>DEV Community: An Vo</title>
      <link>https://dev.to/anvodev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anvodev"/>
    <language>en</language>
    <item>
      <title>How I Organized My CLAUDE.md in a Monorepo with Too Many Contexts</title>
      <dc:creator>An Vo</dc:creator>
      <pubDate>Sun, 02 Nov 2025 17:43:55 +0000</pubDate>
      <link>https://dev.to/anvodev/how-i-organized-my-claudemd-in-a-monorepo-with-too-many-contexts-37k7</link>
      <guid>https://dev.to/anvodev/how-i-organized-my-claudemd-in-a-monorepo-with-too-many-contexts-37k7</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;My Claude Code show a warning because my &lt;code&gt;CLAUDE.md&lt;/code&gt; was 47k words - far above the recommended 40k.&lt;br&gt;
Ideally, a CLAUDE.md should stay under 10k words for best performance&lt;br&gt;
That's touch in a monorepo containing frontend, backend and core services&lt;/p&gt;
&lt;h2&gt;
  
  
  Insight / Fix
&lt;/h2&gt;

&lt;p&gt;I realized each service doesn’t need all context at once. Backend components don’t need frontend guides, and vice versa.  &lt;br&gt;
So I looked for ways to split &lt;code&gt;CLAUDE.md&lt;/code&gt; into smaller, relevant pieces that load only when needed.&lt;/p&gt;
&lt;h3&gt;
  
  
  Method 1 — Split with &lt;code&gt;@&lt;/code&gt; References
&lt;/h3&gt;

&lt;p&gt;Move long sections into separate docs and reference them using the &lt;code&gt;@&lt;/code&gt; syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Frontend
Use @docs/frontend-guideline.md for detailed frontend guidelines.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This improves organization but doesn’t reduce load. The referenced content still loads into memory at startup.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 2 — Conditional Loading
&lt;/h3&gt;

&lt;p&gt;Reference docs but let Claude load them only when needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Testing&lt;/span&gt;
See docs/testing-principles.md for comprehensive guide.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps startup light and lets Claude decide when to load extra context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 3 — Multiple CLAUDE.md Files per Service
&lt;/h3&gt;

&lt;p&gt;Use one CLAUDE.md per service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLAUDE.md           ← Always loaded
frontend/CLAUDE.md  ← Auto-loads in frontend/
backend/CLAUDE.md       ← Auto-loads in backend/
core/CLAUDE.md    ← Auto-loads in core/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way, only the relevant service context loads automatically when Claude edits that folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;I reduced the main CLAUDE.md from 47k to 9k words (-80%) - well under the 10k guideline.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLAUDE.md (8,902 chars)
frontend/CLAUDE.md (8,647 chars)
backend/CLAUDE.md (7,892 chars)
core/CLAUDE.md (7,277 chars)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Use a hierarchical CLAUDE.md structure to load the right context per folder.&lt;br&gt;
Split guidelines into separate docs and let Claude load them when needed.&lt;br&gt;
&lt;code&gt;@&lt;/code&gt; helps organize content but doesn’t reduce loaded context.&lt;/p&gt;

&lt;p&gt;This setup made Claude Code feel faster and more predictable. It’s a small change that helps keep large monorepos maintainable.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>devworkflow</category>
      <category>monorepo</category>
    </item>
    <item>
      <title>Getting Start with Kafka using Docker</title>
      <dc:creator>An Vo</dc:creator>
      <pubDate>Wed, 10 Apr 2024 16:05:57 +0000</pubDate>
      <link>https://dev.to/anvodev/getting-start-with-kafka-using-docker-2080</link>
      <guid>https://dev.to/anvodev/getting-start-with-kafka-using-docker-2080</guid>
      <description>&lt;p&gt;In this article, we will be using Kafka via docker and try producing and consuming messages. We will learn some keywords and basic tools in Kafka. &lt;/p&gt;

&lt;p&gt;Firstly, let's create a new folder named &lt;code&gt;kafka&lt;/code&gt; (or whatever name of your project), and go to that folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir kafka &amp;amp;&amp;amp; cd kafka
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the &lt;code&gt;kafka&lt;/code&gt; folder, we create a new &lt;code&gt;docker-compose.yml&lt;/code&gt; file with the content below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '3.8'

services:
  kafka: # service name, can change to any name
    image: 'bitnami/kafka:3.6.2' # docker image from https://hub.docker.com/r/bitnami/kafka
    environment:
      - KAFKA_CFG_NODE_ID=0
      - KAFKA_CFG_PROCESS_ROLES=controller,broker
      - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
      - KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
      - KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run Kafka server&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need the container name to access into it. Check the &lt;code&gt;NAMES&lt;/code&gt; column when running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps
---
CONTAINER ID   IMAGE                      COMMAND                  CREATED        STATUS          PORTS           NAMES
f9258b058804   bitnami/kafka:3.6.2        "/opt/bitnami/script…"   24 hours ago   Up 39 minutes   9092/tcp        kafka_kafka_1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Access into docker container command line (In my case in &lt;code&gt;kafka_kafka_1&lt;/code&gt;, please change to your service name if mismatch)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it kafka_kafka_1 bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you are in the container and can use a set of tools below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;kafka-topics.sh&lt;/code&gt;: Manage topics&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kafka-console-producer.sh&lt;/code&gt;: Manage producer&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kafka-console-consumer.sh&lt;/code&gt;: Manage consumer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kafka treat message as "event". Events and grouped  into a category called "topic".&lt;br&gt;
Assume we are creating a chat application. Let's create a new topic called "chat-message" which is a stream of message records, as well as create a new topic called "user-presence" to manage the online status of users. We will use the server kafka:9092 mentioned in docker-compose configuration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka-topics.sh --create --topic chat-message --bootstrap-server kafka:9092
kafka-topics.sh --create --topic user-presence --bootstrap-server kafka:9092
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can check how many topics we have by using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka-topics.sh --list --bootstrap-server kafka:9092
---
__consumer_offsets
chat-message
user-presence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And view detail each topic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka-topics.sh --describe --topic chat-message --bootstrap-server kafka:9092
---
Topic: chat-message TopicId: 0XIXOlZ-TAWqEBlBUP7WAA PartitionCount: 1   ReplicationFactor: 1    Configs:
    Topic: chat-message Partition: 0    Leader: 0   Replicas: 0 Isr: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can use 2 separate terminals to set up the producer and consumer, and see how the consumer get message from the producer in real time.&lt;/p&gt;

&lt;p&gt;In the first terminal, let's use the tool &lt;code&gt;kafka-console-consumer.sh&lt;/code&gt; to setup a consumer to waiting for the messages in the topic &lt;code&gt;chat-message&lt;/code&gt; to consume:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka-console-consumer.sh --topic chat-message --from-beginning --bootstrap-server kafka:9092
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the second terminal and use the tool &lt;code&gt;kafka-console-producer.sh&lt;/code&gt; to setup the producer by running the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka-console-producer.sh --topic chat-message --bootstrap-server kafka:9092
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;kafka-console-producer.sh&lt;/code&gt; will waiting for our inputs. Let's try pasting 3 events below and hit enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Event: {"message_id": 1, "sender_id": "user1", "receiver_id": "user2", "content": "Hello, how are you?", "timestamp": "2024-04-10T09:00:00"}
Event: {"message_id": 2, "sender_id": "user2", "receiver_id": "user1", "content": "I'm good, thanks! How about you?", "timestamp": "2024-04-10T09:01:00"}
Event3: some random words...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the message format is plaintext, in the example above we use both plain text and some JSON-like format to show that the format is not strict. The consumer will need to have logic to decode the plaintext to some meaningful messages.&lt;/p&gt;

&lt;p&gt;Now we should see events appear in the consumer terminal&lt;/p&gt;

&lt;p&gt;That is the very basic setup of Kafka using docker. If you have any questions please ask in the comment section.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;:&lt;br&gt;
If you don't want to access the container, in the host machine you can replace the &lt;code&gt;bash&lt;/code&gt; with the kafka tools like &lt;code&gt;kafka-topics.sh&lt;/code&gt; to run the Kafka command outside of container like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it kafka_kafka_1 kafka-topics.sh --list --bootstrap-server kafka:9092
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original port: &lt;a href="https://www.anvo.dev/articles/getting-start-with-kafka-using-docker"&gt;https://www.anvo.dev/articles/getting-start-with-kafka-using-docker&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
