Nuxt 3.17 Branch: dev Feb 2026

LogShip ERP — Technical Documentation

Comprehensive technical reference for the LogShip WMS/ERP web application frontend.

LogShip ERP is a full-featured, enterprise-grade Enterprise Resource Planning and Warehouse Management System (WMS) frontend, built with Nuxt 3 and Vue 3. It manages the full lifecycle of sales orders, procurement, inventory, fulfillment, manufacturing, accounting, and business operations across multiple organisations and tenants.

The backend is powered by iDempiere ERP, with auxiliary services provided by Laravel, Strapi CMS, PostgREST, and Elasticsearch. The frontend proxies all requests through Nuxt server routes, handling token refresh, error classification, and multi-backend orchestration transparently.

Application Identity App Name: LogShip ERP  |  App ID (mobile): com.logship.mobile  |  Production URL: https://app.logship.de

Key Statistics

463Pages / Routes
518Vue Components
1167+API Route Files
35+Composables
18Feature Modules
18Server Utilities
8Layouts
194+Languages

Technology Stack

Core Framework

TechnologyVersionPurpose
Nuxt.js3.17.4Vue 3 meta-framework (SSR, file-based routing, auto-imports)
Vue.js3.5.16Reactive UI framework (Composition API)
TypeScriptBundledType-safe development
ViteBundledBuild tooling (ES2022 target, top-level await)

UI & Styling

LibraryVersionPurpose
@nuxt/ui3.1.3Headless UI components for Nuxt
@nuxt/ui-pro3.1.3Premium UI components
Bulma1.0.4CSS framework (no-dark-mode variant)
Bulma Extensions6.2.7Tooltips, badges, responsive tables
Alga CSS1.0.0-beta-48Custom PostCSS utility framework
Sass1.72.0CSS preprocessor
tedir-table / select / calendar / dropzonebetaCustom UI input components
@iconify-json/mdi1.1.66Material Design Icons

Data Grids & Charts

LibraryVersionPurpose
AG Grid Community31.3.2Core data grid
AG Grid Enterprise33.1.1Advanced features (grouping, pivoting, master-detail)
ag-grid-vue333.1.1Vue 3 integration for AG Grid
@amcharts/amcharts55.9.12Interactive charts & data visualisation

Document Processing

LibraryVersionPurpose
jsPDF3.0.2PDF generation
pdfmake0.2.20PDF creation with layouts
pdf-lib1.17.1PDF manipulation
html2canvas1.4.1HTML to canvas rendering
canvg4.0.2SVG to canvas
@tato30/vue-pdf1.9.4PDF viewer component
sharp0.33.5Server-side image processing

Barcode, Scanning & OCR

LibraryVersionPurpose
jsbarcode3.11.6Barcode generation (labels)
@ericblade/quagga21.10.2Camera-based barcode/QR scanning
tesseract.js7.0.0Optical Character Recognition

Mobile & PWA

LibraryVersionPurpose
@capacitor/core8.0.2Native mobile bridge
@capacitor/android8.0.2Android platform support
web-push3.6.7Web Push API (VAPID)

Backend & Database

LibraryVersionPurpose
pg8.16.3PostgreSQL client (iDempiere database)
better-sqlite312.4.1SQLite (push subscriptions, local cache)
sqlite35.1.7SQLite driver
@elastic/elasticsearch8.15.0Elasticsearch client
nodemailer7.0.11Email sending (SMTP)

Directory Structure

erp-nuxt-frontend/ ├── app/ # App config & routing │ ├── forms/ # Form definitions (sales, users) │ ├── windows/ # Window-based modal components │ └── router.options.ts # Custom router config ├── assets/ # Static assets │ ├── css/ # Stylesheets (fonts, main, custom, helper) │ ├── sass/ # SCSS source files │ ├── alga/ # Alga CSS framework .alga files │ └── langs/ # Translation files (shared, menus, navs) ├── components/ # 518 Vue components │ ├── AgGrid/ # 68 AG Grid renderers & filters │ ├── sales/ # 54 sales components │ ├── materials/ # 111 materials/inventory components │ ├── partners/ # 50 partner components │ ├── procurements/ # 37 procurement components │ ├── fulfillment/ # 10 fulfillment components │ ├── settings/ # 30 settings components │ ├── admin/ # 29 admin components │ ├── Charts/ # 5 chart components │ └── [20+ more directories] # Domain-specific component groups ├── composables/ # 35+ Vue composables │ ├── menu/admin/ # Admin menu composables │ ├── menu/fulfillmentCustomer/ # Fulfillment customer menus │ ├── states.ts # UI state management (25+ states) │ ├── useAuthError.ts # Auth error classification │ ├── usePushNotifications.ts # Push notification handling │ ├── useOrderStream.ts # SSE real-time order updates │ ├── useNativeScanner.ts # Native barcode scanner │ └── [others] # Theme, translation, feedback, etc. ├── layouts/ # 8 layout templates │ ├── app.vue # Main application layout │ ├── admin.vue # Admin layout │ ├── auth.vue / new-auth.vue # Authentication layouts │ ├── mobile.vue # Mobile-optimised layout │ ├── new-dash.vue # Modern dashboard layout │ ├── org.vue # Organisation layout │ └── tracking.vue # Public tracking layout ├── middleware/ # Route middleware │ ├── auth.ts # Authentication guard │ ├── guest.ts # Guest-only guard │ └── org.ts # Organisation check ├── pages/ # 463 page components (18 modules) │ ├── sales/ # 59 pages │ ├── materials/ # 93 pages │ ├── settings/ # 60 pages │ ├── procurements/ # 40 pages │ ├── partners/ # 39 pages │ ├── users/ # 31 pages │ ├── requests/ # 37 pages │ ├── mobile/ # 10 pages │ └── [9 more modules] # admin, fulfillment, manufacturing, etc. ├── plugins/ # 3 global plugins │ ├── 01.service-worker.client.ts │ ├── 02.push-notifications.client.ts │ └── amcharts.client.js ├── server/ # Backend layer │ ├── api/ # 1167+ API route files │ ├── middleware/ # auth.ts, fetch.ts │ └── utils/ # 18 utility modules ├── public/ # Static public assets │ ├── manifest.json # PWA manifest │ ├── assets/vendor/ # Vendor fonts, images │ └── flags/ # Country flag images ├── android/ # Capacitor Android project ├── scripts/ # Build scripts │ └── generate-icons.js ├── nuxt.config.ts # Main Nuxt configuration ├── app.config.ts # App-level config (theme) ├── capacitor.config.ts # Capacitor mobile config ├── i18n.config.ts # i18n configuration ├── tsconfig.json # TypeScript config ├── package.json # Dependencies (npm 9.8.1) └── .env / .env-dev / .env-prod # Environment configs

