How supernovasunrise/relational-database works
Mendure DME is an offline Electron desktop application for managing durable-medical-equipment customers, inventory, checkouts and reporting. An operator uses the renderer to sign in, maintain customer and equipment records, check equipment out under a 120-day agreement, and later record returns or review reports. The main process exposes those capabilities through a restricted preload IPC bridge and persists application data in per-user SQLite. The feature list and IPC contract document several areas whose implementation excerpts were not supplied; those branches are represented at their documented module paths without inferring internal call sequences.
Main entry points: ipc.js IPC handlers · db.js SQLite database · import-export.js Import and export · main.js Electron window
Components 20
Desktop runtime
- Electron window
src/main/main.js - App navigation
src/renderer/js/app.js - Workflow views
src/renderer/js/views - DME bridge
src/preload/index.js - IPC handlers
src/main/ipc.js - IPC contract
src/shared/ipc-contract.js
Checkout workflow
- Business rules
src/shared/business-logic.js - Loans and returns
src/main/features/loans.js - Checkout agreements
src/main/features/agreements.js - Printing
src/main/features/print.js
Records and reporting
- Customer records
src/main/features/customers.js - Equipment inventory
src/main/features/equipment.js - Reports and analytics
src/main/features/reports.js - Import and export
src/main/features/import-export.js
Access and storage
- Login view
src/renderer/js/views/auth.js - Authentication
src/main/auth.js - SQLite database
src/main/db.js
Other components
- Program operator
- Local file dialog
- Excel workbook support
Connections 31
- Program operator → App navigation: uses
- Electron window → SQLite database: initializes
- Electron window → IPC handlers: registers handlers
- Electron window → App navigation: loads window
- App navigation → Workflow views: routes to
- App navigation → DME bridge: requests status
- Workflow views → DME bridge: invokes bridge
- DME bridge → IPC handlers: sends IPC
- IPC handlers → IPC contract: checks channels
- IPC handlers → Authentication: dispatches auth
- IPC handlers → Customer records: dispatches customer
- IPC handlers → Equipment inventory: dispatches equipment
- IPC handlers → Loans and returns: dispatches loans
- IPC handlers → Checkout agreements: dispatches agreements
- IPC handlers → Reports and analytics: dispatches reports
- IPC handlers → Import and export: dispatches transfers
- IPC handlers → Printing: dispatches print
- Login view → DME bridge: submits credentials
- Authentication → SQLite database: reads and writes users
- Customer records → SQLite database: reads and writes
- Equipment inventory → SQLite database: reads and writes
- Loans and returns → SQLite database: reads and writes
- Checkout agreements → SQLite database: reads and writes
- Reports and analytics → SQLite database: queries records
- Import and export → SQLite database: transfers records
- Equipment inventory → Business rules: uses validation
- Loans and returns → Business rules: uses date rules
- Import and export → Business rules: uses normalization
- Import and export → Local file dialog: chooses files
- Import and export → Excel workbook support: reads and writes
- Printing → Electron window: prints document