[{"data":1,"prerenderedAt":384},["ShallowReactive",2],{"project-perjadin":3},{"id":4,"title":5,"body":6,"description":240,"extension":370,"meta":371,"navigation":379,"path":380,"seo":381,"stem":382,"__hash__":383},"content\u002Fprojects\u002Fperjadin.md","Perjadin",{"type":7,"value":8,"toc":354},"minimark",[9,14,82,86,123,136,140,147,175,179,182,226,230,233,243,248,278,282,286,289,300,304,323,336,340],[10,11,13],"h2",{"id":12},"project-at-a-glance","Project at a Glance",[15,16,17,30,70,76],"ul",{},[18,19,20,24,25,29],"li",{},[21,22,23],"strong",{},"Problem:"," Calculating employee duty trip allowances manually across varying distances, provinces, islands, and overseas destinations is error-prone and slows down HR (",[26,27,28],"code",{},"SDM",") proposal reviews.",[18,31,32,35,36,39,40,43,44,47,48,51,52,51,55,58,59,62,63,66,67,69],{},[21,33,34],{},"Deliverables:"," A fullstack LIVT (",[21,37,38],{},"Laravel, Inertia.js, Vue 3, Tailwind CSS",") and MySQL web application implementing ",[26,41,42],{},"Master City"," coordinate management, automated Haversine distance & tiered daily allowance calculation, a ",[26,45,46],{},"Duty Trip Proposal"," approval workflow (",[26,49,50],{},"Proposed",", ",[26,53,54],{},"Approved",[26,56,57],{},"Rejected",") with auto-generated ticket numbers (",[26,60,61],{},"DTP-0000000x","), and role-based access control (",[26,64,65],{},"Staff"," vs ",[26,68,28],{},").",[18,71,72,75],{},[21,73,74],{},"Core Stack:"," Laravel, Inertia.js, Vue 3, Tailwind CSS, MySQL.",[18,77,78,81],{},[21,79,80],{},"Practical Value:"," Built solo in 2024 as an open-source implementation of a real-world recruitment test case study found on a developer forum, demonstrating clean business-rule encapsulation, geospatial distance calculation, and monolithic SPA delivery with Inertia.js.",[10,83,85],{"id":84},"project-overview","Project Overview",[87,88,89,90,94,95,98,99,102,103,51,106,51,109,51,112,115,116,119,120,122],"p",{},"Perjadin (",[91,92,93],"em",{},"Perjalanan Dinas",") is a ",[21,96,97],{},"2024"," personal engineering case study built solo from a recruitment test specification shared on a developer forum. Implemented using the ",[21,100,101],{},"LIVT stack"," (",[21,104,105],{},"Laravel",[21,107,108],{},"Inertia.js",[21,110,111],{},"Vue 3",[21,113,114],{},"Tailwind CSS",") backed by ",[21,117,118],{},"MySQL",", the application models an internal corporate ",[21,121,46],{}," workflow.",[87,124,125,126,128,129,132,133,135],{},"Employees (",[26,127,65],{},") submit duty trip requests specifying origin city, destination city, start\u002Fend dates, and travel reasons. The system automatically computes the trip duration, calculates inter-city distance in kilometers from stored city coordinates using the ",[21,130,131],{},"Haversine formula",", determines the applicable tiered daily allowance rate (within province, inter-province, inter-island, or overseas), and routes the proposal to HR (",[26,134,28],{},") for review and approval or rejection.",[10,137,139],{"id":138},"interface-specimen","Interface Specimen",[87,141,142],{},[143,144],"img",{"alt":145,"src":146},"Perjadin Duty Trip Proposals table and ticket detail modal showing automatic 5-day duration, 138 KM distance, Rp 200.000\u002Fday rate, and Rp 1.000.000 total allowance calculation","\u002Fimg\u002Fportfolio\u002Fperjadin-proposal.jpg",[87,148,149],{},[91,150,151,152,155,156,51,159,51,161,51,163,165,166,51,169,51,172,69],{},"Duty Trip Proposals & Ticket Detail Modal (",[26,153,154],{},"Ticket DTP-00000002","): Status filter tabs (",[26,157,158],{},"All",[26,160,50],{},[26,162,54],{},[26,164,57],{},"), searchable ticket ledger, and live allowance breakdown (",[26,167,168],{},"Total Day: 5 days",[26,170,171],{},"Allowance Info: 138 KM, Rp 200.000 \u002F day",[26,173,174],{},"Total Allowance: Rp 1.000.000",[10,176,178],{"id":177},"context-the-problem","Context & The Problem",[87,180,181],{},"The recruitment case study specification focused on solving realistic HR and administrative workflow requirements cleanly without over-engineering:",[15,183,184,190,208],{},[18,185,186,189],{},[21,187,188],{},"Geospatial Distance & Tiered Allowance Rules:"," Travel allowance rates depend on both exact distance between origin and destination cities (in KM) and geographic scope (same province, different province, different island, or overseas), multiplied by total trip days.",[18,191,192,195,196,198,199,201,202,204,205,207],{},[21,193,194],{},"Structured Approval Workflow:"," Proposals must carry sequential ticket identifiers (",[26,197,61],{},"), clear lifecycle states (",[26,200,50],{}," -> ",[26,203,54],{}," \u002F ",[26,206,57],{},"), and filterable status views.",[18,209,210,213,214,216,217,219,220,51,223,225],{},[21,211,212],{},"Role-Based Separation:"," Regular employees (",[26,215,65],{},") should submit and track their own proposals, while HR (",[26,218,28],{},") users manage ",[26,221,222],{},"User Management",[26,224,42],{}," reference data, and approve or reject incoming duty trip proposals.",[10,227,229],{"id":228},"system-architecture","System Architecture",[87,231,232],{},"Perjadin uses a monolithic SPA architecture powered by Laravel and Inertia.js, eliminating the need for a separate REST API layer while still delivering smooth Vue 3 interactivity:",[234,235,241],"pre",{"className":236,"code":238,"language":239,"meta":240},[237],"language-text","+-------------------------------------------------------------------+\n|                 SPA Client (Vue 3 + Tailwind CSS)                 |\n|    Inertia.js Page Transitions, Modals & Reactive Calculations    |\n+---------------------------------+---------------------------------+\n                                  | Inertia XHR Protocol\n+---------------------------------v---------------------------------+\n|                      Laravel Application Core                     |\n|  +--------------------+  +------------------+  +---------------+  |\n|  | Haversine Distance |  | Duty Trip Ticket |  | RBAC (Staff \u002F |  |\n|  | & Allowance Engine |  | Approval Flow    |  | SDM) & Cities |  |\n|  +---------+----------+  +--------+---------+  +-------+-------+  |\n+------------|----------------------|--------------------|----------+\n             +----------------------+--------------------+\n                                    | Eloquent ORM\n+-----------------------------------v-------------------------------+\n|                      Primary Database (MySQL)                     |\n|    Users\u002FRoles, Master Cities (Lat\u002FLng\u002FRegion), Duty Proposals    |\n+-------------------------------------------------------------------+\n","text","",[26,242,238],{"__ignoreMap":240},[244,245,247],"h3",{"id":246},"architectural-decisions","Architectural Decisions",[249,250,251,257,266],"ol",{},[18,252,253,256],{},[21,254,255],{},"LIVT Stack (Laravel + Inertia.js + Vue 3 + Tailwind CSS):","\nInertia.js bridged Laravel controllers directly with Vue 3 page components, giving the application instant modal workflows, status tab filtering, and responsive UI transitions without maintaining separate API authentication and frontend routing stacks.",[18,258,259,262,263,265],{},[21,260,261],{},"Server-Validated Business Rules:","\nWhile the Vue 3 modal gives instant visibility into trip duration, KM distance, and total allowance, the final Haversine distance computation, tier selection, and ticket number generation (",[26,264,61],{},") are enforced authoritatively on the Laravel backend before persistence.",[18,267,268,274,275,277],{},[21,269,270,271,273],{},"Structured Geographic Reference Data (",[26,272,42],{},"):","\nStoring latitude, longitude, province, island, and domestic\u002Foverseas flags in ",[26,276,42],{}," keeps distance and allowance tier calculations deterministic and easy to audit.",[10,279,281],{"id":280},"engineering-challenges-solutions","Engineering Challenges & Solutions",[244,283,285],{"id":284},"_1-deterministic-inter-city-distance-multi-tier-allowance-calculation","1. Deterministic Inter-City Distance & Multi-Tier Allowance Calculation",[87,287,288],{},"Computing accurate allowances across combinations of short-distance, inter-province, inter-island, and overseas trips requires combining geospatial math with clear conditional business rules.",[15,290,291],{},[18,292,293,296,297,299],{},[21,294,295],{},"Solution:"," Implemented the Haversine formula against ",[26,298,42],{}," latitude\u002Flongitude coordinates inside a dedicated Laravel calculation service, paired with explicit geographic tier rules (distance threshold + province\u002Fisland\u002Foverseas flags) to derive the daily rate and total allowance deterministically from start and end dates.",[244,301,303],{"id":302},"_2-sequential-ticket-numbering-role-scoped-proposal-lifecycle","2. Sequential Ticket Numbering & Role-Scoped Proposal Lifecycle",[87,305,306,307,309,310,201,312,204,314,316,317,319,320,322],{},"Duty trip tickets (",[26,308,61],{},") and status transitions (",[26,311,50],{},[26,313,54],{},[26,315,57],{},") must remain consistent while enforcing strict permission boundaries between ",[26,318,65],{}," and ",[26,321,28],{}," roles.",[15,324,325],{},[18,326,327,329,330,332,333,335],{},[21,328,295],{}," Encapsulated ticket ID formatting, status transitions, and role-based query scoping in Laravel middleware and controller\u002Fservice policies so ",[26,331,65],{}," users only submit and view their own proposals while ",[26,334,28],{}," manages reference data and executes approval decisions.",[10,337,339],{"id":338},"outcomes-key-learnings","Outcomes & Key Learnings",[15,341,342,351],{},[18,343,344,345,347,348,350],{},"Completed and open-sourced a clean LIVT stack implementation of a real-world recruitment case study covering geospatial Haversine calculations, tiered allowance rules, ticketed approval workflows, and ",[26,346,65],{},"\u002F",[26,349,28],{}," RBAC.",[18,352,353],{},"Demonstrated how Inertia.js + Vue 3 pairs with Laravel to deliver fast, maintainable internal enterprise workflows without unnecessary API duplication.",{"title":240,"searchDepth":355,"depth":355,"links":356},2,[357,358,359,360,361,365,369],{"id":12,"depth":355,"text":13},{"id":84,"depth":355,"text":85},{"id":138,"depth":355,"text":139},{"id":177,"depth":355,"text":178},{"id":228,"depth":355,"text":229,"children":362},[363],{"id":246,"depth":364,"text":247},3,{"id":280,"depth":355,"text":281,"children":366},[367,368],{"id":284,"depth":364,"text":285},{"id":302,"depth":364,"text":303},{"id":338,"depth":355,"text":339},"md",{"subtitle":372,"slug":373,"client":374,"year":375,"role":376,"category":377,"technologies":378},"Duty Trip Proposal & Automated Travel Allowance System","perjadin","Personal Case Study (Recruitment Test)",2024,"Solo Fullstack Developer","Web & Digital Applications",[105,108,111,114,118],true,"\u002Fprojects\u002Fperjadin",{"title":5,"description":240},"projects\u002Fperjadin","qdS_jPlrLiC_MKEFkwO-27Ak3PiRngaq6SH7DrC_RTg",1796006983873]