Van Sales PWA: field sales app (customers, invoicing, payments, stock) with backend and frontend source in one app (like HRMS or POS Awesome). Install on any site, build, and open /pwa.
Structure:
- Backend:
fateh_pwa/pwa.py– whitelisted API methods (login, customers, sales invoice, payments, stock, etc.). - Frontend source:
frontend/– React PWA (Vite, React 19). Editfrontend/src/andfrontend/public/here. - Built output:
fateh_pwa/public/pwa/– generated bynpm run buildfrom the app root.
Build frontend (from app root):
cd apps/fateh_pwa
npm install # once, installs frontend deps
npm run build # builds into fateh_pwa/public/pwa/Then build bench assets and serve:
cd $BENCH
bench build --app fateh_pwaRun PWA: Open /pwa on your site (redirects to the PWA) or /assets/fateh_pwa/pwa/index.html.
Development: Run npm run dev from apps/fateh_pwa to start the Vite dev server (proxies /api to bench).
You can install this app using the bench CLI:
cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch develop
bench install-app fateh_pwaThis app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/fateh_pwa
pre-commit installPre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
This app can use GitHub Actions for CI. The following workflows are configured:
- CI: Installs this app and runs unit tests on every push to
developbranch. - Linters: Runs Frappe Semgrep Rules and pip-audit on every pull request.
mit