Yard management portal for Okha Steel and Hardware, Kisumu. Vite/React on Netlify, app.okhasteel.com
# Okha Steel & Hardware — Portal
The front end for the yard-management system. Vite + React, deployed on Netlify at
**app.okhasteel.com**. It talks to the API in `../okha-backend`.
## Local
```bash
npm install
npm run dev #
localhost
```
To point at a local API instead of Railway, create `.env.development`:
```
VITE_API_BASE=
localhost
```
A production build has no `VITE_API_BASE`, so it always uses the Railway URL in `src/api.js`.
## Deploying
New site on Netlify → connect this repo. `netlify.toml` already sets the build command, the publish
directory and the single-page-app redirect, so nothing needs configuring in the UI.
**Domain.** Add `app.okhasteel.com` as a custom domain, then at the DNS host create **one CNAME**
for `app` pointing at the Netlify site (` .netlify.app`). Let's Encrypt provisions the
certificate automatically and Force HTTPS can go on once it does.
> A stray `A`/`AAAA` record for the same subdomain will block certificate provisioning and the site
> will load as "not secure" with logins failing on CORS. This happened on the SSL portal. One clean
> CNAME, nothing else.
Then add the portal's origin to the API's allowlist in `okha-backend/server.js`, and put the API's
Railway URL into `public/_headers` (`connect-src`) and `src/api.js` (`API_BASE`).
## The screens
| Screen | What it is for |
|---|---|
| **Today** | Takings, tonnage, what is waiting on a truck, what has fallen below minimum |
| **Quotes** | Quotations with a validity window; converting shows any price that has moved since |
| **Counter** | Sales and quotes. Prices by the kilo, sells by the piece, cuts to length, checks credit |
| **Stock In** | Local deliveries and import containers with landed-cost allocation |
| **Stock List** | The catalogue, both price columns, margins, heats, offcuts, repricing |
| **Accounts** | Trade debtors with 30/60/90 ageing and payment recording |
| **History** | Every invoice, quote, delivery and receipt, fil …