<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[FNHP Dev Diaries]]></title><description><![CDATA[FNHP Dev Diaries]]></description><link>https://diary.fnhp.at</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 17:55:19 GMT</lastBuildDate><atom:link href="https://diary.fnhp.at/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Transolix Dev Diary — 25 November 2025]]></title><description><![CDATA[Dashboard Overhaul, System Stability, Fleet Module & New Planning Sections
Today was one of those sessions where everything suddenly snaps into place.A long list of architectural pieces finally connected, and Transolix took a major leap toward becomi...]]></description><link>https://diary.fnhp.at/transolix-dev-diary-25-november-2025</link><guid isPermaLink="true">https://diary.fnhp.at/transolix-dev-diary-25-november-2025</guid><category><![CDATA[#fnhp]]></category><category><![CDATA[TMS Software Providers]]></category><category><![CDATA[tms trucking]]></category><category><![CDATA[Tms ]]></category><category><![CDATA[Laravel]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Tue, 25 Nov 2025 17:17:10 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-dashboard-overhaul-system-stability-fleet-module-amp-new-planning-sections"><em>Dashboard Overhaul, System Stability, Fleet Module &amp; New Planning Sections</em></h3>
<p>Today was one of those sessions where <em>everything suddenly snaps into place</em>.<br />A long list of architectural pieces finally connected, and Transolix took a major leap toward becoming a production-ready TMS.</p>
<p>Here’s what we accomplished:</p>
<hr />
<h2 id="heading-1-dashboard-overhaul-finally-real-data-everywhere">🧭 <strong>1. Dashboard Overhaul — Finally “Real Data” Everywhere</strong></h2>
<p>The earlier dashboard was more of a placeholder.<br />Today we rebuilt it completely:</p>
<ul>
<li><p>Clean and modern layout</p>
</li>
<li><p>Organisation card with real database values</p>
</li>
<li><p>Driver stats (assigned / unassigned)</p>
</li>
<li><p>Vehicle stats (assigned / unassigned)</p>
</li>
<li><p>User overview with grouped roles</p>
</li>
<li><p>Correct health indicators from the backend</p>
</li>
</ul>
<p>The dashboard now reflects the <em>actual operational state</em> of the system.</p>
<hr />
<h2 id="heading-2-healthservice-rebuild-reliable-system-diagnostics">🩺 <strong>2. HealthService Rebuild — Reliable System Diagnostics</strong></h2>
<p>This was one of the biggest pain points before today.</p>
<p>We fixed:</p>
<ul>
<li><p>Wrong holiday table detection</p>
</li>
<li><p>Incorrect JSON parsing</p>
</li>
<li><p>Duplicate &amp; bloated logic</p>
</li>
<li><p>Wrong variable names</p>
</li>
<li><p>Missing license/OSRM logic</p>
</li>
</ul>
<p>And added:</p>
<ul>
<li><p>Clean separated checks (license, OSRM, holidays, organisation, settings)</p>
</li>
<li><p>Safe JSON fallback logic</p>
</li>
<li><p>Cached settings for performance</p>
</li>
<li><p>Unified output format for the dashboard</p>
</li>
</ul>
<p>The result: <strong>the dashboard health section is now fully trustworthy</strong>.</p>
<hr />
<h2 id="heading-3-organisation-settings-system-fully-implemented">⚙️ <strong>3. Organisation Settings System — Fully Implemented</strong></h2>
<p>We now support organisation-level planning rules via:</p>
<ul>
<li><p>A dedicated <code>organisation_settings</code> table</p>
</li>
<li><p>JSON-based merged configuration</p>
</li>
<li><p>Validation for hours, buffers, limits, break times</p>
</li>
<li><p>A solid <code>forOrganisation()</code> + <code>saveForOrganisation()</code> API</p>
</li>
<li><p>A polished System Settings interface in the admin panel</p>
</li>
</ul>
<p>This will fuel driver scheduling, routing, and daily tour planning.</p>
<hr />
<h2 id="heading-4-new-admin-modules-added-to-the-sidebar">📂 <strong>4. New Admin Modules Added to the Sidebar</strong></h2>
<p>To prepare the internal structure of the TMS, we added:</p>
<h3 id="heading-fuhrpark-fleet"><strong>✔ Fuhrpark (Fleet)</strong></h3>
<ul>
<li><p>List of all vehicles</p>
</li>
<li><p>Assigned/unassigned status</p>
</li>
<li><p>Clean UI integrated into admin panel</p>
</li>
</ul>
<h3 id="heading-fahrereinsatzplan-driver-scheduling"><strong>✔ Fahrereinsatzplan (Driver Scheduling)</strong></h3>
<ul>
<li><p>Controller + view scaffold</p>
</li>
<li><p>Integrated with organisation settings</p>
</li>
<li><p>Ready for shift planning, hours, and workload visualization</p>
</li>
</ul>
<h3 id="heading-routenplanung-route-planning"><strong>✔ Routenplanung (Route Planning)</strong></h3>
<ul>
<li><p>Sidebar entry + controller</p>
</li>
<li><p>Placeholder for the OSRM-based map view</p>
</li>
<li><p>Foundation for drag-and-drop route design</p>
</li>
</ul>
<h3 id="heading-hilfe-help-system"><strong>✔ Hilfe (Help System)</strong></h3>
<ul>
<li><p>Internal documentation pages</p>
</li>
<li><p>About page</p>
</li>
<li><p>FAQ structure ready</p>
</li>
</ul>
<p>The sidebar now looks like a <strong>real commercial TMS</strong>.</p>
<hr />
<h2 id="heading-5-public-holidays-fixed-for-real">📅 <strong>5. Public Holidays — Fixed for Real</strong></h2>
<p>We corrected the model and detection logic.<br />The system now successfully confirms:</p>
<ul>
<li><p>Holidays table present</p>
</li>
<li><p>2025–2035 DACH dataset available</p>
</li>
<li><p>Ready for scheduling logic (e.g., holiday warnings)</p>
</li>
</ul>
<hr />
<h2 id="heading-6-strong-structural-foundation-for-what-comes-next">🧱 <strong>6. Strong Structural Foundation for What Comes Next</strong></h2>
<p>With today’s changes, the next major features now have stable ground:</p>
<ul>
<li><p>Real driver scheduling (range overlap logic)</p>
</li>
<li><p>OSRM map + routing</p>
</li>
<li><p>Shipment legs and manual stop insertion</p>
</li>
<li><p>Vehicle/driver timeline views</p>
</li>
<li><p>Tour planning UI</p>
</li>
</ul>
<p>This was not just UI work — today we <strong>solidified the core architecture</strong>.</p>
<hr />
<h1 id="heading-summary">🎯 <strong>Summary</strong></h1>
<p><strong>Today’s work transformed Transolix into a structured, modular TMS system</strong>:</p>
<ul>
<li><p>Full dashboard rebuild</p>
</li>
<li><p>HealthService fully functional</p>
</li>
<li><p>Organisation settings implemented</p>
</li>
<li><p>Fleet, Scheduling, Route Planning, and Help sections added</p>
</li>
<li><p>Holiday system corrected</p>
</li>
<li><p>Navigation &amp; UX polished</p>
</li>
</ul>
<p>Transolix is now ready for the big next steps:<br /><strong>map integration, driver scheduling engine, and route planning UI.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Transolix Core Foundations Coming Together]]></title><description><![CDATA[Today was one of those days where a dozen small pieces finally clicked into a clean architecture. The Transolix TMS is starting to feel like a real product — not just screens and forms, but an actual logistics brain.
1. Shipment Creation Now Fully St...]]></description><link>https://diary.fnhp.at/transolix-core-foundations-coming-together</link><guid isPermaLink="true">https://diary.fnhp.at/transolix-core-foundations-coming-together</guid><category><![CDATA[#fnhp]]></category><category><![CDATA[TMS Software Providers]]></category><category><![CDATA[tms trucking]]></category><category><![CDATA[Tms ]]></category><category><![CDATA[Laravel]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Thu, 20 Nov 2025 15:15:11 GMT</pubDate><content:encoded><![CDATA[<p>Today was one of those days where a dozen small pieces finally clicked into a clean architecture. The Transolix TMS is starting to feel like a real product — not just screens and forms, but an actual logistics brain.</p>
<h2 id="heading-1-shipment-creation-now-fully-structured"><strong>1. Shipment Creation Now Fully Structured</strong></h2>
<p>We finished the first <strong>serious version of the Shipment Create flow</strong>.<br />Address validation runs over YellowMap’s SmartMaps API, and the entire modal is now wide, scrollable, and usable even with big forms.</p>
<p>We also added:</p>
<ul>
<li><p>Inline customer creation</p>
</li>
<li><p>Proper error/ok banners for clarity</p>
</li>
<li><p>SmartMaps backend wired via <code>services.smartmaps.key</code><br />  (after discovering the API actually uses <code>key</code>, not <code>api_key</code> 🙃)</p>
</li>
</ul>
<p>And we introduced a <strong>proper data model for shipment items</strong>, so later the system can calculate:</p>
<ul>
<li><p>pallet space</p>
</li>
<li><p>m³</p>
</li>
<li><p>loading meters</p>
</li>
<li><p>weight</p>
</li>
<li><p>category → billing automation later<br />  This will be the backbone for accurate pricing, loading, and tour planning.</p>
</li>
</ul>
<h2 id="heading-2-documents-column-in-shipments-table"><strong>2. Documents Column in Shipments Table</strong></h2>
<p>The shipments overview now shows four icons:</p>
<ul>
<li><p>Auftrag</p>
</li>
<li><p>Lieferschein</p>
</li>
<li><p>POD</p>
</li>
<li><p>Invoice</p>
</li>
</ul>
<p>Icons appear for all shipments — but only activate if the document exists. Missing ones are greyed out.<br />This gives the dispatcher a perfect "document completeness" view at a glance.</p>
<p>Honestly looks beautiful already.</p>
<h2 id="heading-3-admin-role-correction"><strong>3. Admin Role Correction</strong></h2>
<p>We fixed the role logic:<br /><strong>Admins need zero permissions.</strong><br />If you are admin → you own the entire system.</p>
<p>Everyone else uses permissions:<br /><code>shipments.view</code>, <code>shipments.create</code>, etc.</p>
<p>Warehouse is a role.<br />Drivers are a role.<br />Only <strong>users</strong> (your office team) receive permissions.</p>
<p>Clean and simple.</p>
<h2 id="heading-4-fleet-module-the-big-vision"><strong>4. Fleet Module: The Big Vision</strong></h2>
<p>We started building the structure for the Fleet module — which will become one of the most powerful parts of Transolix.</p>
<p>The concept:</p>
<h3 id="heading-vehicles-left-side"><strong>Vehicles (left side)</strong></h3>
<ul>
<li><p>Cards representing trucks, vans, trailers</p>
</li>
<li><p>Drag &amp; drop</p>
</li>
<li><p>Add vehicle modal</p>
</li>
<li><p>Each vehicle has max weight, pallets, volume, LDM</p>
</li>
</ul>
<h3 id="heading-drivers-right-side"><strong>Drivers (right side)</strong></h3>
<ul>
<li><p>Cards representing drivers</p>
</li>
<li><p>Drag &amp; drop</p>
</li>
<li><p>Add driver modal</p>
</li>
<li><p>Assign one or multiple drivers to a vehicle</p>
</li>
</ul>
<p>The shipment itself DOES NOT store driver info.<br />Drivers → Vehicles<br />Shipments → Only care about the assigned vehicle per leg.</p>
<p>This keeps the data clean and realistic.</p>
<h2 id="heading-5-core-architecture-file-saved"><strong>5. Core Architecture File Saved</strong></h2>
<p>I generated a full <a target="_blank" href="http://transolix-architecture-core-2025-11-20.md"><code>transolix-architecture-core-2025-11-20.md</code></a> that documents:</p>
<ul>
<li><p>Data models</p>
</li>
<li><p>Role/permission system</p>
</li>
<li><p>How shipments, items, vehicles, drivers relate</p>
</li>
<li><p>Why we designed it this way</p>
</li>
<li><p>What to continue tomorrow</p>
</li>
</ul>
<p>Future-me will thank past-me for this.</p>
<hr />
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Transolix is no longer a prototype.<br />It’s shaping into a real, scalable TMS architecture with:</p>
<ul>
<li><p>Clean RBAC</p>
</li>
<li><p>Strong shipment model</p>
</li>
<li><p>Document system</p>
</li>
<li><p>Fleet module foundations</p>
</li>
<li><p>Clear backend/frontend structure</p>
</li>
</ul>
<p>Tomorrow, we continue building out the fleet UI and connect vehicles &amp; drivers to the planner.</p>
]]></content:encoded></item><item><title><![CDATA[SmartMaps Integration Day]]></title><description><![CDATA[Today was focused on integrating SmartMaps v2 REST geocoding into the Shipment Creation workflow.


SmartMaps REST Geocoding Working


We implemented a working POST request to SmartMaps v2 with the correct singleSlot parameter.We now receive:

Normal...]]></description><link>https://diary.fnhp.at/smartmaps-integration-day</link><guid isPermaLink="true">https://diary.fnhp.at/smartmaps-integration-day</guid><category><![CDATA[#fnhp]]></category><category><![CDATA[TMS Software Providers]]></category><category><![CDATA[tms trucking]]></category><category><![CDATA[Tms ]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Wed, 19 Nov 2025 19:19:29 GMT</pubDate><content:encoded><![CDATA[<p>Today was focused on integrating <strong>SmartMaps v2 REST geocoding</strong> into the Shipment Creation workflow.</p>
<hr />
<ul>
<li><h2 id="heading-smartmaps-rest-geocoding-working">SmartMaps REST Geocoding Working</h2>
</li>
</ul>
<p>We implemented a working POST request to SmartMaps v2 with the correct <code>singleSlot</code> parameter.<br />We now receive:</p>
<ul>
<li><p>Normalized street</p>
</li>
<li><p>ZIP</p>
</li>
<li><p>City</p>
</li>
<li><p>Country</p>
</li>
<li><p>District</p>
</li>
<li><p>House number</p>
</li>
</ul>
<hr />
<ul>
<li><h2 id="heading-modal-workflow-implemented">Modal Workflow Implemented</h2>
</li>
<li><p>Modal open/reset works</p>
</li>
<li><p>Validation icons + border feedback</p>
</li>
<li><p>Submit button locks/unlocks successfully</p>
</li>
<li><p>Global JS interface stable</p>
</li>
</ul>
<hr />
<ul>
<li><h2 id="heading-remaining-work">Remaining Work</h2>
</li>
<li><p>Improve address-mismatch tolerance</p>
</li>
<li><p>Customer-inline creation</p>
</li>
<li><p>Shipment storage in backend</p>
</li>
</ul>
<hr />
<p>A small day in terms of lines of code—but a very important structural milestone for Transolix.</p>
]]></content:encoded></item><item><title><![CDATA[Laying the Foundation for FNHP’s Next Big System]]></title><description><![CDATA[Day 1
Today marks the very first development entry for Transolix, FNHP’s modern Transport Management System (TMS). The aim is simple and ambitious: give dispatchers a clean, powerful, and intuitive tool that handles planning, routing, and shipments w...]]></description><link>https://diary.fnhp.at/laying-the-foundation-for-fnhps-next-big-system</link><guid isPermaLink="true">https://diary.fnhp.at/laying-the-foundation-for-fnhps-next-big-system</guid><category><![CDATA[Laravel]]></category><category><![CDATA[#fnhp]]></category><category><![CDATA[TMS Software Providers]]></category><category><![CDATA[tms trucking]]></category><category><![CDATA[Tms ]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Wed, 19 Nov 2025 08:55:29 GMT</pubDate><content:encoded><![CDATA[<h1 id="heading-day-1">Day 1</h1>
<p>Today marks the very first development entry for <strong>Transolix</strong>, FNHP’s modern Transport Management System (TMS). The aim is simple and ambitious: give dispatchers a clean, powerful, and intuitive tool that handles planning, routing, and shipments without the heavy complexity of legacy systems.</p>
<p>Here’s what we achieved on Day 1.</p>
<hr />
<ul>
<li><h2 id="heading-1-vision-amp-direction">1. Vision &amp; Direction</h2>
</li>
</ul>
<p>We defined what TransPilot is — and what it isn’t.<br />The system will be:</p>
<ul>
<li><p>Web-based, modern, and fast</p>
</li>
<li><p>Driven by React on the front end for interactivity</p>
</li>
<li><p>Powered by Laravel and MariaDB on the backend</p>
</li>
<li><p>Deployable both online and on-premise</p>
</li>
<li><p>Clean enough for small companies, scalable enough for growing ones</p>
</li>
</ul>
<p>This sets the tone for the architecture and long-term roadmap.</p>
<hr />
<ul>
<li><h2 id="heading-2-architectural-decisions">2. Architectural Decisions</h2>
</li>
</ul>
<p>We locked in the technical pillars:</p>
<ul>
<li><p><strong>Backend:</strong> Laravel (clean, predictable, perfect for structured business logic)</p>
</li>
<li><p><strong>Frontend:</strong> React (snappy UI for drag-and-drop planning)</p>
</li>
<li><p><strong>Database:</strong> MariaDB (stable and already configured in the dev environment)</p>
</li>
</ul>
<p>This gives us a future-proof, maintainable foundation.</p>
<hr />
<ul>
<li><h2 id="heading-3-first-domain-entities">3. First Domain Entities</h2>
</li>
</ul>
<p>We created the initial functional core of the system:</p>
<h3 id="heading-shipments"><strong>Shipments</strong></h3>
<ul>
<li><p>Metadata (weight, size, complexity)</p>
</li>
<li><p>Multiple partials per shipment</p>
</li>
<li><p>Support for customer-specific pickup/dropoff addresses</p>
</li>
</ul>
<h3 id="heading-vehicles"><strong>Vehicles</strong></h3>
<ul>
<li>Basic profiles and soon capacity rules</li>
</ul>
<h3 id="heading-drivers"><strong>Drivers</strong></h3>
<ul>
<li>Driver information, availability windows planned later</li>
</ul>
<p>These entities will feed directly into the planner logic.</p>
<hr />
<ul>
<li><h2 id="heading-4-shipment-creation-flow">4. Shipment Creation Flow</h2>
</li>
</ul>
<p>We built the first feature for dispatchers:</p>
<ul>
<li><p>A “+” button in the shipments view (mirroring the users module)</p>
</li>
<li><p>Modal overlay for creating new shipments</p>
</li>
<li><p>Upload functionality for PDF or image Auftrag documents</p>
</li>
<li><p>Choose or create a customer on the fly</p>
</li>
<li><p>Saved addresses per customer</p>
</li>
</ul>
<p>This is the beginning of the real workflow.</p>
<hr />
<ul>
<li><h2 id="heading-5-routing-amp-map-planning">5. Routing &amp; Map Planning</h2>
</li>
</ul>
<p>We researched the mapping stack:</p>
<ul>
<li><p><strong>OSRM</strong> selected as the routing engine</p>
</li>
<li><p>Clear reasons why big TMS vendors don’t rely on OSRM directly</p>
</li>
<li><p>Options to enrich OSRM with premium real-time traffic &amp; incident data</p>
</li>
</ul>
<p>This will become the heart of the planning board.</p>
<hr />
<ul>
<li><h2 id="heading-6-staging-setup-planning">6. Staging Setup Planning</h2>
</li>
</ul>
<p>Because the dev environment runs on Windows, we’ll prepare a <strong>setup script (.sh)</strong> for staging on the FNHP server once the core components are ready.</p>
<p>It will automate:</p>
<ul>
<li><p>Pulling the code</p>
</li>
<li><p>Installing dependencies</p>
</li>
<li><p>Migrating the DB</p>
</li>
<li><p>Building the frontend</p>
</li>
<li><p>Configuring Nginx</p>
</li>
</ul>
<p>Clean and repeatable deployments = less stress later.</p>
<hr />
<ul>
<li><h2 id="heading-7-transpilot-logo">7. TransPilot Logo</h2>
</li>
</ul>
<p>We designed a <strong>geometric cargo icon</strong> with forward direction, clean lines, and a transparent background.<br />It symbolizes:</p>
<ul>
<li><p>shipment</p>
</li>
<li><p>movement</p>
</li>
<li><p>structure</p>
</li>
<li><p>precision</p>
</li>
</ul>
<p>Exactly what TransPilot stands for.</p>
<hr />
<ul>
<li><h2 id="heading-end-of-day-summary">End of Day Summary</h2>
</li>
</ul>
<p><strong>Day 1 accomplished:</strong></p>
<ul>
<li><p>Vision set</p>
</li>
<li><p>Architecture agreed</p>
</li>
<li><p>Domain model started</p>
</li>
<li><p>Auth foundation applied</p>
</li>
<li><p>Shipment creation flow implemented</p>
</li>
<li><p>Routing engine selected</p>
</li>
<li><p>Logo designed</p>
</li>
</ul>
<p>Tomorrow: Magatunga in the morning, TransPilot in the afternoon.</p>
<p>TransPilot is officially underway.</p>
]]></content:encoded></item><item><title><![CDATA[Magatunga - 5 - Final Phase - Builder, Checkout, and Moderator Role]]></title><description><![CDATA[We continued polishing the Magatunga MVP this week, connecting the final structural pieces: course builder, unified checkout, moderator role, and overall UX refinements.
The challenge
The platform already worked end-to-end for admin, teacher, and stu...]]></description><link>https://diary.fnhp.at/magatunga-5-final-phase-builder-checkout-and-moderator-role</link><guid isPermaLink="true">https://diary.fnhp.at/magatunga-5-final-phase-builder-checkout-and-moderator-role</guid><category><![CDATA[#TeamFNHP]]></category><category><![CDATA[Laravel]]></category><category><![CDATA[#fnhp]]></category><category><![CDATA[edtech]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[DevDaily]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Sun, 02 Nov 2025 19:17:32 GMT</pubDate><content:encoded><![CDATA[<p>We continued polishing the Magatunga MVP this week, connecting the final structural pieces: course builder, unified checkout, moderator role, and overall UX refinements.</p>
<h3 id="heading-the-challenge">The challenge</h3>
<p>The platform already worked end-to-end for admin, teacher, and student roles — but we needed to connect the last missing pieces: real checkout logic (Stripe + PayPal), complete lesson blocks, and moderation features for feedback and quality control. At the same time, navigation, legal pages, and settings required final structure for testing on staging.</p>
<h3 id="heading-what-we-did">What we did</h3>
<ul>
<li><p>Implemented <code>UnifiedCheckoutController</code> with Stripe and PayPal webhook handling.</p>
</li>
<li><p>Finished the course builder: text, image, audio, download, and quiz blocks.</p>
</li>
<li><p>Added <strong>Moderator</strong> role with permissions and invite mails.</p>
</li>
<li><p>Introduced a simple <strong>settings system</strong> for platform behavior.</p>
</li>
<li><p>Refined <strong>student dashboard</strong> navigation and unified the internal top bar.</p>
</li>
<li><p>Added legal pages (Imprint, Privacy, Terms) and wired them from the footer.</p>
</li>
<li><p>Adjusted routes and redirects between landing and internal areas.</p>
</li>
</ul>
<h3 id="heading-result">Result</h3>
<p>Magatunga is now functionally complete — all roles (Admin, Teacher, Student, Moderator) work, checkout is connected (in dev-fake mode), and the course builder is stable. We’ve officially entered the <strong>polishing and QA phase</strong>: copy, visuals, and UX flow tuning before going live on staging.</p>
]]></content:encoded></item><item><title><![CDATA[Magatunga - 4 - Users, users, users]]></title><description><![CDATA[Focus: Finishing the authentication and user role pipeline
Today was all about closing the functional core of Magatunga — and it feels great to see everything finally connected and working the way it should.

What we accomplished
1. Fixed the authent...]]></description><link>https://diary.fnhp.at/magatunga-4-users-users-users</link><guid isPermaLink="true">https://diary.fnhp.at/magatunga-4-users-users-users</guid><category><![CDATA[#fnhp]]></category><category><![CDATA[Laravel]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Thu, 30 Oct 2025 21:10:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1761858582930/876dcdb2-b81e-4818-b4b0-c99c5aa4a695.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Focus:</strong> Finishing the authentication and user role pipeline</p>
<p>Today was all about <strong>closing the functional core</strong> of Magatunga — and it feels great to see everything finally connected and working the way it should.</p>
<hr />
<h2 id="heading-what-we-accomplished">What we accomplished</h2>
<h3 id="heading-1-fixed-the-authentication-redirect-bug">1. Fixed the authentication redirect bug</h3>
<p>A persistent issue where newly registered users were being redirected to the landing page after login turned out to be caused by <strong>missing Spatie role assignments</strong>.<br />We dug into the database, confirmed the mismatch between the <code>users.role</code> field and the <code>model_has_roles</code> pivot, and fixed it by properly assigning the <code>student</code> role to new users during registration.</p>
<p>➡️ Now all users land on the correct dashboard after login.<br />➡️ Role-based redirects (Admin / Teacher / Student) are working flawlessly.</p>
<hr />
<h3 id="heading-2-completed-the-email-verification-pipeline">2. Completed the email verification pipeline</h3>
<p>We branded and finalized the <strong>verification email</strong>, replacing Laravel’s default with our own custom layout.<br />The flow is now clean:</p>
<ol>
<li><p>User registers</p>
</li>
<li><p>Receives a branded verification mail</p>
</li>
<li><p>Verifies their account</p>
</li>
<li><p>Gets redirected to the correct dashboard</p>
</li>
</ol>
<p>No more plain Laravel emails — everything now fits Magatunga’s visual identity.</p>
<hr />
<h3 id="heading-3-finished-the-forgot-password-flow">3. Finished the Forgot Password flow</h3>
<p>We redesigned the <strong>password reset</strong> and <strong>forgot password</strong> pages to match Magatunga’s style guide.<br />Both pages use the same card design, color palette, and typography as the rest of the app.<br />The UX is consistent and professional from start to finish.</p>
<hr />
<h3 id="heading-4-unified-styling-for-auth-pages">4. Unified styling for auth pages</h3>
<p>We made sure that all guest-facing views (Login, Register, Forgot Password, Verify Email) use our unified layout and <code>public.css</code> theme.<br />Even the “verify your email” screen now looks clean and consistent with the Magatunga brand colors.</p>
<hr />
<h3 id="heading-5-verified-that-registration-auto-assigns-roles">5. Verified that registration auto-assigns roles</h3>
<p>To prevent future inconsistencies, we added an explicit <code>assignRole('student')</code> call in the registration controller.<br />Every new signup now has the proper Spatie role attached automatically — ensuring smooth redirects and consistent permissions.</p>
<hr />
<h2 id="heading-reflections">Reflections</h2>
<p>Today’s session was a major milestone — we can now confidently say that the <strong>core user flow is feature-complete</strong>.<br />Registration, verification, login, password recovery, and role-based dashboards are all functional.</p>
<p>That means the MVP backend is practically finished, and we can focus on the <strong>next big steps</strong>:</p>
<ul>
<li><p>Student dashboard polish</p>
</li>
<li><p>Teacher inbox</p>
</li>
<li><p>Admin overview</p>
</li>
<li><p>Payment checkout integration</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Magatunga - 3 — The Block System and Role Expansion]]></title><description><![CDATA[After the Admin foundation was in place, we shifted focus to deepening the learning-content layer and expanding access control for teachers.This phase was about moving from a course skeleton to real, editable building blocks — and ensuring the platfo...]]></description><link>https://diary.fnhp.at/magatunga-3-the-block-system-and-role-expansion</link><guid isPermaLink="true">https://diary.fnhp.at/magatunga-3-the-block-system-and-role-expansion</guid><category><![CDATA[#fnhp]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Wed, 29 Oct 2025 10:07:27 GMT</pubDate><content:encoded><![CDATA[<p>After the Admin foundation was in place, we shifted focus to deepening the learning-content layer and expanding access control for teachers.<br />This phase was about moving from a course <em>skeleton</em> to real, editable building blocks — and ensuring the platform’s permission system could scale beyond the admin role.</p>
<hr />
<h2 id="heading-the-challenge">The Challenge</h2>
<p>With the Course → Module → Lesson hierarchy functional, we needed to make the “Block” concept more robust and accessible.<br />Until now, blocks existed only as UI placeholders; the goal was to connect them to the backend, allow full CRUD operations, and prepare the way for teachers to author their own course material safely.</p>
<hr />
<h2 id="heading-what-we-did">What We Did</h2>
<h3 id="heading-implemented-a-fully-functional-block-system">🧱 Implemented a Fully-Functional Block System</h3>
<ul>
<li><p>Located and completed the <code>BlockController</code>, <code>Block</code> model, and related lesson/module logic.</p>
</li>
<li><p>Confirmed and stabilized <strong>six block types</strong>:<br />  <code>text</code>, <code>image</code>, <code>audio</code>, <code>video</code>, <code>quiz</code>, and <code>download</code>.</p>
</li>
<li><p>Each block stores its data in a JSON field (<code>data</code>) for maximum flexibility and easy future extension.</p>
</li>
<li><p>Enabled file uploads (images, audio, video, downloads) under <code>/storage/uploads/{type}</code> with automatic path injection into the JSON payload.</p>
</li>
<li><p>Added the missing <code>video</code> type to the controller’s creation allow-list so video blocks can now be created directly.</p>
</li>
</ul>
<h3 id="heading-data-alignment-amp-refactor">⚙️ Data Alignment &amp; Refactor</h3>
<ul>
<li><p>Standardized the <code>Block</code> model’s <code>$fillable</code> and <code>$casts</code>:</p>
<pre><code class="lang-php">  <span class="hljs-keyword">protected</span> $fillable = [<span class="hljs-string">'lesson_id'</span>,<span class="hljs-string">'type'</span>,<span class="hljs-string">'position'</span>,<span class="hljs-string">'is_active'</span>,<span class="hljs-string">'data'</span>];
  <span class="hljs-keyword">protected</span> $casts = [<span class="hljs-string">'data'</span>=&gt;<span class="hljs-string">'array'</span>,<span class="hljs-string">'is_active'</span>=&gt;<span class="hljs-string">'boolean'</span>,<span class="hljs-string">'position'</span>=&gt;<span class="hljs-string">'integer'</span>];