Configuration

nuxt.config.ts

The central configuration file defines all modules, CSS processing, runtime variables, and build options.

SettingValueDescription
modules@nuxt/ui, @nuxt/ui-pro, nuxt-lazy-loadCore Nuxt modules
imports.dirscomposables, menu/admin, menu/fulfillmentCustomerAuto-imported composable directories
vite.build.targetes2022JavaScript target with top-level await
ui.icons['mdi']Material Design Icons via Iconify
colorMode.preferencelightDefault theme (stored as logship_theme)
lazyLoadimages, videos, iframesIntersection Observer-based lazy loading
postcss.pluginsalga-css with tedir-* pluginsCustom PostCSS pipeline
fonts.providernoneSelf-hosted fonts (Inter, Inconsolata)

Runtime Configuration

Environment variables are mapped to runtimeConfig and accessed via useRuntimeConfig():

CategoryKeysPurpose
DatabasepgHost, pgPort, pgDatabase, pgUser, pgPasswordDirect PostgreSQL access
iDempiereapi.url, api.idempieretokenMain ERP backend API
Strapiapi.strapi, api.strapiupload, api.strapitokenCMS content management
PostgRESTapi.postgrestREST API over PostgreSQL
Laravelapi.laravelCustom microservice backend
DHLapi.dhlurl, api.dhlkey, api.dhlsecret, api.dhluser, api.dhlpassDHL Parcel shipping API
SendCloudapi.sendcloud, api.sendcloudpublickey, api.sendcloudprivatekeyMulti-carrier shipping
Elasticsearchapi.elastic, api.elastickey, api.elasticusername, api.elasticpassFull-text search engine
PublicvapidPublicKey, aggrid, solutionname, doctypeid, etc.Client-accessible config values

Data Flow Architecture

All client requests are proxied through Nuxt server routes. The frontend never communicates directly with external APIs. This architecture enables transparent token refresh, error handling, and multi-backend routing.

┌──────────────┐ useFetch() ┌──────────────────┐ fetchHelper() ┌────────────────┐ │ │ ──────────────────► │ │ ────────────────────► │ │ │ Vue Page │ │ Nuxt Server API │ │ iDempiere API │ │ (Browser) │ ◄──────────────── │ (server/api/) │ ◄────────────────── │ (ERP Backend) │ │ │ JSON response │ │ JSON response │ │ └──────────────┘ └────────┬─────────┘ └────────────────┘ │ │ Also connects to: │ ┌──────────────┼──────────────┬──────────────────┐ │ │ │ │ ▼ ▼ ▼ ▼ ┌────────────┐ ┌───────────┐ ┌─────────────┐ ┌──────────────┐ │ Laravel │ │ Strapi │ │ PostgREST │ │Elasticsearch │ │ Microsvcs │ │ CMS │ │ (Postgres) │ │ (Search) │ └────────────┘ └───────────┘ └─────────────┘ └──────────────┘

Request Lifecycle

Every server API endpoint follows a consistent try/catch pattern with automatic token refresh:

export default defineEventHandler(async (event) => {
  let data: any = {}
  try {
    // 1. First attempt with current token
    data = await handleFunc(event)
  } catch(err) {
    try {
      // 2. Token expired? Refresh and retry
      let authToken = await refreshTokenHelper(event)
      data = await handleFunc(event, authToken)
    } catch(error) {
      // 3. Still failing? Classify and handle error
      data = errorHandlingHelper(err, error)
      forceLogoutHelper(event, data)  // Only logouts on true auth failures
    }
  }
  return data
})

Server Middleware Pipeline

Two server middleware modules run on every request before reaching API routes:

