A small, self‑hosted PHP e‑commerce project with an admin panel, product/category management, push notification examples, and a utility to upload files from a URL.
- Core bootstrap: core/core.php
- Main config: core/config.php
- Page layout & header/footer: core/page.php
- Common helpers: core/functions.php
- Users helper (admin check):
users::isAdmin— core/users.php - Admin dashboard: admin/index.php
- Push server service worker: admin/push/PNServiceWorker.js
- Push subscriber endpoint: admin/push/PNSubscriber.php
- Example welcome sender:
sendWelcome— admin/push/PNSendWelcome.php - File upload-from-URL tool: user/upload-url-to-server-14/upload.php
- Hosted rewrite rules: .htaccess
- PHP 7.4+
- Typical extensions used by features/examples:
- curl, gmp, mbstring, openssl, bcmath, sqlite3
- A webserver (Apache recommended for provided .htaccess rules)
- Place project files under your web root.
- Configure the site in core/config.php (SITE_URL, DB credentials etc.).
- Ensure writable permissions for directories used by SQLite / uploads.
- If using push examples, enable required PHP extensions and update VAPID keys in admin/push/MyVapid.php and the public key in admin/push/PNServiceWorker.js.
- Access the admin panel at /admin/ (see admin/index.php).
- Category, product and order managers live under admin/categories/ and admin/products/ and admin/orders/.
- Admin checks use
users::isAdmin.
- Client and service worker examples are under admin/push/.
- Register service worker on clients and save subscription via PNSubscriber.php.
- Update VAPID keys in MyVapid.php and public key in PNServiceWorker.js.
MIT