</code></pre>
</li>
<li><p>Removed legacy <code>content</code> references to prevent mass-assignment conflicts.</p>
</li>
</ul>
<h3 id="heading-opened-builder-access-for-teachers">🧑‍🏫 Opened Builder Access for Teachers</h3>
<ul>
<li><p>Extended route definitions to allow <strong>teachers with the</strong> <a target="_blank" href="http://courses.author"><code>courses.author</code></a> permission to use the builder:</p>
<pre><code class="lang-php">  Route::middleware([<span class="hljs-string">'auth'</span>,<span class="hljs-string">'role:teacher'</span>,<span class="hljs-string">'permission:courses.author'</span>])
      -&gt;prefix(<span class="hljs-string">'teacher'</span>)-&gt;as(<span class="hljs-string">'teacher.'</span>)-&gt;group(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
          Route::post(<span class="hljs-string">'/lessons/{lesson}/blocks'</span>, [AdminBlock::class, <span class="hljs-string">'store'</span>])-&gt;name(<span class="hljs-string">'blocks.store'</span>);
          Route::put(<span class="hljs-string">'/blocks/{block}'</span>, [AdminBlock::class, <span class="hljs-string">'update'</span>])-&gt;name(<span class="hljs-string">'blocks.update'</span>);
          Route::patch(<span class="hljs-string">'/blocks/{block}/toggle'</span>, [AdminBlock::class, <span class="hljs-string">'toggle'</span>])-&gt;name(<span class="hljs-string">'blocks.toggle'</span>);
          Route::patch(<span class="hljs-string">'/blocks/{block}/move'</span>, [AdminBlock::class, <span class="hljs-string">'move'</span>])-&gt;name(<span class="hljs-string">'blocks.move'</span>);
          Route::patch(<span class="hljs-string">'/blocks/{block}/reorder'</span>, [AdminBlock::class, <span class="hljs-string">'reorder'</span>])-&gt;name(<span class="hljs-string">'blocks.reorder'</span>);
          Route::delete(<span class="hljs-string">'/blocks/{block}'</span>, [AdminBlock::class, <span class="hljs-string">'destroy'</span>])-&gt;name(<span class="hljs-string">'blocks.destroy'</span>);
      });