MiddlewareFilePurpose
auth.ts server/middleware/auth.ts Extracts authentication context from cookies and attaches it to event.context.auth (token, refreshToken, userName, password, clientId, roleId, organizationId, warehouseId, userId, language)
fetch.ts server/middleware/fetch.ts Provides event.context.fetch() helper that wraps $fetch with base URL and Bearer token authentication

Authentication Flow

Login Process

User enters credentials
POST /api/auth/login
iDempiere /authenticate
Set cookies
/select-role
Dashboard

Session Cookies

CookieContentPurpose
logship_itJWT access tokenBearer authentication
logship_rtRefresh tokenToken renewal
logship_userUser object (JSON)User identity
logship_xuUsername (Base64)Fallback re-authentication
logship_pyPassword (Base64)Fallback re-authentication
logship_client_idAD_Client_IDTenant context
logship_role_idAD_Role_IDRole-based access
logship_organization_idAD_Org_IDOrganisation isolation
logship_warehouse_idM_Warehouse_IDWarehouse context
logship_languageLanguage codeLocale preference

Token Refresh Strategy

A two-tier refresh mechanism ensures session continuity:

Token Expired (401/407) │ ▼ ┌─────────────────────────┐ │ Tier 1: Refresh Token │ POST auth/refresh { refresh_token, clientId, userId } │ │ │ Success? ── Yes ──► Update cookies, retry request │ Failed? ── No ───┐ └─────────────────────┘ │ ▼ ┌─────────────────────────┐ │ Tier 2: Re-Authenticate │ POST auth/tokens { userName, password, parameters } │ │ │ Success? ── Yes ──► Update cookies, retry request │ Failed? ── No ───► Classify error → Force logout (if auth failure) └─────────────────────────┘

Error Handling & Classification

The system uses intelligent error classification to distinguish between authentication failures (which require logout) and authorization failures (which do not). This logic exists on both frontend (useAuthError.ts) and backend (authErrorHelper.ts).

Error TypeHTTP StatusActionUser Impact
token_expired401LogoutRedirected to /signin
token_invalid401LogoutRedirected to /signin
proxy_auth407LogoutRedirected to /signin
authorization403No LogoutPermission denied message
validation400No LogoutValidation error shown
server_error5xxNo LogoutError message shown
Error Keyword Detection The classifier checks error messages for keywords like "expired", "invalid", "forbidden", "Unauthorized" to distinguish error types beyond HTTP status codes.

Pages & Routing

Nuxt's file-based routing generates 463 routes from 18 main modules. Most resources follow a standard CRUD pattern:

/[module]/[resource]/           → index.vue     (List/Grid view)
/[module]/[resource]/create     → create.vue    (Create form)
/[module]/[resource]/add        → add.vue       (Alternative create)
/[module]/[resource]/[id]       → [id]/view.vue (Read-only detail)
/[module]/[resource]/[id]/edit  → [id]/edit.vue (Edit form)
/[module]/[resource]/[id]/duplicate → [id]/duplicate.vue (Clone)
/[module]/[resource]/[id]/print → [id]/print.vue (Print/PDF)

Module Route Summary

ModuleBase RoutePagesSub-Resources
Materials/materials93products, stock, warehouses, locators, price lists, shippers, promotions, discount schemas, freight
Settings/settings60document types/groups/sequences/status, taxes, charges, activities, order sources, locations, currencies
Sales/sales59orders, invoices, shipments, payments, returns, fulfillment orders, customer RMA, channels, campaigns
Procurements/procurements40orders, receipts, returns, invoices, payments, vendor RMA
Partners/partners39partners, groups, greetings, dunnings, payment terms, jobs, remunerations
Requests/requests37requests, types, status, categories, groups, resolutions, standard responses
Users/users31users, roles, organisations, tenants, leads, external users
Accountings/accountings16journals, calendars, schemas, elements
Manufacturings/manufacturings16productions, product BOM, part types, quality tests
Fulfillment/fulfillment14customers, stocks, invoices, pricing rules, Shopify/PlentyOne stocks
Admin/admin12countries, currencies, regions, users, print colours
Assets/assets10assets, asset groups
Projects/projects10projects, project types
Mobile/mobile10inventory, movement, return, commission, product, labels, shipments
Root/10dashboard, signin, register, tracking, locator-labels, generate-shipments/invoices
Accounts/accounts2profile, security
Organisations/organizations2list, create
Integrations/integrations2integration management

Public Routes (No Authentication)

RouteLayoutPurpose
/signinnew-authUser login
/registerauthUser registration
/forgot-passwordauthPassword recovery
/select-rolenew-authRole/org/warehouse selection
/trackingtrackingPublic shipment tracking (query: ?no=&zip=)

Layouts

Primary

app.vue

Main application layout with NavBar, SideBar, TabBar, and FooterSection. Used by most authenticated pages.

Primary

admin.vue

Admin-specific layout with NavBarAdmin, SideBarAdmin. Dedicated navigation for system administration.

Modern

new-dash.vue

Modern dashboard layout with NewSideBar, TopMegaBar, MainNavigationMenu, and NewTabBar. Horizontal flex design.

Auth

auth.vue / new-auth.vue

Centred authentication layouts for login, registration, and password recovery flows.

Mobile

mobile.vue

Mobile-optimised layout with orientation detection, portrait lock for phones, and 48px minimum touch targets.

Organisation

org.vue

