Going from localStorage to a Real Backend
Solo 2 was the first time I had to think about where data actually lives. Here's how moving from localStorage to a PHP backend changed the way I think about building apps.
Solo 2 was the first time I actually had to think about where data lives. In Solo 1 everything was in localStorage — it worked, but it was all on the client. Moving to a PHP backend meant the browser had no idea what was in the collection until it asked the server.
The way I handled storage was pretty simple: one cards.json file on the server. Every time someone adds or edits a card, PHP reads the file, updates it, and writes it back. It's not fancy but it works and it's easy to debug — you can just open the file and see exactly what's in it.
The biggest thing I took away was understanding the request cycle. You click a button, the browser sends a request, the server does something, sends back a response. Once that clicked it made everything else — Solo 3, Battleship — a lot easier to reason about.