cd /news/developer-tools/prototype-and-port-the-best-way-to-u… Β· home β€Ί topics β€Ί developer-tools β€Ί article
[ARTICLE Β· art-113923] src=dev.to β†— pub= topic=developer-tools verified=true sentiment=↑ positive

Prototype and Port: The Best Way to Use Claude for Personal Projects

A developer building a beat-maker web app used Claude to prototype JSON manipulation logic in small Python scripts before porting it into a 1500-line HTML file. By testing the concept in isolation, the developer ensured the logic was correct and understood before integrating it, demonstrating an effective workflow for using AI assistants on personal projects.

read4 min views2 publishedAug 28, 2026

I was building a beat-maker web app and needed to add a feature that let me replace or append presets in a JSON array β€” wired up to a dropdown in a modal inside a 1500-line HTML file.

I didn't start there. Here's what I did instead.

When you drop a big file in front of Claude, there's a lot of noise β€” styles, event listeners, utility functions β€” that can pull the logic in unexpected directions.

See the live project at famous-beats-maker β€” specifically the "Edit JSON" modal. The goal was to be able to change and swap out any beat in the dropdown, like "Four-on-the-floor (house)".

The fix: prototype the concept first in the simplest possible environment, then port it.

I had a beats.json

file β€” a JSON array of preset drum patterns. Before writing anything, I just asked:

"in beats.json for example how do I access with python the first item in the json"

beats.json

is an array of objects, each one a full drum preset:

[
  {
    "name": "Four-on-the-floor (house)",
    "bpm": 92,
    "desc": "Steady kick on every beat with off-beat hi-hats β€” the backbone of house and disco.",
    "kick":  [1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0],
    "snare": [0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0],
    "hat":   [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0],
    "crash": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    "tone":  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
  },
  ... (70 presets total)
]

I needed a way to access this JSON because I'd eventually be replacing items in it. Once Claude explained it, I followed up with:

"write this out as access_beats.py please"

That gave me a 10-line Python script. One file in, print to terminal, done. I could run it against real data immediately and see exactly what I was working with.

Once I could read the data, I added an argument so I could pick which item to access:

"great add an argument so I can choose β€” I will use notation 0 instead of 1"

Now I had:

python access_beats.py 0   # first preset
python access_beats.py 3   # fourth preset

Short prompt, small change. I understood every line.

I had a replacement.json

file β€” a single preset object I wanted to swap in. I asked:

"great see I got replacement.json and if I want to replace can you give script replace_beat.py with argument (0-based) pls"

replacement.json

is just one object from the array β€” the same shape as any item in beats.json

. Claude gave me a script that opens beats.json

, swaps in replacement.json

at the given index, and writes it back. I tested it. It worked. The logic was proven in about 15 lines.

This is the key step. Before touching the big file, I mapped what each piece of the prototype was equivalent to in the web app:

Prototype Web App
beats.json
presets[] array in memory
replacement.json
Current board state
sys.argv[1] index
<select> dropdown in the modal
Append (new name)
<input> field in the modal
Write back to file Save to Dropbox

Once the map was clear, I wrote one bigger prompt that described exactly what I wanted in the real project β€” referencing the elements by their HTML IDs, explaining the replace vs. append distinction, and specifying the 0-based index format:

"so json-schema will be replacement.json and then instead of the textarea I get a dropdown that I can select which I want to replace... and I can choose dropdown to add and how would if I wanted to append a new one I guess let me have an input where if I write something in the input will append to object +1 to the array"

Because the concept was already clean and proven, Claude could focus entirely on finding the right hooks in the existing code β€” the event listeners, the state variables, the UI elements β€” and slot the logic in accurately.

Small files = better context. Claude reads a 10-line script cleanly. The concept lands without distraction.

You stay in control. You understand the logic before it touches your real project.

Errors are cheap. Breaking a standalone script costs nothing. Breaking a 1500-line file costs debugging time.

Claude can mirror the pattern. Once the archetype is proven, Claude knows exactly what shape the solution should take in any environment.

1. Ask about the data         β€” understand the shape before writing anything
2. Build the archetype        β€” smallest standalone version in Python, one operation
3. Add arguments              β€” make it flexible enough to test properly
4. Map to the real project    β€” identify what plays each role
5. Port with full context     β€” one prompt that references the real hooks

Use this any time you're adding logic to an existing complex file. You don't need it for small edits β€” a colour change or a typo fix doesn't need a prototype. But for anything involving data flow, state, or multi-step logic, the archetype step pays for itself every time.

── more in #developer-tools 4 stories Β· sorted by recency
── more on @claude 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/prototype-and-port-t…] indexed:0 read:4min 2026-08-28 Β· β€”