Organisation management layout with NavBarOrg and SideBarOrg for organisation-specific navigation.

Minimal

tracking.vue

Minimal public-facing layout for the shipment tracking page. No authentication required.

Middleware

NameFileBehaviour
auth middleware/auth.ts Checks /api/idempiere-auth/authenticated. Guest paths bypass: /signin, /select-role, /login, /register, /verify-email, /forgot-password, /reset-password. Mobile pages allow fallback on network errors if cookie exists. Redirects to /signin on failure.
guest middleware/guest.ts Redirects authenticated users away from guest-only pages. Checks for valid cookie and redirects to /.
org middleware/org.ts Ensures user has selected an organisation. Currently disabled. Would redirect to /organizations.

Components

Component Inventory by Domain

DirectoryCountPurpose
materials/111Products, inventories, warehouses, price lists, shippers
AgGrid/68Custom cell renderers, filters, editors for AG Grid
sales/54Campaigns, channels, invoices, orders
partners/50Partner management, contact forms
procurements/37Purchase orders, procurement management
settings/30Configuration and settings forms
admin/29User, role, organisation, tenant management
requests/20Request/ticket management
RMAs/16Return Merchandise Authorisation
fulfillment/10Fulfillment operations
manufacturings/8Manufacturing orders
accountings/8Accounting/journal components
integrations/7Third-party integration UI
Charts/5AmCharts data visualisation
assets/5Asset management
(root level)48Reusable application-wide components

Key Root-Level Components

Data Display

ComponentDescription
AgGrid.vueMain AG Grid wrapper with enterprise features, column definitions, filtering
AgGridServer.vueServer-side paginated AG Grid with remote data source
AgGridCustom.vueCustom AG Grid variant for specialised use cases
PaginationBox.vueReusable pagination controls

Navigation

ComponentDescription
NavBar.vue / NewNavBar.vueTop navigation bars
SideBar.vue / NewSideBar.vue / BaseSideBar.vueSidebar navigation
TabBar.vue / NewTabBar.vueTab-based navigation (with localStorage persistence)
BreadCrumb.vue / NewBreadCrumb.vueBreadcrumb trails
MainNavigationMenu.vueMain mega-menu navigation system

Modals & Dialogs

ComponentDescription
AddressModal.vueAddress entry/selection modal
AttachmentModal.vueFile attachment management
SearchModal.vueGlobal search interface
ConfirmBox.vueConfirmation dialog
PrintPreview.vue / BatchPrintPreview.vuePrint preview before output

Inputs & Utilities

ComponentDescription
ComboBox.vueSearchable dropdown/select with filtering
BarcodeScanner.vueCamera-based barcode scanning interface
ImageMagnifierGlass.vueImage zoom/magnification
ContextMenu.vueRight-click context menu
AlertBox.vue / AlertAction.vueAlert and error display
ThemeToggle.vueDark/light mode toggle

Component Patterns

All components use the Vue 3 Composition API with <script setup lang="ts">:

<script setup lang="ts">
interface Props {
  modelValue?: any
  options?: any[]
  placeholder?: string
}

interface Emits {
  (e: 'update:modelValue', value: any): void
  (e: 'change', value: any): void
}

const props = withDefaults(defineProps<Props>(), { ... })
const emit = defineEmits<Emits>()
</script>

Naming Convention for Domain Components

PatternExamplePurpose
[Entity]Form.vueCampaignForm.vueCreate/edit form
[Entity]DetailRecord.vueInvoiceDetailRecord.vueRead-only detail view
[Entity]Action.vueUserAction.vueAction buttons/toolbar
[Entity]QuickView.vueCampaignQuickView.vueQuick preview panel
[Entity]Modal.vueImportOrdersModal.vueEntity-specific modal
Ag[Column].vueAgCustomDocStatus.vueAG Grid cell renderer

Composables

UI State Composables

Defined in composables/states.ts, these provide global reactive state without a store library:

ComposableTypePurpose
useSideBar()booleanSidebar visibility toggle
useTabs()any[]Tab navigation state (default: Home tab)
useActiveMenu()stringActive menu item tracking
usePrintPreview()booleanPrint preview dialog state
useAttachmentPreview()booleanAttachment viewer state
useQuickView()stringQuick view modal state
useWindowParam()anyWindow/modal parameter passing
useEmailInvoice()booleanEmail invoice dialog state
useBatchPrintPreview()booleanBatch print dialog state
useDataTableFilters()anyTable filter persistence
useBoM()anyBill of Materials state
useGenerateShipments()anyShipment generation state
useGenerateInvoices()anyInvoice generation state

Feature Composables

Auth

useAuthError

Classifies authentication errors. Determines if logout is needed. Mirrors backend authErrorHelper logic.

Real-time

useOrderStream

Server-Sent Events (SSE) stream for real-time order updates. Auto-reconnect with 5s delay. Filters by org, document number, external order ID.

Real-time

useOrderPolling

Fallback polling mechanism (30s default) for order updates when SSE is unavailable.

Mobile

usePushNotifications

Web Push via VAPID. Request permissions, subscribe/unsubscribe, show notifications, notify new orders.

Mobile

useBarcodeScanner

Quagga2-based camera barcode scanning. Supports Code 128, EAN, UPC, Code 39, Codabar, I2OF5. 1.15s debounce.

Mobile

