[{"data":1,"prerenderedAt":475},["ShallowReactive",2],{"project-supermarket-stock":3,"project-supermarket-stock-more":175},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"summary":9,"stack":10,"repo":17,"demo":7,"year":18,"role":19,"featured":20,"order":21,"body":22,"_type":169,"_id":170,"_source":171,"_file":172,"_stem":173,"_extension":174},"\u002Fprojects\u002Fsupermarket-stock","projects",false,"","Supermarket Stock System","Inventory management backend for a supermarket chain, built in Laravel with a framework-agnostic, domain-driven core. The domain is fully tested without Laravel — pure PHP.",[11,12,13,14,15,16],"Laravel 11","PHP 8.3","PostgreSQL","Pest","Docker","GitHub Actions","https:\u002F\u002Fgithub.com\u002FFabrizio-Alvarez\u002FEjercicio-Arquitectura",2025,"Author",true,2,{"type":23,"children":24,"toc":163},"root",[25,34,40,46,51,60,106,118,124,152,158],{"type":26,"tag":27,"props":28,"children":30},"element","h2",{"id":29},"overview",[31],{"type":32,"value":33},"text","Overview",{"type":26,"tag":35,"props":36,"children":37},"p",{},[38],{"type":32,"value":39},"A backend service for managing supermarket stock: products, stock levels, movements\n(receipts, sales, adjustments), and the rules around them. It's an architecture\nstudy first and a working service second — built to prove a clean, framework-agnostic\nPHP core that can survive a framework swap.",{"type":26,"tag":27,"props":41,"children":43},{"id":42},"architecture-ddd-in-layers",[44],{"type":32,"value":45},"Architecture: DDD in layers",{"type":26,"tag":35,"props":47,"children":48},{},[49],{"type":32,"value":50},"The code is split so the business logic never learns about Laravel:",{"type":26,"tag":35,"props":52,"children":53},{},[54],{"type":26,"tag":55,"props":56,"children":59},"img",{"alt":57,"src":58},"DDD in layers","\u002Fdiagrams\u002Fsupermarket-stock-ddd.svg",[],{"type":26,"tag":61,"props":62,"children":63},"ul",{},[64,76,86,96],{"type":26,"tag":65,"props":66,"children":67},"li",{},[68,74],{"type":26,"tag":69,"props":70,"children":71},"strong",{},[72],{"type":32,"value":73},"Domain",{"type":32,"value":75}," — pure PHP. Entities, value objects, and domain services. No framework\nimports, no Eloquent, no HTTP. This is the part tested in isolation.",{"type":26,"tag":65,"props":77,"children":78},{},[79,84],{"type":26,"tag":69,"props":80,"children":81},{},[82],{"type":32,"value":83},"Application",{"type":32,"value":85}," — use cases (handlers) that orchestrate the domain and declare\ntransactions and side effects as interfaces.",{"type":26,"tag":65,"props":87,"children":88},{},[89,94],{"type":26,"tag":69,"props":90,"children":91},{},[92],{"type":32,"value":93},"Infrastructure",{"type":32,"value":95}," — Eloquent repositories, framework adapters, and third-party\nclients implementing the Application-layer interfaces.",{"type":26,"tag":65,"props":97,"children":98},{},[99,104],{"type":26,"tag":69,"props":100,"children":101},{},[102],{"type":32,"value":103},"Presentation",{"type":32,"value":105}," — a REST API exposing the use cases.",{"type":26,"tag":35,"props":107,"children":108},{},[109,111,116],{"type":32,"value":110},"The headline is the ",{"type":26,"tag":69,"props":112,"children":113},{},[114],{"type":32,"value":115},"domain tested without the framework",{"type":32,"value":117},": if Laravel disappeared\ntomorrow, the business rules and their tests would compile green.",{"type":26,"tag":27,"props":119,"children":121},{"id":120},"whats-inside",[122],{"type":32,"value":123},"What's inside",{"type":26,"tag":61,"props":125,"children":126},{},[127,132,137,142,147],{"type":26,"tag":65,"props":128,"children":129},{},[130],{"type":32,"value":131},"Product catalogue and stock-level projections.",{"type":26,"tag":65,"props":133,"children":134},{},[135],{"type":32,"value":136},"Stock movements as an append-only ledger with domain invariants (no negative stock,\nconsistent totals).",{"type":26,"tag":65,"props":138,"children":139},{},[140],{"type":32,"value":141},"REST endpoints for the common operations, validated at the boundary.",{"type":26,"tag":65,"props":143,"children":144},{},[145],{"type":32,"value":146},"A Pest test suite covering domain rules and API behaviour.",{"type":26,"tag":65,"props":148,"children":149},{},[150],{"type":32,"value":151},"Dockerized local environment and a GitHub Actions pipeline running tests on every push.",{"type":26,"tag":27,"props":153,"children":155},{"id":154},"why-this-project",[156],{"type":32,"value":157},"Why this project",{"type":26,"tag":35,"props":159,"children":160},{},[161],{"type":32,"value":162},"I spend my day job in PHP, so I wanted a public piece of work that shows how I think\nabout backend design in that language: clear boundaries, invariants enforced in the\ndomain, and infrastructure as a detail. DDD on a real (if small) domain is more\nhonest than yet another CRUD demo.",{"title":7,"searchDepth":21,"depth":21,"links":164},[165,166,167,168],{"id":29,"depth":21,"text":33},{"id":42,"depth":21,"text":45},{"id":120,"depth":21,"text":123},{"id":154,"depth":21,"text":157},"markdown","content:projects:supermarket-stock.md","content","projects\u002Fsupermarket-stock.md","projects\u002Fsupermarket-stock","md",[176,301],{"_path":177,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":178,"description":7,"summary":179,"stack":180,"repo":188,"demo":189,"year":190,"role":19,"featured":20,"order":191,"body":192,"_type":169,"_id":298,"_source":171,"_file":299,"_stem":300,"_extension":174},"\u002Fprojects\u002Fmnemo","Mnemo","Spaced-repetition flashcards for my own studying — content lives in git-versioned Markdown, scheduling state (Anki SM-2) in Postgres. Live on its own subdomain, fully serverless on the free tier.",[181,182,183,184,185,186,187],"TypeScript","Next.js 15","Cloudflare Workers","Prisma","PostgreSQL (Neon)","Vitest","pnpm monorepo","https:\u002F\u002Fgithub.com\u002FFabrizio-Alvarez\u002Fmnemo","https:\u002F\u002Fmnemo.falvarez.dev",2026,1,{"type":23,"children":193,"toc":292},[194,198,203,220,226,272,278,283,287],{"type":26,"tag":27,"props":195,"children":196},{"id":29},[197],{"type":32,"value":33},{"type":26,"tag":35,"props":199,"children":200},{},[201],{"type":32,"value":202},"A personal study app with flashcards, Anki-style. The content — 8 decks, 256 cards —\nlives in Markdown files versioned with git; the spaced-repetition state (Anki's SM-2\nalgorithm) lives in Postgres. It's in real daily use, which keeps every design\ndecision honest.",{"type":26,"tag":35,"props":204,"children":205},{},[206,211,213],{"type":26,"tag":69,"props":207,"children":208},{},[209],{"type":32,"value":210},"Live:",{"type":32,"value":212}," ",{"type":26,"tag":214,"props":215,"children":218},"a",{"href":189,"rel":216},[217],"nofollow",[219],{"type":32,"value":189},{"type":26,"tag":27,"props":221,"children":223},{"id":222},"architecture-hexagonal-monorepo",[224],{"type":32,"value":225},"Architecture: hexagonal monorepo",{"type":26,"tag":61,"props":227,"children":228},{},[229,244,262],{"type":26,"tag":65,"props":230,"children":231},{},[232,242],{"type":26,"tag":69,"props":233,"children":234},{},[235],{"type":26,"tag":236,"props":237,"children":239},"code",{"className":238},[],[240],{"type":32,"value":241},"@mnemo\u002Fdomain",{"type":32,"value":243}," — the Markdown parser and the SM-2 scheduler as pure\nTypeScript: 67 tests, no database, no framework. The package travels intact to\nany runtime.",{"type":26,"tag":65,"props":245,"children":246},{},[247,252,254,260],{"type":26,"tag":69,"props":248,"children":249},{},[250],{"type":32,"value":251},"Content ≠ state",{"type":32,"value":253}," as the central decision: the ",{"type":26,"tag":236,"props":255,"children":257},{"className":256},[],[258],{"type":32,"value":259},".md",{"type":32,"value":261}," files are the source of\ntruth; the database is derived and idempotent — the seed can be re-run at any\ntime without losing scheduling state.",{"type":26,"tag":65,"props":263,"children":264},{},[265,270],{"type":26,"tag":69,"props":266,"children":267},{},[268],{"type":32,"value":269},"Full-serverless on the free tier",{"type":32,"value":271},": Cloudflare Workers (via OpenNext) + Neon\nPostgres, custom domain, CI\u002FCD on every push (GitHub Actions).",{"type":26,"tag":27,"props":273,"children":275},{"id":274},"beyond-flashcards-quiz-mode",[276],{"type":32,"value":277},"Beyond flashcards: quiz mode",{"type":26,"tag":35,"props":279,"children":280},{},[281],{"type":32,"value":282},"A didactic quiz mode where each question carries plausible, hand-written\ndistractors and a conceptual \"why\" explanation — wrong answers teach instead of\njust failing. Modes are extensions of the same domain, not separate apps: this is\nextensibility made flesh.",{"type":26,"tag":27,"props":284,"children":285},{"id":154},[286],{"type":32,"value":157},{"type":26,"tag":35,"props":288,"children":289},{},[290],{"type":32,"value":291},"It's the project I use the most and the one that shows the full arc: domain\nmodeling (SM-2, content parsing), a real monorepo with strict boundaries, and\nproduction ops on my own domain — deployed, monitored, and paid for at US$0\u002Fmonth.",{"title":7,"searchDepth":21,"depth":21,"links":293},[294,295,296,297],{"id":29,"depth":21,"text":33},{"id":222,"depth":21,"text":225},{"id":274,"depth":21,"text":277},{"id":154,"depth":21,"text":157},"content:projects:mnemo.md","projects\u002Fmnemo.md","projects\u002Fmnemo",{"_path":302,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":303,"description":7,"summary":304,"stack":305,"repo":308,"demo":7,"year":18,"role":19,"featured":6,"order":309,"body":310,"_type":169,"_id":472,"_source":171,"_file":473,"_stem":474,"_extension":174},"\u002Fprojects\u002Fjob-tracker","Job-Application Tracker","A tracker for applications, interviews, contacts, and follow-ups that I actually use in my own job search. Node.js + TypeScript + Fastify + Prisma with JWT auth and a state machine for application status.",[306,181,307,184,13,186],"Node.js","Fastify","https:\u002F\u002Fgithub.com\u002FFabrizio-Alvarez\u002Fjob-tracker",3,{"type":23,"children":311,"toc":466},[312,318,323,329,400,406,414,455,461],{"type":26,"tag":27,"props":313,"children":315},{"id":314},"why-i-built-it",[316],{"type":32,"value":317},"Why I built it",{"type":26,"tag":35,"props":319,"children":320},{},[321],{"type":32,"value":322},"I was looking for work and keeping my pipeline in a spreadsheet. Spreadsheets are\nterrible at reminders, status transitions, and \"when did I last hear back from\nthis company?\". So I built the tool I wanted — which is also the most defensible\nkind of side project: one I genuinely use (dogfooding).",{"type":26,"tag":27,"props":324,"children":326},{"id":325},"what-it-does",[327],{"type":32,"value":328},"What it does",{"type":26,"tag":61,"props":330,"children":331},{},[332,344,364,376,388],{"type":26,"tag":65,"props":333,"children":334},{},[335,337,342],{"type":32,"value":336},"Tracks ",{"type":26,"tag":69,"props":338,"children":339},{},[340],{"type":32,"value":341},"applications",{"type":32,"value":343}," across companies, with role, source, and salary notes.",{"type":26,"tag":65,"props":345,"children":346},{},[347,349,354,356,362],{"type":32,"value":348},"Models status as an explicit ",{"type":26,"tag":69,"props":350,"children":351},{},[352],{"type":32,"value":353},"state machine",{"type":32,"value":355},": ",{"type":26,"tag":236,"props":357,"children":359},{"className":358},[],[360],{"type":32,"value":361},"applied → screening → interview → offer | rejected",{"type":32,"value":363},".",{"type":26,"tag":65,"props":365,"children":366},{},[367,369,374],{"type":32,"value":368},"Logs ",{"type":26,"tag":69,"props":370,"children":371},{},[372],{"type":32,"value":373},"follow-ups",{"type":32,"value":375}," and surfaces the ones that are overdue.",{"type":26,"tag":65,"props":377,"children":378},{},[379,381,386],{"type":32,"value":380},"Keeps a ",{"type":26,"tag":69,"props":382,"children":383},{},[384],{"type":32,"value":385},"contacts",{"type":32,"value":387}," list (recruiters, hiring managers) linked to applications.",{"type":26,"tag":65,"props":389,"children":390},{},[391,393,398],{"type":32,"value":392},"Shows simple ",{"type":26,"tag":69,"props":394,"children":395},{},[396],{"type":32,"value":397},"funnel stats",{"type":32,"value":399}," so I can see where I'm losing candidates.",{"type":26,"tag":27,"props":401,"children":403},{"id":402},"architecture-decisions",[404],{"type":32,"value":405},"Architecture decisions",{"type":26,"tag":35,"props":407,"children":408},{},[409],{"type":26,"tag":55,"props":410,"children":413},{"alt":411,"src":412},"Application status state machine","\u002Fdiagrams\u002Fjob-tracker-state.svg",[],{"type":26,"tag":61,"props":415,"children":416},{},[417,426,435,445],{"type":26,"tag":65,"props":418,"children":419},{},[420,424],{"type":26,"tag":69,"props":421,"children":422},{},[423],{"type":32,"value":307},{"type":32,"value":425}," over Express — schema-based validation out of the box and a tighter\ntyped surface, which matters when the whole point is correctness.",{"type":26,"tag":65,"props":427,"children":428},{},[429,433],{"type":26,"tag":69,"props":430,"children":431},{},[432],{"type":32,"value":184},{"type":32,"value":434}," for data access — typed queries and migrations without hand-rolling SQL.",{"type":26,"tag":65,"props":436,"children":437},{},[438,443],{"type":26,"tag":69,"props":439,"children":440},{},[441],{"type":32,"value":442},"Status as a state machine",{"type":32,"value":444},", not a free-text field — illegal transitions are\nrejected at the boundary, so the funnel stats are trustworthy.",{"type":26,"tag":65,"props":446,"children":447},{},[448,453],{"type":26,"tag":69,"props":449,"children":450},{},[451],{"type":32,"value":452},"JWT auth",{"type":32,"value":454}," with refresh — single-user today, but structured so multi-tenant\nisn't a rewrite.",{"type":26,"tag":27,"props":456,"children":458},{"id":457},"status",[459],{"type":32,"value":460},"Status",{"type":26,"tag":35,"props":462,"children":463},{},[464],{"type":32,"value":465},"Core flows are working and covered by Vitest tests, with CI green. The UI is\nintentionally out of scope for now — the value is the API and the data model.",{"title":7,"searchDepth":21,"depth":21,"links":467},[468,469,470,471],{"id":314,"depth":21,"text":317},{"id":325,"depth":21,"text":328},{"id":402,"depth":21,"text":405},{"id":457,"depth":21,"text":460},"content:projects:job-tracker.md","projects\u002Fjob-tracker.md","projects\u002Fjob-tracker",1788209838292]