</code></pre>
<p>  Teachers without this permission are automatically blocked with a 403 response.</p>
</li>
</ul>
<h3 id="heading-verified-role-amp-permission-seeder">🔐 Verified Role &amp; Permission Seeder</h3>
<ul>
<li><p>Reviewed the active <code>PermissionsSeeder</code> (called from <code>DatabaseSeeder</code>):</p>
<ul>
<li><p>Creates roles: <code>admin</code>, <code>teacher</code>, <code>student</code>.</p>
</li>
<li><p>Creates permissions: <a target="_blank" href="http://courses.author"><code>courses.author</code></a>, <code>courses.publish</code>, plus all admin navigation permissions.</p>
</li>
<li><p>Assigns <a target="_blank" href="http://courses.author"><code>courses.author</code></a> to teachers, <code>courses.publish</code> + nav perms to admin.</p>
</li>
</ul>
</li>
<li><p>Optional improvement added: also give <a target="_blank" href="http://courses.author"><code>courses.author</code></a> to admin for full builder access.</p>
</li>
</ul>
<h3 id="heading-migration-amp-seeding-cleanup">🧰 Migration &amp; Seeding Cleanup</h3>
<ul>
<li><p>Ran a complete <code>migrate:fresh --seed</code> to reset dev environment.</p>
</li>
<li><p>Fixed <code>Database\Factories\fake()</code> namespace error by switching factories to <code>$this-&gt;faker-&gt;...</code> syntax and adding <code>$faker = app(\Faker\Generator::class)</code> to seeders.</p>
</li>
<li><p>Verified clean seeding with proper demo roles and users.</p>
</li>
</ul>
<hr />
<h2 id="heading-result">Result</h2>
<p>The Magatunga backend now fully supports modular content creation.<br />Admins and authorized teachers can build complete course structures, upload media, and manage interactive quizzes — all within the web interface.<br />Role-based access ensures content authorship remains organized and secure.</p>
<p>The development environment has been reset and reseeded successfully, clearing the path for staging deployment and functional testing of the teacher workflow.</p>
]]></content:encoded></item><item><title><![CDATA[Magatunga - 2 — From Theme to Admin Foundation]]></title><description><![CDATA[We continued building the Magatunga project by transforming the static theme into a living Laravel application. The goal: turn the landing-page prototype into the backbone of a real learning platform with authentication, role and permission logic, an...]]></description><link>https://diary.fnhp.at/day-2-from-theme-to-admin-foundation</link><guid isPermaLink="true">https://diary.fnhp.at/day-2-from-theme-to-admin-foundation</guid><category><![CDATA[#fnhp]]></category><category><![CDATA[#magatunga]]></category><category><![CDATA[Laravel]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[learning platform]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Tue, 21 Oct 2025 17:35:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1761067895427/fb1bba56-2312-4a56-a2be-0495f9dc4f32.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We continued building the Magatunga project by transforming the static theme into a living Laravel application. The goal: turn the landing-page prototype into the backbone of a real learning platform with authentication, role and permission logic, and the beginnings of an admin workspace.</p>
<h3 id="heading-the-challenge"><strong>The challenge</strong></h3>
<p>After the front-end theme was ready, the next step was to bring Laravel’s backend to life.<br />We needed a foundation that could grow into a three-role system — <strong>Admin</strong>, <strong>Teacher</strong>, and <strong>Student</strong> — with permissions, dashboards, and a course structure flexible enough for both teaching and 1:1 sessions.</p>
<h3 id="heading-what-we-did"><strong>What we did</strong></h3>
<ul>
<li><p><strong>Set up roles &amp; permissions:</strong><br />  Integrated <code>spatie/laravel-permission</code> to manage roles (Admin / Teacher / Student) and fine-grained permissions (<a target="_blank" href="http://courses.author"><code>courses.author</code></a>, <code>courses.publish</code>, <code>one_to_one.offer</code>).<br />  This gives us control over who can create, edit, or publish courses — a must for a scalable education platform.</p>
</li>
<li><p><strong>Built the Admin Dashboard Shell:</strong><br />  A responsive layout with sidebar, topbar, and avatar menu — ready for mobile.<br />  Includes a logout button and profile edit link for each user.</p>
</li>
<li><p><strong>Created the Course Metadata Editor:</strong><br />  Admins can now create courses with titles, descriptions, prices (in cents server-side), and auto-generated slugs.<br />  All new courses start as drafts to keep the workflow clean.</p>
</li>
<li><p><strong>Implemented the Course Builder MVP:</strong><br />  Courses can now be structured into Modules → Lessons → Blocks.<br />  Supported block types so far: Text, Video, Audio, Quiz, Assignment, and Upload.<br />  Blocks can be added, edited via modal dialogs, moved up or down, toggled active/inactive, and previewed.<br />  After adding or editing, the interface automatically scrolls to the edited element for smooth navigation.</p>
</li>
<li><p><strong>Soft Delete and Archive Handling:</strong><br />  Courses can be archived and restored without data loss — for safe content management.</p>
</li>
</ul>
<h3 id="heading-result"><strong>Result</strong></h3>
<p>Magatunga has grown from a static landing page into a fully functional Laravel application with its own admin shell and content management structure.<br />The Admin can create, build, and publish courses without touching code — and the foundation is ready for teacher and student workflows next.</p>
]]></content:encoded></item><item><title><![CDATA[Magatunga - 1 — Turning a Mockup into a Laravel Theme]]></title><description><![CDATA[We started the Magatunga project by transforming a single-file HTML mockup into a reusable Laravel theme. The goal: a beautiful landing page that makes a great first impression and forms the design backbone for the upcoming app.
The challenge
We had ...]]></description><link>https://diary.fnhp.at/day-1-turning-a-mockup-into-a-laravel-theme</link><guid isPermaLink="true">https://diary.fnhp.at/day-1-turning-a-mockup-into-a-laravel-theme</guid><category><![CDATA[#laravel   #webdev   #devdiary   #fnhp   #indiehackers]]></category><dc:creator><![CDATA[FNHP Friendly Neighborhood Programmers]]></dc:creator><pubDate>Thu, 16 Oct 2025 16:19:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1761725493594/38bad72d-cc61-4dec-8b62-50987374801e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We started the Magatunga project by transforming a single-file HTML mockup into a reusable <strong>Laravel theme</strong>. The goal: a beautiful landing page that makes a great first impression and forms the design backbone for the upcoming app.</p>
<h3 id="heading-the-challenge">The challenge</h3>
<p>We had built a static prototype — one massive HTML file with inline CSS and a simple layout inspired by charity sites. It looked nice, but it wasn’t practical for growth. We needed something structured, maintainable, and reusable inside Laravel so future pages (login, courses, dashboards) all share the same visual identity.</p>
<h3 id="heading-what-we-did">What we did</h3>
<ol>
<li><p><strong>Created a theme structure</strong> inside <code>resources/views/themes/magatunga/</code>:</p>
<ul>
<li><p><code>layout.blade.php</code> → holds <code>&lt;head&gt;</code>, shared CSS, navbar, footer, JS.</p>
</li>
<li><p><code>parts/</code> → contains reusable partials like <code>nav.blade.php</code> and <code>footer.blade.php</code>.</p>
</li>
<li><p><code>pages/</code> → holds the actual page content (<code>landing.blade.php</code>).</p>
</li>
</ul>
</li>
<li><p><strong>Used Blade’s inheritance system</strong> (<code>@extends</code>, <code>@section</code>, <code>@yield</code>) to inject page content into the layout without repeating markup.</p>
</li>
<li><p><strong>Added a config file</strong> <code>config/theme.php</code> with our color tokens — now the entire palette can change by editing one file.</p>
</li>
<li><p><strong>Hooked up routing:</strong></p>
<pre><code class="lang-plaintext"> Route::get('/', fn() =&gt; view('themes.magatunga.pages.landing'))-&gt;name('landing');
</code></pre>
</li>
<li><p><strong>Prepared for multilingual copy</strong> by structuring text in <code>config/landing.php</code>. This will let us switch DE/EN seamlessly later this week.</p>
</li>
<li><p><strong>Result:</strong> The same HTML mockup now lives as a real Laravel view hierarchy — clean, maintainable, and theme-ready.</p>
</li>
</ol>
]]></content:encoded></item></channel></rss>