useNativeScanner

Capacitor native barcode scanning. Listens for DataWedge broadcasts (Zebra/Honeywell enterprise scanners).

UI

useTheme

Light/dark mode management. Wraps useColorMode(). Stored as logship_theme in localStorage.

UI

useTranslation

Multi-language support. Converts iDempiere format (en_US) to standard (en-US). Cookie + localStorage persistence.

UI

useFeedback

Audio + visual feedback. Web Audio API: 800Hz success / 300Hz error sounds. Green/red flash overlays.

Mobile

useAppUpdate

Capacitor app update detection. Semver comparison. APK download and installation for Android.

Mobile

usePWAInstall

PWA installation prompting. Detects standalone mode. Handles beforeinstallprompt event.

Data

useOpenShipments

Fetches open fulfillment shipments. Multi-step: customers → organisations → shipments. Calculates totals.

Menu Composables

Each ERP module has a dedicated menu composable that defines its sidebar navigation structure. Located in composables/ and composables/menu/:

ComposableModuleMenu Items
useSales()SalesOrders, Fulfillment Orders, Invoices, Payments, Shipments, RMA, Returns, Channels, Campaigns
useMaterials()MaterialsProducts, Stock, Inventory, Warehouses, Price Lists, Shippers, Promotions
useProcurements()ProcurementPurchase Orders, Bills, Payments, Receipts, Vendor RMA, Returns
usePartners()PartnersPartners, Groups, Greetings, Dunnings, Payment Terms, Jobs
useSettings()SettingsDocuments, Taxes, Charges, Activities, Order Sources, Currencies
useUsers()UsersUsers, Leads, External Users, Roles, Tenants, Organisations
useRequests()RequestsRequests, Types, Status, Categories, Groups, Resolutions
useAnalysis()AnalysisAccountings, Financial Reports, Costs, Performance

Plugins

PluginFileSidePurpose
Service Worker plugins/01.service-worker.client.ts Client Registers service worker, monitors updates, reloads on new version, checks push subscriptions across navigation
Push Notifications plugins/02.push-notifications.client.ts Client Restores push subscriptions for users with existing permissions. Async initialisation to avoid blocking app load.
AmCharts plugins/amcharts.client.js Client Provides global access to AmCharts 5: $am5, $am5xy, $am5percent, $am5themes_Animated

State Management

The application uses Nuxt 3's built-in useState() for all reactive state. There is no Pinia or Vuex store. This approach provides SSR-safe reactive state with automatic hydration.

// composables/states.ts
export const useSideBar = () => useState<boolean>('sideBar', () => false)
export const useTabs = () => useState<any[]>('tabs', () => [
  { link: '/', text: 'Home', active: true }
])
export const useActiveMenu = () => useState<string>('activeMenu', () => '')

State Categories

CategoryStoragePersistence
UI State (sidebar, tabs, menus)useState()Session (no persistence)
AuthenticationHTTP CookiesPersistent across requests
ThemelocalStorage (logship_theme)Persistent
LanguagelocalStorage + cookie (logship_lang)Persistent
Scanner preferencelocalStoragePersistent
Tab navigationlocalStoragePersistent

Server API Layer

The server/api/ directory contains 1167+ API route files that proxy requests to various backends. Routes follow Nuxt's file-based convention with HTTP method suffixes.

API Route Convention

server/api/[resource]/
├── index.get.ts              # GET    /api/[resource]       (List)
├── index.post.ts             # POST   /api/[resource]       (Create)
├── store.post.ts             # POST   /api/[resource]/store (Alternative create)
├── update.put.ts             # PUT    /api/[resource]       (Update)
├── [id]/index.get.ts         # GET    /api/[resource]/[id]  (Get single)
├── [id]/index.put.ts         # PUT    /api/[resource]/[id]  (Update single)
├── [id]/index.delete.ts      # DELETE /api/[resource]/[id]  (Delete)
└── [custom-action].post.ts   # POST   /api/[resource]/...   (Custom action)

Major API Modules

ModuleBase PathBackendKey Endpoints
Auth/api/auth/iDempierelogin, logout, authenticated, forgot-password, reset-password
iDempiere Auth/api/idempiere-auth/iDempiereauthenticated, clients, roles, organisations, warehouses
Orders/api/orders/iDempiereCRUD, shipped, openso, sales/notfulfilled, stream (SSE)
Inouts/api/inouts/iDempiereShipments, line items, packages, process/complete
Invoices/api/invoices/iDempiereCRUD, credit notes, payments
Materials/api/materials/iDempiereProducts, stock, warehouses, locators, price lists
Partners/api/partners/iDempiereCRUD, groups, greetings, payment terms
Fulfillment/api/fulfillment/iDempiere + LaravelCustomers, stocks, invoices, pricing rules
Mobile/api/mobile/iDempiereInventory, movement, return, commission, app-version
Dashboard/api/dashboard/MultipleOverview data, KPIs, charts
Search/api/search/ElasticsearchFull-text search across entities
Push/api/push/SQLite + web-pushSubscribe, unsubscribe, send notifications
Shopify/api/shopify/Shopify APIE-commerce integration
PlentyOne/api/plentyone/PlentyOne APIE-commerce platform sync
Tracking/api/commission/MultipleShipment tracking lookups

Server Utilities

