Simple Repair Shop - Windows Install
================================

Full ticketing app for a computer repair shop. Runs on any modern Windows PC,
no server, no monthly hosting cost, no cPanel.

------------------------------------------------------------
QUICK START (5 minutes)
------------------------------------------------------------

1.  Unzip this bundle wherever you want the app to live, for example:
        C:\Workshop-OS\

2.  Double-click:  Install-Workshop-OS.bat

    The installer will:
      - If Python 3 isn't already installed, ask permission and then
        download + silently install Python 3.11 for the current user
        (no admin required)
      - Create a Python virtual environment
      - Install the app dependencies (about 1 minute)
      - Generate a random JWT secret and write .env
      - Put a "Simple Repair Shop" shortcut on your Desktop
      - Set the app to auto-start when you log into Windows
      - Start the server and open http://localhost:8001

4.  On the first-run screen, fill in your admin email, password, and shop name.

Done. From any other PC on the shop's WiFi, techs open:
        http://<this-PC's-IP>:8001

The installer prints the IP address at the end.

------------------------------------------------------------
DAY-TO-DAY USE
------------------------------------------------------------

  Open-Workshop-OS.bat     Opens the app in your browser
                            (starts the server first if it isn't running)

  Start-Workshop-OS.bat     Starts the server manually
  Stop-Workshop-OS.bat      Stops the server
  Uninstall-Workshop-OS.bat Removes shortcuts & stops the server (keeps data)

The server auto-starts every time you log into Windows.

------------------------------------------------------------
DYMO LABEL PRINTING
------------------------------------------------------------

Simple Repair Shop auto-prints a 2-1/4" x 1-1/4" label to a DYMO LabelWriter
every time a ticket is saved. On each PC that will print:

  1. Install DYMO Connect for Desktop from dymo.com
  2. Load 2-1/4" x 1-1/4" Multi-Purpose labels (e.g. DYMO 30334)
  3. Open Simple Repair Shop -> Settings -> DYMO Printer -> Test Print

If DYMO Connect isn't running, the browser falls back to a normal print
dialog with the same label layout.

------------------------------------------------------------
UPDATING
------------------------------------------------------------

Sign in as admin -> Settings -> App Updates -> upload the new
workshop-os-windows.zip. The app:

  * Snapshots your database to backups\pre-update-<timestamp>.db
  * Replaces the app files (keeps data\ and backups\ untouched)
  * Exits itself; the supervisor auto-relaunches with the new code

You'll see the new version number in Settings after a few seconds.

------------------------------------------------------------
BACKUPS
------------------------------------------------------------

Your database is a single file:  data\workshop-os.db

  * Manual backup:  Settings -> Backup & Restore -> Download
    (produces a JSON envelope you can restore anywhere)
  * Byte-exact snapshot: stop the server, copy data\workshop-os.db,
    start it again
  * A pre-update .db file lands in backups\ every time you update

------------------------------------------------------------
TROUBLESHOOTING
------------------------------------------------------------

"Python is not installed"
    The installer offers to auto-install Python 3.11 (per-user, no admin).
    If you decline, install Python 3.10+ from python.org (tick "Add to PATH")
    and re-run Install-Workshop-OS.bat.

"pip install failed"
    Usually a firewall / antivirus blocking pip from reaching pypi.org.
    Whitelist Python and try Install-Workshop-OS.bat again.

Browser shows "This site can't be reached"
    Run Start-Workshop-OS.bat manually and wait 5 seconds.
    If it still won't come up, open  tmp\workshop-os.log  to see why.

Port 8001 is already in use
    Edit .env, change nothing (there's no port setting there yet),
    then edit  supervisor.py  and change  --port 8001  to something free
    like  8010. Update the shortcut URLs to match.

Firewall pop-up when the app starts
    Allow Python on "Private networks" so other shop PCs can reach it.

------------------------------------------------------------
WHERE THINGS LIVE
------------------------------------------------------------

  .venv\                    Python virtual environment (created by installer)
  backend\server.py         The FastAPI app
  backend\requirements.txt  Python dependencies (pip installs from this)
  static\                   Pre-built React frontend
  data\workshop-os.db       Your database (back this up!)
  backups\                  Manual + pre-update snapshots
  tmp\workshop-os.log       Server log (open with Notepad)
  .env                      Configuration (JWT secret, ports, shop name)
  VERSION                   Current build marker (shown in Settings)
