============================================================
PhoneControl POS Server Installation Guide 🚀
============================================================

Welcome to the PhoneControl POS Server installation guide.
Follow these simple instructions to set up the server on your system (Windows, Linux, or macOS).

------------------------------------------------------------
1. Prerequisites (All Systems)
------------------------------------------------------------
Java JDK 17 or newer must be installed on your machine.
If you don't have it, download and install it from the official link:
https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe (Windows)
Or visit https://adoptium.net for Linux/macOS packages.

------------------------------------------------------------
2. Installation Steps by Operating System
------------------------------------------------------------

--- WINDOWS ---
1. Extract this zip file (`PhoneControl-POS-Server.zip`) to a permanent folder (e.g., `C:\PhoneControl-POS-Server`).
   * Do NOT run files from inside the compressed zip!
2. Right-click on `install.bat` and select "Run as administrator".
3. A terminal window will open, configure the firewall rule for port 8081, and install the server as a background service.
4. Once you see "Done! The server is now running in the background.", press any key to close the window.
5. The server will now start automatically every time Windows boots.

--- LINUX (Ubuntu/Debian/CentOS) ---
1. Extract the folder to your preferred directory (e.g., `/opt/PhoneControl-POS-Server`).
2. Open your terminal and navigate to the directory:
   cd /opt/PhoneControl-POS-Server
3. Make sure Java is installed: `java -version`
4. Run the server directly or in the background:
   * To run in background (Recommended):
     nohup java -jar phonecontrol-server.jar > server.log 2>&1 &
   * To stop it later, find the PID and kill it:
     pkill -f phonecontrol-server.jar
5. Ensure port 8081 is open in your firewall:
   sudo ufw allow 8081/tcp

--- macOS ---
1. Extract the folder to your Applications or preferred directory.
2. Open Terminal, go to the folder path:
   cd /path/to/PhoneControl-POS-Server
3. Run the server using:
   java -jar phonecontrol-server.jar
4. Keep the terminal open, or run it in the background using `nohup` similarly to Linux.

------------------------------------------------------------
3. Accessing the System
------------------------------------------------------------
Once the server is running, open your web browser (Chrome, Edge, Safari) and go to:

- From the Server machine itself:
  http://localhost:8081

- From other devices (Local Network / Wi-Fi):
  Replace `localhost` with the Server's local IP address.
  Example: http://192.168.1.50:8081

------------------------------------------------------------
Thank you for using PhoneControl POS!
============================================================