UtilityFilePurpose
fetchHelperserver/utils/fetchHelper.tsCentral HTTP client for iDempiere. Handles Bearer tokens, request/response logging with timing, error context.
refreshTokenHelperserver/utils/refreshTokenHelper.tsTwo-tier token refresh: refresh token first, then full re-auth. Updates cookies on success.
getTokenHelperserver/utils/getTokenHelper.tsExtracts JWT from logship_it cookie.
authErrorHelperserver/utils/authErrorHelper.tsClassifies errors: token_expired, token_invalid, authorization, other. Determines logout necessity.
forceLogoutHelperserver/utils/forceLogoutHelper.tsClears cookies and calls auth/logout. Only triggers on true auth failures.
errorHandlingHelperserver/utils/errorHandlingHelper.tsStandardises error responses: extracts status, message, detail from various error shapes.
laravelHelperserver/utils/laravelHelper.tsHTTP client for Laravel microservice backend.
strapiHelperserver/utils/strapiHelper.tsHTTP client for Strapi CMS with Bearer token auth.
postgrestHelperserver/utils/postgrestHelper.tsPostgREST client for direct PostgreSQL REST queries.
elasticsearchHelperserver/utils/elasticsearchHelper.tsElasticsearch client for full-text search.
dhlHelperserver/utils/dhlHelper.tsDHL Parcel API integration.
dhlTrackingHelperserver/utils/dhlTrackingHelper.tsDHL shipment tracking API.
sendcloudHelperserver/utils/sendcloudHelper.tsSendCloud multi-carrier shipping API.
pushDbserver/utils/pushDb.tsSQLite database for push subscriptions. WAL mode. 90-day auto-cleanup.
pushNotifierserver/utils/pushNotifier.tsWeb Push notification sender via VAPID. Auto-removes expired subscriptions.
orgRoleAccessCacheserver/utils/orgRoleAccessCache.tsCaches organisation-role access permissions.

Databases

Primary

PostgreSQL (iDempiere)

Main ERP database. Accessed via iDempiere REST API and directly via pg driver for custom queries. Stores all business data: orders, products, partners, invoices, etc.

Local

SQLite

Local database at data/push-subscriptions.db. WAL journal mode for concurrent access. Stores push notification subscriptions with user/role associations. Auto-cleanup at 90 days.

Search

Elasticsearch

Full-text search engine. Indexes products, orders, partners for fast querying. Accessed via official @elastic/elasticsearch client.

External Integrations

ERP

iDempiere

Core ERP backend. RESTful API at /api/v1. JWT authentication. Manages all business entities: AD_Client, AD_Org, C_Order, M_Inout, C_Invoice, M_Product, C_BPartner, etc.

Backend

Laravel

Supplementary microservice backend at dev-data.logship.de. Handles custom business logic, data processing, and integration tasks.

Backend

Strapi CMS

Content management system for structured content. Bearer token authentication. Used for product information, documentation, media management.

Backend

PostgREST

Automatic REST API over PostgreSQL. Direct database access at /custom-api. Used for custom queries and reporting.

Shipping

DHL Parcel

Deutsche Post DHL API at api-eu.dhl.com/parcel/de. Label creation, tracking, shipment management. Full credential-based auth.

Shipping

SendCloud

Multi-carrier shipping platform at panel.sendcloud.sc/api/v2. Public/private key authentication. Parcel creation and tracking.

E-commerce

Shopify

E-commerce platform integration. Product sync, order import, stock level synchronisation.

E-commerce

PlentyOne

E-commerce platform (PlentyMarkets) integration. Stock synchronisation and order management.

Finance

Lexware

Accounting software integration. Financial data synchronisation (active development as per recent commits).

ERP Modules

Sales Management

Full sales lifecycle management from order creation to fulfillment.

FeatureRouteDescription
Sales Orders/sales/ordersCreate, view, edit, duplicate, print sales orders
Fulfillment Orders/sales/fulfillment-ordersOrder picking and packing operations
Invoices & Credit Notes/sales/invoicesInvoice generation, credit note management
Customer Payments/sales/paymentsPayment tracking and receipt management
Shipments/sales/shipmentsShipment creation, tracking, label generation
Customer RMA/sales/customer-rmaReturn Merchandise Authorisation processing
Customer Returns/sales/returnsReturn processing and restocking
Marketing Channels/sales/channelsSales channel management
Marketing Campaigns/sales/campaignsCampaign tracking and analytics

Materials & Inventory

Comprehensive inventory management with 93 pages covering products, stock, warehouses, and pricing.

FeatureRouteDescription
Products/materials/productsProduct catalogue with categories and attributes
Warehouses/materials/warehousesWarehouse definitions and management
Locators/materials/locatorsWarehouse locator/bin management
Stock Takes/materials/stock-takesPhysical inventory counting
Stock Transfers/materials/stock-transfersInter-warehouse stock movement
Price Lists/materials/price-listsPrice list management with versioning
Shippers/materials/shippersShipper configuration and management
Promotions/materials/promotionsProduct promotions and discount schemas
Planning/materials/planningMaterial requirements planning

Procurement

Purchase order lifecycle from requisition to vendor payment.

