Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Luxtronic Service NEO

A step-by-step digital service form for Luxtronic's computer service center — one or two questions per page instead of one long form. See PLAN.md for the full design rationale and decisions behind this rebuild.

Technologies Used

  • Frontend: HTML, CSS, JavaScript (no build step, no framework)
  • Backend: Node.js, Express.js
  • Database: PostgreSQL

Setup

1. Install dependencies

npm install

2. Start the database

cd docker
docker compose up -d

Connect with a DB GUI at localhost:5435, user/password luxtronic_user / luxtronic_password, database luxtronic_service_neo_db.

3. Configure environment

cp .env.example .env

The defaults in .env.example match the Docker setup above. For local development, keep DB_HOST=127.0.0.1 / DB_PORT=5435 — never point a local .env at the production database (192.168.68.222:5436), or local testing will write to live data.

4. Start the app

npm run dev   # auto-restart
npm start     # production

The app runs at http://localhost:8004.

Project Structure

Luxtronic-Service-NEO/
├── app.js                 # entry point
├── src/
│   ├── db.js               # the one pg.Pool
│   ├── routes/              # serviceForms.js, analytics.js
│   └── utils/                # formId.js (year+sequence ID generation)
├── views/                  # one .html file per page
├── public/
│   ├── css/                  # style.css (app), print.css (quotation)
│   ├── js/                    # one file per page + common.js
│   └── images/
├── docker/                 # docker-compose.yml + init-scripts
├── uploads/                 # uploaded service photos, gitignored
└── ecosystem.config.cjs

Key concepts

  • Status model: draft (wizard in progress, auto-saved) → started (quoted, customer approved, repair in progress) → finished (ready for pickup). No cancelled.
  • Wizard: /service-form — one page, JS-driven steps, auto-saves each step to a draft record via PATCH /api/service-forms/:id.
  • Print: /print-form?id=<id> is a quotation + disclaimer for the customer to sign (physical signature), not a tax invoice — receipts/invoicing stay in Odoo.
  • No authentication — LAN-only trust model, same as every other Luxtronic in-house tool. Do not expose this off the shop's internal network without adding auth first.

Portal notifications

In-progress jobs show on the Luxtronic Portal's notification bell. This only happens when PORTAL_NOTIFICATIONS_URL is set, so leave it commented out locally. Details in PLAN.md.

Production

Running at http://192.168.68.255:8004 (pm2 process luxtronic-service-neo), database on 192.168.68.222:5436. Deployment steps, first-time DB init, and the pre-production checklist (outstanding security, backup, and data-hygiene work) are in PLAN.md.

The printed terms come from SERVICE_FORM_DISCLAIMER in .env (pipe-separated bullet points). .env.example and production both hold the shop's real terms from the paper service form; edit the server's .env and pm2 restart luxtronic-service-neo to change them.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages