Skip to content

QeemaTech/Daro-dashboard

Repository files navigation

Daro Admin Dashboard

Vite + React admin SPA for the Daro platform (RTL-first Arabic UI).

Development

cp .env.example .env.local
npm ci
npm run dev

Default: http://localhost:5173 → API at VITE_API_BASE_URL.

Scripts

Script Purpose
npm run dev Vite dev server
npm run build Production build (dist/)
npm run preview Preview production build
npm run test Vitest unit tests
npm run lint ESLint
npm run test:e2e:admin Playwright admin smoke (@smoke-admin)

Deployment

Build on Node 20 (matches VPS and CI):

npm ci
npm run build
rsync -av dist/ daro@api.daro.eg:/srv/daro/web/dist/

Set build-time env in CI or .env.production.local (gitignored):

  • VITE_API_BASE_URL=https://api.daro.eg/api/v1
  • VITE_SOCKET_URL=https://api.daro.eg

Nginx serves /srv/daro/web/dist at admin.daro.eg — see docs/runbooks/prod-nginx-layout.md.

Never embed backend secrets in Vite env vars. Only VITE_* keys are exposed to the browser.

E2E smoke (staging)

export PLAYWRIGHT_BASE_URL=https://staging.admin.daro.eg
export PLAYWRIGHT_ADMIN_EMAIL=operator@daro.local
export PLAYWRIGHT_ADMIN_PASSWORD=Operator123!
npm run test:e2e:admin

Screenshots on failure are saved under test-results/.

CI: .github/workflows/frontend-e2e-staging.yml runs nightly + manual dispatch against staging (PLAYWRIGHT_BASE_URL, PLAYWRIGHT_ADMIN_EMAIL, PLAYWRIGHT_ADMIN_PASSWORD in GitHub Environment staging).

Required staging secrets:

  • PLAYWRIGHT_BASE_URL — e.g. https://staging.admin.daro.eg
  • PLAYWRIGHT_ADMIN_EMAIL — operator-tier account (not FINANCE read-only)
  • PLAYWRIGHT_ADMIN_PASSWORD

QA docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages