Wholesale fuel price board for Kenya - compare ex-depot diesel and petrol rates across oil marketing companies against the EPRA cap. Demo: seller prices are modelled.
# FuelBoard
**Live:
huss3n.github.io
> **Pre-launch.** Seller rates are sample data until each OMC confirms their quotes.
> EPRA caps, cycle history and market shares are live figures. See "What's real and
> what isn't" below before wiring this to anything.
Wholesale fuel price comparison for Kenya. Petrol stations, fleets and transporters
compare ex-depot diesel and petrol rates across oil marketing companies, by depot and
payment terms, and see what margin is left against the EPRA cap.
Think PetrolSpy, but one tier up the supply chain: the buyers here are the people who
*run* the stations, not the motorists.
## Run it
```bash
npm install
npm run dev #
localhost
npm run build # static output in dist/
```
## Price desk (admin portal)
`/?admin` — sign in and enter the rates you collected on the phone that morning.
Pick a depot and product, type each seller's number, hit **Publish to board**.
Query flag rather than a path because GitHub Pages has no SPA fallback, so
`/admin` would 404. The desk is a lazy chunk, so the public board never downloads it.
**Quotes are append-only.** Each morning inserts new rows; nothing is overwritten.
The board reads the `current_quotes` view (newest row per lane), and the price
history that feeds the sparklines and the KFI index builds itself as a side effect
of your daily entry. Leave a row blank if you didn't reach a seller — their last
price stays up with its age shown.
### Who can write
Writes are gated on membership of the `admins` table, not merely on being signed
in. Supabase allows public sign-up by default, so `authenticated` alone would have
let anyone who registered edit the board. To grant access:
```sql
insert into admins (user_id, email)
select id, email from auth.users where email = 'you@example.com';
```
If you ever create a user with raw SQL rather than through the dashboard, set the
token columns to `''` rather than leaving them NULL:
```sql
update auth.users set …