Skip to content

Repository files navigation

Production Run PWA

Production Run PWA is an Ionic Vue application for Apache OFBiz production run workflows.

License

Licensed under the Apache License, Version 2.0.

It provides a mobile-friendly interface for:

  • signing in against OFBiz-authenticated APIs
  • finding production runs
  • creating production runs
  • viewing production run details, tasks, materials, and notes

Tech Stack

  • Ionic Vue 8
  • Vue 3
  • Vue Router
  • Vite
  • TypeScript

Prerequisites

Contributors should have:

  • Node.js
  • npm
  • access to an Apache OFBiz environment, either:
    • running locally
    • or hosted remotely

Notes:

  • You do not need to install Vue globally.
  • You do not need to install Vite globally.
  • Project dependencies are installed locally with npm install.

OFBiz Integration

The app talks to Apache OFBiz REST APIs.

Current production run flows use:

  • GET /production-runs
  • GET /production-runs/:id
  • POST /production-runs

Authentication uses:

  • POST /auth/token
  • POST /auth/refresh-token

The API base URL is configured in:

  • src/services/apiConfig.ts

By default, the frontend uses:

  • /rest

Production Run Statuses

The UI currently aligns to these OFBiz production run statuses:

  • PRUN_CREATED
  • PRUN_SCHEDULED
  • PRUN_DOC_PRINTED
  • PRUN_RUNNING
  • PRUN_DOC_COMPLETED
  • PRUN_CLOSED
  • PRUN_CANCELLED

The find-screen status options are defined in:

  • src/constants/productionRunStatuses.ts

Routes

  • /login
  • /production-runs
  • /production-runs/create
  • /production-runs/:productionRunId

Routing and auth guards live in:

  • src/router/index.ts

Install

Install dependencies:

npm install

Run Locally

Start the development server:

npm run dev

This starts the Vite dev server for the Ionic Vue app.

Build

Create a production build:

npm run build

The build output is written to:

  • dist/

dist/ is generated output and should not be treated as source code.

Preview The Build

Preview the built app locally:

npm run preview

This is useful for checking the production bundle locally after a build.

Proxy Configuration

During local development, Vite proxies /rest requests to OFBiz.

You can use either:

  • a locally running OFBiz instance
  • a hosted OFBiz environment

Default development proxy target in code:

  • https://localhost:8443

Override it with:

  • VITE_OFBIZ_PROXY_TARGET

Where to change it:

  • update VITE_OFBIZ_PROXY_TARGET when starting the app
  • or change the default fallback in vite.config.ts if the repo-wide default should be different

Examples:

# Local OFBiz
VITE_OFBIZ_PROXY_TARGET=https://localhost:8443 npm run dev

# Hosted OFBiz
VITE_OFBIZ_PROXY_TARGET=https://example-ofbiz-host/rest-proxy-target npm run dev

Proxy configuration lives in:

  • vite.config.ts

Project Structure

  • src/pages
    • route-level screens such as login, find, create, and detail
  • src/components
    • reusable production run and shared UI components
  • src/services
    • API, auth, and production run service logic
  • src/constants
    • shared constants such as production run statuses
  • src/theme
    • shared app/theme CSS
  • src/types
    • TypeScript domain and API types

Notes

  • The app keeps auth state in memory in the current implementation.
  • node_modules/ and dist/ are generated artifacts and should not be treated as source.
  • The project uses vite.config.ts, tsconfig.json, and package.json as normal source/config files.

About

Production Run PWA App for OFBiz

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages