Laravel 12 + Livewire + Tailwind CSS implementation of the interview task using the legacy schema in bincom_test.sql.
The app is built directly against the SQL dump and does not assume Laravel naming conventions.
polling_unit.uniqueidis the polling unit primary key.announced_pu_results.polling_unit_uniqueidmaps topolling_unit.uniqueid.polling_unit.lga_idmaps tolga.lga_id, notlga.uniqueid.polling_unit.uniquewardidmaps toward.uniqueid.ward.lga_idmaps tolga.lga_id.announced_lga_results.lga_namestores numeric LGA IDs as strings.- The dump only contains Delta State LGAs with
state_id = 25.
Polling Unit Result- Search and select a polling unit with announced results.
- Display polling unit details, summed party scores, and raw announced rows.
LGA Result Summary- Select an LGA and compute totals from
announced_pu_results. - Optional comparison against
announced_lga_results.
- Select an LGA and compute totals from
Add New Polling Unit Result- Create a polling unit and insert all party result rows in one database transaction.
- Install PHP dependencies.
composer install- Install frontend dependencies.
npm install- Create the MySQL database and import the dump.
mysql -u root -e "CREATE DATABASE IF NOT EXISTS bincomphptest"
mysql -u root bincomphptest < bincom_test.sql- Copy the environment file if needed and confirm the database settings.
cp .env.example .env
php artisan key:generateExpected database settings:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=bincomphptest
DB_USERNAME=root
DB_PASSWORD=- Build assets.
npm run build- Start the Laravel server.
php artisan serveOpen http://127.0.0.1:8000.
- The app includes a web app manifest and service worker, so supported browsers can install it as a standalone app.
- The install metadata and visible brand icon are generated from
public/Oyetoke_Adedayo_E.png. - On desktop Chrome or Edge, open the app and use the
Install appbutton in the navbar when it appears. - On mobile Safari, use Share -> Add to Home Screen.
- Build the frontend with
npm run buildfor production so the service worker is registered from the compiled asset bundle.
- The app uses Query Builder /
DBfacade for all legacy election queries. - The main LGA summary intentionally does not use
announced_lga_results. - Session, queue, and cache defaults are file-based so the app does not depend on Laravel migration tables for this interview task.
- Livewire 4 provides Alpine for the UI, so the frontend code registers Alpine data hooks against Livewire's Alpine instance instead of booting a second Alpine copy.