Login page Authenticate and input icon

This commit is contained in:
sriram
2026-08-25 11:06:54 +05:30
parent 814347e2d2
commit e1247ce1b2
5 changed files with 84 additions and 13 deletions

View File

@@ -42,10 +42,26 @@ If your backend runs somewhere else, set `VITE_API_BASE_URL` in a local
## Production build
```bash
npm run build # outputs to dist/
npm run build # outputs to dist/ - for the DEPLOYED site only
npm run preview # serve the production build locally to sanity-check it
```
`npm run build` loads `.env.production`, which pins `VITE_API_BASE_URL` to
`https://mcp.nearle.ai.in`. That is right for the deployed site and wrong for
anything you run locally, because the backend serves `frontend/dist` itself
whenever that directory exists - so `http://localhost:8000` would hand you a
page that sends `/api/auth/login` to the remote host and fails with "Could not
reach the API" even though the local backend is up. For a build you intend to
run locally, use:
```bash
npm run build:unified # same optimised build, blank VITE_API_BASE_URL
```
That leaves API calls relative, so they go back to whichever server delivered
the page - port 8000 for the backend's single-port mode, or `npm run preview`,
which proxies `/api/*` to `127.0.0.1:8000` the same way the dev server does.
## Pages
- `/` - Browse & Search (sidebar brand/category filters, product grid,