| Server IP : 173.209.174.21 / Your IP : 216.73.216.89 Web Server : Apache/2.4.58 (Ubuntu) System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : nodor ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/wcfs/NAOPOS/php-api/ |
Upload File : |
PHP API files for a standard shared hosting server. Put the contents of `php-api/api` into your server's web-accessible `api` folder, then import `php-api/schema.sql` into MySQL. Existing database migrations: - To add cashier/status transaction audit fields to an existing database, run `php-api/migrations/2026-04-13_add_sale_audit_fields.sql` once in MySQL. The API remains backward-compatible if this migration has not been applied yet, but new sales will only persist cashier/status after the columns exist. Frontend setup: - Keep the built React app on the same server. - If the app is hosted under `/NAOPOS/dist/`, the frontend now defaults to using `/NAOPOS/api`. - If the API is served from `/api`, set `VITE_POS_API_BASE_URL=/api` before building. - If the API lives somewhere else, set `VITE_POS_API_BASE_URL`. Endpoints: - `GET /api/sales.php?date=YYYY-MM-DD` - `POST /api/sales.php` - `GET /api/report.php?date=YYYY-MM-DD` - `GET /api/settings.php` - `POST /api/settings.php` - `GET /api/catalog.php` - `POST /api/catalog.php` - `POST /api/upload_image.php` - `POST /api/reset_day.php`