FeatureRouteDescription
Purchase Orders/procurements/ordersCreate and manage purchase orders
Material Receipts/procurements/receiptsReceive goods from vendors
Vendor Invoices/procurements/invoicesBills and debit notes
Vendor Payments/procurements/paymentsPayment to vendors
Vendor RMA/procurements/vendor-rmaReturn authorisation to vendors
Vendor Returns/procurements/returnsReturn goods to vendors

Other Modules

Accounting

Chart of Accounts, journal entries, accounting periods/calendars, schemas, GL elements (asset, liability, equity, revenue, expense).

Manufacturing

Manufacturing orders, Bill of Materials (BOM), part types, quality tests, production tracking.

Partners

Customer/vendor master data, partner groups, greetings, dunning levels, payment terms, job categories, remunerations.

Projects

Project management with project types, budget tracking, and timeline management.

Requests

Request/ticket system with types, statuses, categories, groups, resolutions, and standard responses. Includes chat feature.

Assets

Fixed asset management, asset groups, depreciation tracking, and asset history.

Real-time Features

Server-Sent Events (SSE)

The useOrderStream composable establishes an SSE connection to /api/orders/sales/stream for live order updates:

// Message types:
// - "connected"   → Stream established
// - "newOrders"   → New orders available (triggers notification)
// - "heartbeat"   → Keep-alive signal
// - "error"       → Stream error (triggers reconnect)

const { startStream, stopStream, updateFilters } = useOrderStream({
  orgId: organizationId,
  documentNo: filterDocNo,
  openOnly: true,
  onNewOrders: (orders) => notifyNewOrders(orders.length)
})

Polling Fallback

When SSE is unavailable, useOrderPolling provides a configurable polling interval (default 30 seconds) with duplicate detection.

Push Notifications

Web Push with VAPID authentication. Service worker receives push events and displays native notifications with action buttons (e.g., "View Orders"). Push subscriptions are stored in SQLite and automatically cleaned up after 90 days.

Mobile & PWA

Capacitor Integration

ConfigValue
App IDcom.logship.mobile
App NameLogShip
PlatformAndroid (Capacitor 8.0.2)
Server URLhttps://app.logship.de
Mixed ContentAllowed (development)

Mobile Features

PWA Support

Mobile Pages

RoutePurpose
/mobileMobile dashboard
/mobile/inventoryInventory management
/mobile/movementStock movement
/mobile/returnReturn processing
/mobile/commissionCommission tracking
/mobile/productProduct lookup
/mobile/locator-articlesLocator article management
/mobile/print-labelsLabel printing
/mobile/generate-shipmentsShipment generation

Barcode & QR Code Scanning

Browser-Based (Quagga2)

FeatureDetail
FormatsCode 128, EAN, EAN-8, UPC, UPC-E, Code 39, Codabar, I2OF5
CameraBack camera preferred for mobile devices
Debounce1.15 seconds between scans (prevents duplicates)
WorkersAuto-detects hardware concurrency for parallel decoding
Retry20 retries with 100ms delay for initialization
PersistenceScanner preference stored in localStorage

Native Scanner (Capacitor)

Listens for DataWedge broadcasts from enterprise-grade scanners (Zebra, Honeywell). Falls back to custom nativeScan events. Detects if running on native platform via Capacitor bridge.

OCR (Tesseract.js)

Optical Character Recognition for text extraction from images. Used for document processing and label reading.

Document Processing

PDF

PDF Generation

Three PDF libraries: jsPDF for simple PDFs, pdfmake for complex layouts with tables, and pdf-lib for manipulation of existing PDFs.

PDF

PDF Viewing

@tato30/vue-pdf provides in-app PDF viewing with page navigation and zoom controls.

Export

HTML to Canvas

html2canvas captures HTML elements as images. canvg renders SVG content. Used for report export and print previews.

Export

Barcode Labels

JsBarcode generates barcode images for product labels, shipping labels, and locator labels.

Processing

Image Processing

Sharp handles server-side image optimization. ndarray-pixels for pixel-level image manipulation.

Processing

Batch Operations

Batch print previews, bulk invoice generation, and bulk shipment creation with progress tracking.

Shipping Integration

DHL Parcel

FeatureDetail
API Baseapi-eu.dhl.com/parcel/de
AuthenticationAPI key + secret + DHL credentials
CapabilitiesLabel creation, shipment tracking, parcel management
HelpersdhlHelper, dhlBaseHelper, dhlCustomHelper, dhlTrackingHelper

SendCloud

FeatureDetail
API Basepanel.sendcloud.sc/api/v2
AuthenticationPublic key + private key
CapabilitiesMulti-carrier shipping, label creation, tracking

Extensible Architecture

Shipping processors are configurable through /materials/shipping-processors and /materials/shipping-processor-configurations, allowing new carriers to be added without code changes.

Internationalisation

The application supports 194+ languages with translation files in /assets/langs/.

FeatureDetail
Translation Filesassets/langs/shared.js, menus.js, navs.js
Format ConversioniDempiere format (en_US) ↔ standard (en-US)
StoragelocalStorage (logship_lang) + HTTP cookie
Default LanguagesGerman (de), English (en)
DetectionisGerman, isEnglish, isSpanish computed properties
Theme Storagelogship_theme in localStorage
Note: The i18n Vue plugin (i18n.config.ts) is currently commented out in nuxt.config.ts. Translations are handled via custom composables (useTranslation and useLang).

