A modern, feature-rich point-of-sale system built with Laravel and Filament for cafes and restaurants.
🌐 Language / Bahasa: English • Indonesia
Overview • Features • Getting Started • Installation • Usage • Development
The Cafe POS System is a comprehensive point-of-sale solution designed specifically for cafes and restaurants. Built with modern PHP technologies, it provides an intuitive admin interface, real-time reporting, and robust order management capabilities.
This application leverages Laravel 12 for the backend and Filament 5 for the admin panel, offering a seamless experience for both staff and management. Whether you're running a small cafe or a larger restaurant, this system scales to meet your needs.
Tip
Quick Start: You can have the system running locally in under 5 minutes using SQLite (no database setup required).
- 📊 Real-time Dashboard — Live revenue, order, and customer statistics with trend comparison
- 🛒 Order Management — Complete order lifecycle: New → Processing → Completed / Cancelled
- 📝 Product Catalog — Product and category management with image support and stock tracking
- 👥 Customer Tracking — Customer profiles linked to order history
- 💰 Payment Processing — Cash, Card, E-Wallet, and Bank Transfer with status tracking
- 📈 Sales & Product Reports — Analytics filtered by custom date ranges
- 🔐 Role-based Access Control —
super_admin,kasir, andinventarisroles with granular permissions - 📱 Responsive Design — Works on desktop, tablet, and mobile
- 🌐 Internationalization — Translation-ready with
resources/langstructure - ⚡ Inventory Tracking — Automatic stock deduction and restoration on order status changes
- 🩺 System Health Monitoring — Built-in health checks for database, cache, queue, and disk
- 📤 Import / Export — Bulk CSV import and export for products and categories
- Revenue tracking with period-over-period trend analysis
- New customers and new orders counters
- Latest orders table
- Orders and customers growth charts
- Intuitive order creation with inline product selector
- Real-time stock validation (prevents overselling)
- Status tabs with live badge counts (New, Processing, Completed, Cancelled)
- Payment recording per order (method + status + reference number)
- Sales Reports — Min, Max, Sum, Avg revenue grouped by date
- Product Reports — Per-product ordered quantity and revenue, with best/least-seller summary
There are multiple ways to get started with this project, depending on your preference and environment.
- PHP 8.2+ with extensions:
pdo,mbstring,json,openssl,tokenizer,xml,ctype,fileinfo,gd - Composer — PHP dependency manager
- Node.js 20+ and NPM — frontend asset compilation
- Database — SQLite (recommended for development) or MySQL 5.7+
The fastest way to get started is using SQLite, which requires no additional database setup:
# Clone the repository
git clone https://github.com/nirwanadoteth/cafe-pos.git
cd cafe-pos
# Install dependencies
composer install
npm install
# Environment setup
cp .env.example .env
php artisan key:generate
php artisan storage:link
# Database setup (SQLite)
php artisan migrate --seed
# Build frontend assets
npm run build
# Start the development server
composer run devThe application will be available at http://localhost:8000.
Note
The composer run dev command starts multiple services concurrently: the Laravel server, queue worker, log monitoring, and Vite for frontend assets.
If you prefer to use MySQL for development or production:
-
Create a MySQL database
-
Update your
.envfile:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=cafe_pos DB_USERNAME=your_username DB_PASSWORD=your_password
-
Run migrations:
php artisan migrate --seed
For local development, follow these detailed steps:
1. Clone and Setup
# Clone the repository
git clone https://github.com/nirwanadoteth/cafe-pos.git
cd cafe-pos
# Install PHP dependencies
composer install
# Install Node.js dependencies
npm install2. Environment Configuration
# Copy environment file
cp .env.example .env
# Generate application key
php artisan key:generate
# Create storage symlink
php artisan storage:linkEdit your .env file to configure:
- Database connection (SQLite recommended for development)
- Mail settings (optional)
- Queue configuration (sync for development)
3. Database Setup
Option A: SQLite (Recommended)
# Database will be created automatically
php artisan migrate --seedOption B: MySQL
# Create database first, then:
php artisan migrate --seedThe seeder will create sample data including products, categories, and an admin user.
4. Admin User Setup
Create a secure admin user:
php artisan db:seed --class=AdminUserSeederYou'll be prompted to enter:
- Admin email address
- Full name
- Secure password (12+ characters)
The user will be assigned the super_admin role with full system access.
5. Start Development
# Start all development services
composer run devThis command starts:
- Laravel development server (
localhost:8000) - Queue worker for background jobs
- Log monitoring
- Vite for frontend asset compilation
For production deployment, additional steps are required:
- Environment: Set
APP_ENV=productionandAPP_DEBUG=false - Database: Use MySQL/PostgreSQL with proper indexing
- Cache: Configure Redis for cache and sessions
- Queue: Set up queue workers with Supervisor
- Web Server: Configure Nginx/Apache with proper security headers
- SSL: Enable HTTPS with valid certificates
Refer to the Laravel deployment documentation for detailed production setup.
Navigate to /admin and log in with your credentials.
| Role | Access |
|---|---|
super_admin |
Full access to all features |
kasir |
Create and manage orders, record payments |
inventaris |
Manage products and categories (import/export) |
- Open Orders → New Order
- Select or create a customer
- Adjust product quantities in the order form
- Save the order — status defaults to New
- Update status to Processing when preparing
- Record payment method and mark as Completed
- Go to Catalog → Categories and create categories first
- Go to Catalog → Products and add products with price, stock, and image
- Toggle Visible to control what appears on the public menu page
- Go to Reports → Sales Reports for revenue analysis
- Go to Reports → Product Reports for best-selling products
- Use the Date Range filter to narrow results
The project follows Laravel's conventional structure with additional organization:
app/
├── Filament/
│ ├── Resources/ # CRUD panels (Orders, Products, Categories, Users, Roles)
│ ├── Clusters/ # Grouped pages (Reports)
│ ├── Widgets/ # Dashboard widgets
│ └── Pages/ # Custom pages (Dashboard, Welcome, HealthCheckResults)
├── Livewire/ # Interactive components (public product list, reports tables)
├── Services/ # Business logic (InventoryService, StatsOverviewCalculator, …)
├── Models/ # Eloquent models
├── Enums/ # OrderStatus, PaymentMethod, PaymentStatus
└── Helpers/ # Utility functions
resources/
├── views/ # Blade templates
├── lang/en/ # English translations
└── css/, js/ # Frontend source files
composer run dev # Start dev environment (server + queue + vite)
composer run test # Run PHPUnit test suite
composer run lint # Fix code style with Laravel Pint
composer run stan # Static analysis with PHPStan (level 8)
composer run cs # Pint + Prettier formatting| Tool | Purpose |
|---|---|
| Laravel Pint | PSR-12 code formatting |
| PHPStan Level 8 | Static type analysis |
| PHPUnit 11 | Feature and unit tests |
# Full test suite
php artisan test --compact
# Single file
php artisan test --compact tests/Feature/InventoryTrackingTest.php
# Filtered by name
php artisan test --compact --filter=testStockDecreases| Package | Version | Purpose |
|---|---|---|
| Laravel Framework | 12.x | Application backbone |
| Filament | 5.x | Admin panel |
| PHP | 8.2+ | Language runtime |
| Livewire | 4.x | Full-stack interactivity |
| Spatie Permission | — | Role & permission system |
| barryvdh/laravel-dompdf | 3.x | PDF invoice generation |
| bezhansalleh/filament-shield | 4.x | Shield permission integration |
| flowframe/laravel-trend | 0.4 | Chart trend data |
| shuvroroy/filament-spatie-laravel-health | 3.x | Health monitoring |
| Tool | Purpose |
|---|---|
| Tailwind CSS 4.x | Utility-first CSS |
| Alpine.js | Lightweight JS (via Filament) |
| Vite | Asset bundler |
| Blade | Templating engine |
Styles or JavaScript not loading
npm run buildOr run npm run dev alongside php artisan serve during development.
Storage / permission errors
chmod -R 775 storage bootstrap/cache
php artisan storage:link
php artisan config:clear && php artisan cache:clearDatabase issues
php artisan migrate:fresh --seedEnsure DB_* values in .env are correct and the database exists.
Page not found in admin panel
If a page is accessible but not visible in the sidebar, it may be a permission mismatch. Contact your super_admin to check role assignments.
- Fork the repository
- Create a branch:
git checkout -b feature/my-feature - Follow existing code conventions and patterns
- Add tests for new functionality
- Run quality checks:
composer run lint && composer run stan && composer run test - Commit with clear messages following Conventional Commits
- Open a Pull Request
This project is open-source software licensed under the MIT License. You are free to use, modify, and distribute this software in accordance with the license terms.
⭐ Star this project if you find it useful!
Made with ❤️ for the cafe and restaurant community
Gambaran Umum • Fitur • Memulai • Instalasi • Penggunaan • Pengembangan
Cafe POS System adalah solusi kasir (Point of Sale) lengkap yang dirancang khusus untuk kafe dan restoran. Dibangun dengan teknologi PHP modern, aplikasi ini menyediakan antarmuka admin yang intuitif, laporan secara real-time, dan manajemen pesanan yang handal.
Aplikasi ini menggunakan Laravel 12 untuk backend dan Filament 5 untuk panel admin, memberikan pengalaman yang nyaman bagi kasir maupun manajemen. Sistem ini cocok untuk kafe kecil hingga restoran yang lebih besar.
Tip
Mulai Cepat: Sistem dapat dijalankan secara lokal dalam waktu kurang dari 5 menit menggunakan SQLite — tidak perlu konfigurasi database tambahan.
- 📊 Dasbor Real-time — Statistik pendapatan, pesanan, dan pelanggan dengan perbandingan tren periode
- 🛒 Manajemen Pesanan — Siklus pesanan lengkap: Baru → Diproses → Selesai / Dibatalkan
- 📝 Katalog Produk — Manajemen produk dan kategori dengan dukungan gambar dan pelacakan stok
- 👥 Data Pelanggan — Profil pelanggan yang terhubung dengan riwayat pesanan
- 💰 Pencatatan Pembayaran — Tunai, Kartu, E-Wallet, dan Transfer Bank beserta status pembayaran
- 📈 Laporan Penjualan & Produk — Analitik dengan filter rentang tanggal kustom
- 🔐 Kontrol Akses Berbasis Peran — Peran
super_admin,kasir, daninventarisdengan izin granular - 📱 Desain Responsif — Berfungsi di komputer, tablet, dan ponsel
- 🌐 Siap Multibahasa — Struktur terjemahan menggunakan
resources/lang - ⚡ Pelacakan Inventaris — Pengurang dan pemulihan stok otomatis saat status pesanan berubah
- 🩺 Pemantauan Kesehatan Sistem — Pengecekan database, cache, antrian, dan disk
- 📤 Impor / Ekspor — Impor dan ekspor CSV massal untuk produk dan kategori
- Pelacakan pendapatan dengan analisis tren periode ke periode
- Penghitung pelanggan baru dan pesanan baru
- Tabel pesanan terbaru
- Grafik pertumbuhan pesanan dan pelanggan
- Antarmuka pembuatan pesanan dengan pemilih produk langsung
- Validasi stok real-time (mencegah kelebihan penjualan)
- Tab status dengan jumlah badge langsung (Baru, Diproses, Selesai, Dibatalkan)
- Pencatatan pembayaran per pesanan (metode + status + nomor referensi)
- Laporan Penjualan — Min, Max, Jumlah, Rata-rata pendapatan dikelompokkan per tanggal
- Laporan Produk — Jumlah terjual dan pendapatan per produk, dengan ringkasan produk terlaris / paling sedikit terjual
- PHP 8.2+ dengan ekstensi:
pdo,mbstring,json,openssl,tokenizer,xml,ctype,fileinfo,gd - Composer — pengelola dependensi PHP
- Node.js 20+ dan NPM — kompilasi aset frontend
- Database — SQLite (disarankan untuk pengembangan) atau MySQL 5.7+
# 1. Clone repositori
git clone https://github.com/nirwanadoteth/cafe-pos.git
cd cafe-pos
# 2. Instal dependensi
composer install
npm install
# 3. Konfigurasi environment
cp .env.example .env
php artisan key:generate
php artisan storage:link
# 4. Setup database (SQLite — dibuat otomatis)
php artisan migrate --seed
# 5. Build aset frontend
npm run build
# 6. Jalankan server pengembangan
composer run devBuka http://localhost:8000 di browser Anda.
Note
composer run dev menjalankan server Laravel, queue worker, dan Vite secara bersamaan.
- Buat database MySQL (contoh:
cafe_pos) - Perbarui file
.env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cafe_pos
DB_USERNAME=username_anda
DB_PASSWORD=password_anda- Jalankan migrasi:
php artisan migrate --seed
Langkah 1 — Clone dan Instal Dependensi
git clone https://github.com/nirwanadoteth/cafe-pos.git
cd cafe-pos
composer install
npm installLangkah 2 — Konfigurasi Environment
cp .env.example .env
php artisan key:generate
php artisan storage:linkPengaturan .env penting yang perlu diperiksa:
APP_URL— atur ke domain Anda di produksiDB_CONNECTION—sqliteataumysqlQUEUE_CONNECTION—syncuntuk pengembangan,databaseatauredisuntuk produksi
Langkah 3 — Setup Database
# Menjalankan migrasi dan mengisi data contoh (produk, kategori, pengguna)
php artisan migrate --seedLangkah 4 — Buat Pengguna Admin
php artisan db:seed --class=AdminUserSeederAnda akan diminta memasukkan:
- Alamat email admin
- Nama lengkap
- Kata sandi yang kuat (minimal 12 karakter)
Pengguna akan diberikan peran super_admin dengan akses penuh ke seluruh sistem.
Langkah 5 — Mulai Pengembangan
composer run devMenjalankan secara bersamaan:
- Server Laravel (
localhost:8000) - Queue worker
- Vite untuk hot-reload aset frontend
- Atur
APP_ENV=productiondanAPP_DEBUG=false - Gunakan MySQL dengan indeks yang tepat
- Konfigurasi Redis untuk cache dan sesi
- Pasang Supervisor untuk queue worker
- Gunakan Nginx atau Apache dengan HTTPS
Lihat dokumentasi deployment Laravel untuk panduan lengkap.
Buka /admin dan masuk menggunakan kredensial Anda.
| Peran | Akses |
|---|---|
super_admin |
Akses penuh ke semua fitur |
kasir |
Membuat dan mengelola pesanan, mencatat pembayaran |
inventaris |
Mengelola produk dan kategori (impor/ekspor) |
- Buka Pesanan → Pesanan Baru
- Pilih atau buat pelanggan baru
- Atur jumlah produk di formulir pesanan
- Simpan pesanan — status awal: Baru
- Ubah status ke Diproses saat pesanan sedang disiapkan
- Catat metode pembayaran dan tandai sebagai Selesai
- Buka Katalog → Kategori dan buat kategori terlebih dahulu
- Buka Katalog → Produk dan tambahkan produk dengan harga, stok, dan gambar
- Aktifkan toggle Visible untuk mengatur produk yang tampil di halaman menu publik
- Buka Laporan → Laporan Penjualan untuk analisis pendapatan
- Buka Laporan → Laporan Produk untuk melihat produk terlaris
- Gunakan filter Rentang Tanggal untuk mempersempit hasil
app/
├── Filament/
│ ├── Resources/ # Panel CRUD (Pesanan, Produk, Kategori, Pengguna, Peran)
│ ├── Clusters/ # Halaman terkelompok (Laporan)
│ ├── Widgets/ # Widget dasbor
│ └── Pages/ # Halaman kustom (Dashboard, Welcome, HealthCheckResults)
├── Livewire/ # Komponen interaktif (daftar produk publik, tabel laporan)
├── Services/ # Logika bisnis (InventoryService, StatsOverviewCalculator, …)
├── Models/ # Model Eloquent
├── Enums/ # OrderStatus, PaymentMethod, PaymentStatus
└── Helpers/ # Fungsi utilitas
resources/
├── views/ # Template Blade
├── lang/en/ # Terjemahan bahasa Inggris
└── css/, js/ # File sumber frontend
composer run dev # Jalankan lingkungan pengembangan (server + queue + vite)
composer run test # Jalankan suite pengujian PHPUnit
composer run lint # Perbaiki gaya kode dengan Laravel Pint
composer run stan # Analisis statis dengan PHPStan (level 8)
composer run cs # Format dengan Pint + Prettier| Alat | Kegunaan |
|---|---|
| Laravel Pint | Format kode PSR-12 |
| PHPStan Level 8 | Analisis tipe statis |
| PHPUnit 11 | Pengujian fitur dan unit |
# Semua pengujian
php artisan test --compact
# File tertentu
php artisan test --compact tests/Feature/InventoryTrackingTest.php
# Filter berdasarkan nama
php artisan test --compact --filter=testStockDecreases| Paket | Versi | Kegunaan |
|---|---|---|
| Laravel Framework | 12.x | Kerangka aplikasi |
| Filament | 5.x | Panel admin |
| PHP | 8.2+ | Runtime bahasa |
| Livewire | 4.x | Interaktivitas full-stack |
| Spatie Permission | — | Sistem peran & izin |
| barryvdh/laravel-dompdf | 3.x | Pembuatan PDF invoice |
| bezhansalleh/filament-shield | 4.x | Integrasi izin Shield |
| flowframe/laravel-trend | 0.4 | Data tren grafik |
| shuvroroy/filament-spatie-laravel-health | 3.x | Pemantauan kesehatan sistem |
| Alat | Kegunaan |
|---|---|
| Tailwind CSS 4.x | CSS berbasis utilitas |
| Alpine.js | JS ringan (via Filament) |
| Vite | Bundler aset |
| Blade | Template engine |
Tampilan atau JavaScript tidak termuat
npm run buildAtau jalankan npm run dev bersamaan dengan php artisan serve saat pengembangan.
Error permission pada storage
chmod -R 775 storage bootstrap/cache
php artisan storage:link
php artisan config:clear && php artisan cache:clearMasalah database
php artisan migrate:fresh --seedPastikan nilai DB_* di .env sudah benar dan database sudah dibuat.
Halaman tidak muncul di sidebar panel admin
Jika halaman dapat diakses tetapi tidak muncul di sidebar, kemungkinan ada ketidakcocokan izin (permission). Hubungi super_admin untuk memeriksa penetapan peran pengguna Anda.
- Fork repositori ini
- Buat branch baru:
git checkout -b feature/fitur-saya - Ikuti konvensi dan pola kode yang sudah ada
- Tambahkan pengujian untuk fungsionalitas baru
- Jalankan pemeriksaan kualitas:
composer run lint && composer run stan && composer run test - Commit dengan pesan yang jelas mengikuti Conventional Commits
- Buat Pull Request
Dilisensikan di bawah Lisensi MIT. Bebas digunakan, dimodifikasi, dan didistribusikan.
⭐ Beri bintang proyek ini jika bermanfaat!
Dibuat dengan ❤️ untuk komunitas kafe dan restoran