A minimal web API sample built for demonstration purposes.
It mirrors core logic from my production BillMint App, focusing on:
- JWT-based authentication
- GET/PUT workflow for
business_profile - Runnable with PHP’s built-in server
- Tiny browser client to test endpoints
This repo is meant to be:
- A job application code sample (simple, review-friendly).
- A portfolio piece showing clean API design in PHP.
mysql -u root -p -e "CREATE DATABASE billmint_demo CHARACTER SET utf8mb4"
mysql -u root -p billmint_demo < server/sql/schema.sqlEdit server/public_html/config.php with your DB password (or leave empty if root has no password).
php -S 127.0.0.1:8080 -t server/public_htmlCheck health:
curl http://127.0.0.1:8080/healthz
# {"ok":true}Open demo-web/index.html in a browser (or serve it):
npx http-server demo-web -p 9000Visit: http://127.0.0.1:9000
- Dev Login → get JWT
- /me → test auth
- /business_profile → GET/PUT demo
- Backend: PHP 8, MySQL, JWT
- Frontend Demo: Vanilla HTML/JS
- Auth: Simple dev login → JWT tokens
- Routing: Minimal
index.phpdispatcher
- This is a trimmed-down sample (focused on auth + profile management).
- Production BillMint has many more endpoints (transactions, receipts, sync, etc.).
- Safe to run locally — no sensitive secrets included.