Push Notifications

Architecture

┌────────────┐ subscribe ┌──────────────┐ store ┌──────────────┐ │ Browser │ ───────────► │ /api/push/ │ ───────► │ SQLite DB │ │ (SW + API)│ │ subscribe │ │ (WAL mode) │ └────────────┘ └──────────────┘ └──────────────┘ ┌────────────┐ trigger ┌──────────────┐ lookup ┌──────────────┐ │ New Order │ ───────────► │ pushNotifier │ ───────► │ SQLite DB │ │ (Server) │ │ │ │ (by role_id) │ └────────────┘ └──────┬───────┘ └──────────────┘ │ │ web-push (VAPID) ▼ ┌──────────────┐ │ Push Service│ ──► Browser Notification │ (Google/Apple)│ └──────────────┘
FeatureDetail
ProtocolWeb Push with VAPID authentication
Libraryweb-push 3.6.7
StorageSQLite (data/push-subscriptions.db)
TTL24 hours
UrgencyHigh (for order notifications)
TargetingBy user ID or role IDs
CleanupAuto-remove subscriptions older than 90 days + expired (410/404)

Build & Deployment

Scripts

CommandAction
npm run devStart development server (localhost:3000)
npm run buildGenerate icons + Nuxt build (production)
npm run generateStatic site generation
npm run previewPreview production build
npm run generate:iconsGenerate app icon variants
npm run postinstallNuxt prepare (auto-types)

Build Configuration

SettingValue
Build TargetES2022 (Vite + esbuild)
Top-level AwaitEnabled
Package Managernpm 9.8.1
Module TypeESM ("type": "module")
DeploymentVercel (vercel.json present)
Compatibility2024-12-10

Environment Configuration

Three environment files support different deployment targets:

FilePurpose
.envDefault / development configuration
.env-devDevelopment-specific overrides
.env-prodProduction configuration

Key Environment Variables

CategoryVariables
iDempiereURLV1, IDEMPIERETOKEN
DatabasePG_HOST, PG_PORT, PG_DATABASE, PG_USER, PG_PASSWORD
StrapiSTRAPIV1, STRAPIUPLOAD, STRAPITOKEN, STRAPIPUBLIC
PostgRESTPOSTGREST
LaravelLARAVEL
DHLDHLURL, DHLKEY, DHLSECRET, DHLUSER, DHLPASS
SendCloudSENDCLOUD, SENDCLOUDPUBLICKEY, SENDCLOUDPRIVATEKEY
ElasticsearchELASTIC, ELASTICKEY, ELASTIC_USER, ELASTIC_PASS
PushVAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, VAPID_SUBJECT
AG GridAGGRID (enterprise license key)
BuildGITHASH, BUILDTIME, SOLUTIONNAME
DefaultsTARGET_DOCUMENT_TYPE_ID, BUSINESS_PARTNER_GROUP_ID, PRICE_LIST_ID, COUNTRY_ID, IS_CUSTOMER

Code Patterns & Conventions

Page Pattern

// Standard page template
<script setup lang="ts">
definePageMeta({
  layout: 'app',
  middleware: ['auth']
})

const headers = useRequestHeaders(['cookie'])
const { data } = await useFetch('/api/resource', { headers })
</script>

API Endpoint Pattern

// Standard server API with token refresh
export default defineEventHandler(async (event) => {
  const handleFunc = async (event: any, token?: string) => {
    const authToken = token || getTokenHelper(event)
    return await fetchHelper(event, 'endpoint', 'GET', authToken, null)
  }

  let data: any = {}
  try {
    data = await handleFunc(event)
  } catch(err) {
    try {
      let authToken = await refreshTokenHelper(event)
      data = await handleFunc(event, authToken)
    } catch(error) {
      data = errorHandlingHelper(err, error)
      forceLogoutHelper(event, data)
    }
  }
  return data
})

Data Fetching Pattern (Client)

// Pattern 1: useFetch (SSR-compatible)
const { data } = await useFetch('/api/orders', {
  headers: useRequestHeaders(['cookie'])
})

// Pattern 2: Direct $fetch (client-side)
const loadData = async () => {
  const res = await $fetch('/api/orders?page=1&size=20', {
    headers: useRequestHeaders(['cookie'])
  })
  if (res?.records) items.value = res.records
}

iDempiere Data Model Pattern

// Entity references use ID + tableName format:
{
  AD_Org_ID:         { id: orgId, tableName: 'AD_Org' },
  C_BPartner_ID:     { id: partnerId, tableName: 'C_BPartner' },
  M_Warehouse_ID:    { id: warehouseId, tableName: 'M_Warehouse' },
  C_Order_ID:        { id: orderId, tableName: 'C_Order' },
  M_Product_ID:      { id: productId, tableName: 'M_Product' }
}

API Response Format

// Standard response from iDempiere
{
  "records": [
    { "id": 1, "name": "...", ... },
    { "id": 2, "name": "...", ... }
  ],
  "page-count": 5,
  "records-size": 100,
  "skip-records": 0,
  "row-count": 100
}

LogShip ERP — Technical Documentation

Generated February 2026  |  Branch: dev  |  Nuxt 3.17.4 + Vue 3.5.16

This documentation was generated from source code analysis of the erp-nuxt-frontend repository.