Technical documentation
How Lotwarden is built.
Laravel 13 and PHP, a MySQL database, the Filament admin, a REST API and a responsive web front end.
Data model
| Table | What it holds |
|---|---|
| lots | Garages and surface lots: kind, levels, hourly and daily rate, permit only |
| spaces | Every bay: lot, level, code, kind (standard, accessible, EV), status (free, occupied, held), the car in it, the permit it is allocated to |
| vehicles | Plate, state, make, model, color, owner |
| visits | Entry and exit records: vehicle, lot, space, times, source (plate reader, sensor, manual), camera |
| permit_types | Resident, commuter, visitor: price and length |
| permits | Number, holder, vehicle, type, lot, start, expiry, status, who issued it |
| citations | Number, plate, lot, space, officer, violation, fine, status (unpaid, paid, appealed, void), due date |
| payments | Receipt, payer, what it paid for (permit, citation, parking), amount, method, time |
| alerts | Permit expiry, payment and violation alerts for a customer or for staff |
| feed_events | Every plate read and sensor change received |
| users | Username, role (administrator, operator, parking officer, customer), API token |
Roles
| Role | Can |
|---|---|
| Administrator | Everything, including payments, revenue, rates, permit types and users |
| Operator | Lots, spaces, visits, vehicles, permits, citations, the feed. No payments or users |
| Parking officer | Officer screen: plate lookup, citations, logging a car in |
| Customer | Own vehicles, permits, visitor permits, payments, citations and alerts |
Running it
composer install php artisan migrate --seed php artisan feed:tick --times=20 # simulated plate reads and sensors php artisan permits:alerts # expiry alerts, daily php artisan test # API and role tests
In this prototype the simulated feed also advances while someone has a live map open, and the admin dashboard can pause it.
Integrations
Plate readers and sensors post to the API (see the API). Here a simulated feed stands in for the hardware.
Payments are test payments in this prototype: no card is charged. A live system hands the checkout to a payment processor, so card numbers never touch this server.