No description
- JavaScript 42.4%
- PHP 37.2%
- Hack 18.9%
- CSS 1.5%
| assets | ||
| components | ||
| .gitignore | ||
| api.php | ||
| db.php | ||
| index.php | ||
| init.php | ||
| PRD.md | ||
| README.md | ||
Kasir Simpel
Aplikasi kasir berbasis web tanpa login untuk UMKM, warung, dan toko kecil. Pure PHP + SQLite — buka langsung, langsung berjualan.
Spesifikasi lengkap: PRD.md
Fitur
- POS / Kasir — grid produk, keranjang, diskon, pajak, kembalian otomatis.
- Scan Barcode & QR — via kamera (
html5-qrcode) + fallback input manual. - Manajemen Produk — CRUD produk, barcode/SKU, kategori, stok, foto produk.
- Riwayat Transaksi — filter tanggal, cetak ulang struk, hapus transaksi.
- Dashboard — penjualan hari ini, produk terlaris, stok menipis, grafik 7h/30h/12bln/1thn.
- Pengaturan Toko — nama, alamat, telepon, pajak, mata uang, prefix invoice.
- Backup & Reset — backup
kasir.db(maks 10), reset semua data. - Cetak Struk — pratinjau lebar 80 mm / 122 mm,
window.print().
Tech Stack
| Layer | Teknologi |
|---|---|
| Backend | PHP 8.1+ (pure, tanpa framework) |
| Database | SQLite 3 (PDO, WAL mode) |
| Frontend | HTML5 + Vanilla JS |
| Styling | Tailwind CSS (CDN) |
| Icons | Material Design Icons (CDN) |
| Alert | SweetAlert2 (CDN) |
| Scan | html5-qrcode (CDN) |
| Chart | Chart.js (CDN) |
Requirements
- PHP 8.1+ dengan ekstensi
pdo_sqlite. - Browser modern (Chrome, Firefox, Safari, Edge).
- Kamera (opsional, untuk fitur scan).
Cara Menjalankan
php -S localhost:8000
Buka http://localhost:8000. Database data/kasir.db dibuat otomatis saat pertama dibuka.
Alternatif: letakkan folder di web server (Apache/Nginx) dan akses
index.php.
Struktur
├── index.php # Entry point & router (?page=...)
├── api.php # Endpoint AJAX (CRUD SQLite)
├── db.php # Koneksi PDO + helper
├── init.php # Auto-create tabel & seed settings
├── data/ # kasir.db (auto) + backups/
├── assets/
│ ├── css/custom.css
│ └── js/ # app.js, cart.js, scanner.js, products.js, dashboard.js
├── components/ # header, sidebar, pos, products, history, dashboard, settings, dll.
└── print/receipt.php # Template struk cetak
API (internal)
Semua endpoint di api.php?action=... mengembalikan JSON. Daftar lengkap ada di PRD.md §11.