{"id":50771925,"url":"https://github.com/nirwanadoteth/cafe-pos","last_synced_at":"2026-06-11T19:33:47.841Z","repository":{"id":266684605,"uuid":"894032495","full_name":"nirwanadoteth/cafe-pos","owner":"nirwanadoteth","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-23T23:52:20.000Z","size":47032,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-24T00:11:02.968Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nirwanadoteth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-11-25T16:23:06.000Z","updated_at":"2026-02-23T23:52:24.000Z","dependencies_parsed_at":"2024-12-05T15:21:00.928Z","dependency_job_id":"4731e735-e2ed-4ea3-88e0-0f7605b16bc4","html_url":"https://github.com/nirwanadoteth/cafe-pos","commit_stats":null,"previous_names":["10122222/cafe-pos","nirwanadoteth/cafe-pos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nirwanadoteth/cafe-pos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirwanadoteth%2Fcafe-pos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirwanadoteth%2Fcafe-pos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirwanadoteth%2Fcafe-pos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirwanadoteth%2Fcafe-pos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirwanadoteth","download_url":"https://codeload.github.com/nirwanadoteth/cafe-pos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirwanadoteth%2Fcafe-pos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34215253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-11T19:33:46.856Z","updated_at":"2026-06-11T19:33:47.831Z","avatar_url":"https://github.com/nirwanadoteth.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cafe POS System\n\n[![Build Status](https://img.shields.io/badge/build-passing-brightgreen?style=flat-square)](https://github.com/nirwanadoteth/cafe-pos)\n[![PHP Version](https://img.shields.io/badge/PHP-8.2+-777bb4?style=flat-square\u0026logo=php\u0026logoColor=white)](https://php.net)\n[![Laravel](https://img.shields.io/badge/Laravel-12.x-ff2d20?style=flat-square\u0026logo=laravel\u0026logoColor=white)](https://laravel.com)\n[![Filament](https://img.shields.io/badge/Filament-5.x-f59e0b?style=flat-square)](https://filamentphp.com)\n[![License](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)\n\n\u003e A modern, feature-rich point-of-sale system built with Laravel and Filament for cafes and restaurants.\n\n**🌐 Language / Bahasa:** **[English](#english)** • **[Indonesia](#bahasa-indonesia)**\n\n---\n\n\u003ca name=\"english\"\u003e\u003c/a\u003e\n\n# 🇬🇧 English\n\n**[Overview](#overview)** • **[Features](#features)** • **[Getting Started](#getting-started)** • **[Installation](#installation)** • **[Usage](#usage)** • **[Development](#development)**\n\n---\n\n## Overview\n\nThe 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.\n\nThis 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.\n\n\u003e [!TIP]\n\u003e **Quick Start**: You can have the system running locally in under 5 minutes using SQLite (no database setup required).\n\n## Features\n\n- **📊 Real-time Dashboard** — Live revenue, order, and customer statistics with trend comparison\n- **🛒 Order Management** — Complete order lifecycle: New → Processing → Completed / Cancelled\n- **📝 Product Catalog** — Product and category management with image support and stock tracking\n- **👥 Customer Tracking** — Customer profiles linked to order history\n- **💰 Payment Processing** — Cash, Card, E-Wallet, and Bank Transfer with status tracking\n- **📈 Sales \u0026 Product Reports** — Analytics filtered by custom date ranges\n- **🔐 Role-based Access Control** — `super_admin`, `kasir`, and `inventaris` roles with granular permissions\n- **📱 Responsive Design** — Works on desktop, tablet, and mobile\n- **🌐 Internationalization** — Translation-ready with `resources/lang` structure\n- **⚡ Inventory Tracking** — Automatic stock deduction and restoration on order status changes\n- **🩺 System Health Monitoring** — Built-in health checks for database, cache, queue, and disk\n- **📤 Import / Export** — Bulk CSV import and export for products and categories\n\n### Dashboard\n\n- Revenue tracking with period-over-period trend analysis\n- New customers and new orders counters\n- Latest orders table\n- Orders and customers growth charts\n\n### Order Management\n\n- Intuitive order creation with inline product selector\n- Real-time stock validation (prevents overselling)\n- Status tabs with live badge counts (New, Processing, Completed, Cancelled)\n- Payment recording per order (method + status + reference number)\n\n### Reporting\n\n- **Sales Reports** — Min, Max, Sum, Avg revenue grouped by date\n- **Product Reports** — Per-product ordered quantity and revenue, with best/least-seller summary\n\n## Getting Started\n\nThere are multiple ways to get started with this project, depending on your preference and environment.\n\n### Prerequisites\n\n- **PHP 8.2+** with extensions: `pdo`, `mbstring`, `json`, `openssl`, `tokenizer`, `xml`, `ctype`, `fileinfo`, `gd`\n- **Composer** — PHP dependency manager\n- **Node.js 20+** and **NPM** — frontend asset compilation\n- **Database** — SQLite (recommended for development) or MySQL 5.7+\n\n### Quick Start with SQLite\n\nThe fastest way to get started is using SQLite, which requires no additional database setup:\n\n```bash\n# Clone the repository\ngit clone https://github.com/nirwanadoteth/cafe-pos.git\ncd cafe-pos\n\n# Install dependencies\ncomposer install\nnpm install\n\n# Environment setup\ncp .env.example .env\nphp artisan key:generate\nphp artisan storage:link\n\n# Database setup (SQLite)\nphp artisan migrate --seed\n\n# Build frontend assets\nnpm run build\n\n# Start the development server\ncomposer run dev\n```\n\nThe application will be available at `http://localhost:8000`.\n\n\u003e [!NOTE]\n\u003e The `composer run dev` command starts multiple services concurrently: the Laravel server, queue worker, log monitoring, and Vite for frontend assets.\n\n### Alternative Setup with MySQL\n\nIf you prefer to use MySQL for development or production:\n\n1. Create a MySQL database\n2. Update your `.env` file:\n\n   ```env\n   DB_CONNECTION=mysql\n   DB_HOST=127.0.0.1\n   DB_PORT=3306\n   DB_DATABASE=cafe_pos\n   DB_USERNAME=your_username\n   DB_PASSWORD=your_password\n   ```\n\n3. Run migrations: `php artisan migrate --seed`\n\n## Installation\n\n### Development Environment\n\nFor local development, follow these detailed steps:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e1. Clone and Setup\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Clone the repository\ngit clone https://github.com/nirwanadoteth/cafe-pos.git\ncd cafe-pos\n\n# Install PHP dependencies\ncomposer install\n\n# Install Node.js dependencies  \nnpm install\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e2. Environment Configuration\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Copy environment file\ncp .env.example .env\n\n# Generate application key\nphp artisan key:generate\n\n# Create storage symlink\nphp artisan storage:link\n```\n\nEdit your `.env` file to configure:\n\n- Database connection (SQLite recommended for development)\n- Mail settings (optional)\n- Queue configuration (sync for development)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e3. Database Setup\u003c/strong\u003e\u003c/summary\u003e\n\n**Option A: SQLite (Recommended)**\n\n```bash\n# Database will be created automatically\nphp artisan migrate --seed\n```\n\n**Option B: MySQL**\n\n```bash\n# Create database first, then:\nphp artisan migrate --seed\n```\n\nThe seeder will create sample data including products, categories, and an admin user.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e4. Admin User Setup\u003c/strong\u003e\u003c/summary\u003e\n\nCreate a secure admin user:\n\n```bash\nphp artisan db:seed --class=AdminUserSeeder\n```\n\nYou'll be prompted to enter:\n\n- Admin email address\n- Full name\n- Secure password (12+ characters)\n\nThe user will be assigned the `super_admin` role with full system access.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e5. Start Development\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Start all development services\ncomposer run dev\n```\n\nThis command starts:\n\n- Laravel development server (`localhost:8000`)\n- Queue worker for background jobs\n- Log monitoring\n- Vite for frontend asset compilation\n\n\u003c/details\u003e\n\n### Production Deployment\n\nFor production deployment, additional steps are required:\n\n1. **Environment**: Set `APP_ENV=production` and `APP_DEBUG=false`\n2. **Database**: Use MySQL/PostgreSQL with proper indexing\n3. **Cache**: Configure Redis for cache and sessions\n4. **Queue**: Set up queue workers with Supervisor\n5. **Web Server**: Configure Nginx/Apache with proper security headers\n6. **SSL**: Enable HTTPS with valid certificates\n\nRefer to the [Laravel deployment documentation](https://laravel.com/docs/12.x/deployment) for detailed production setup.\n\n## Usage\n\n### Accessing the Admin Panel\n\nNavigate to `/admin` and log in with your credentials.\n\n### User Roles\n\n| Role | Access |\n|------|--------|\n| `super_admin` | Full access to all features |\n| `kasir` | Create and manage orders, record payments |\n| `inventaris` | Manage products and categories (import/export) |\n\n### Typical Cashier Workflow\n\n1. Open **Orders → New Order**\n2. Select or create a customer\n3. Adjust product quantities in the order form\n4. Save the order — status defaults to **New**\n5. Update status to **Processing** when preparing\n6. Record payment method and mark as **Completed**\n\n### Managing the Catalog\n\n- Go to **Catalog → Categories** and create categories first\n- Go to **Catalog → Products** and add products with price, stock, and image\n- Toggle **Visible** to control what appears on the public menu page\n\n### Viewing Reports\n\n- Go to **Reports → Sales Reports** for revenue analysis\n- Go to **Reports → Product Reports** for best-selling products\n- Use the **Date Range** filter to narrow results\n\n## Development\n\n### Project Structure\n\nThe project follows Laravel's conventional structure with additional organization:\n\n```\napp/\n├── Filament/\n│   ├── Resources/      # CRUD panels (Orders, Products, Categories, Users, Roles)\n│   ├── Clusters/       # Grouped pages (Reports)\n│   ├── Widgets/        # Dashboard widgets\n│   └── Pages/          # Custom pages (Dashboard, Welcome, HealthCheckResults)\n├── Livewire/           # Interactive components (public product list, reports tables)\n├── Services/           # Business logic (InventoryService, StatsOverviewCalculator, …)\n├── Models/             # Eloquent models\n├── Enums/              # OrderStatus, PaymentMethod, PaymentStatus\n└── Helpers/            # Utility functions\n\nresources/\n├── views/              # Blade templates\n├── lang/en/            # English translations\n└── css/, js/           # Frontend source files\n```\n\n### Composer Scripts\n\n```bash\ncomposer run dev        # Start dev environment (server + queue + vite)\ncomposer run test       # Run PHPUnit test suite\ncomposer run lint       # Fix code style with Laravel Pint\ncomposer run stan       # Static analysis with PHPStan (level 8)\ncomposer run cs         # Pint + Prettier formatting\n```\n\n### Code Quality\n\n| Tool | Purpose |\n|------|---------|\n| **Laravel Pint** | PSR-12 code formatting |\n| **PHPStan Level 8** | Static type analysis |\n| **PHPUnit 11** | Feature and unit tests |\n\n### Running Tests\n\n```bash\n# Full test suite\nphp artisan test --compact\n\n# Single file\nphp artisan test --compact tests/Feature/InventoryTrackingTest.php\n\n# Filtered by name\nphp artisan test --compact --filter=testStockDecreases\n```\n\n## Technology Stack\n\n### Backend\n\n| Package | Version | Purpose |\n|---------|---------|--------|\n| Laravel Framework | 12.x | Application backbone |\n| Filament | 5.x | Admin panel |\n| PHP | 8.2+ | Language runtime |\n| Livewire | 4.x | Full-stack interactivity |\n| Spatie Permission | — | Role \u0026 permission system |\n| barryvdh/laravel-dompdf | 3.x | PDF invoice generation |\n| bezhansalleh/filament-shield | 4.x | Shield permission integration |\n| flowframe/laravel-trend | 0.4 | Chart trend data |\n| shuvroroy/filament-spatie-laravel-health | 3.x | Health monitoring |\n\n### Frontend\n\n| Tool | Purpose |\n|------|---------|\n| Tailwind CSS 4.x | Utility-first CSS |\n| Alpine.js | Lightweight JS (via Filament) |\n| Vite | Asset bundler |\n| Blade | Templating engine |\n\n## Troubleshooting\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eStyles or JavaScript not loading\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nnpm run build\n```\n\nOr run `npm run dev` alongside `php artisan serve` during development.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eStorage / permission errors\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nchmod -R 775 storage bootstrap/cache\nphp artisan storage:link\nphp artisan config:clear \u0026\u0026 php artisan cache:clear\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDatabase issues\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nphp artisan migrate:fresh --seed\n```\n\nEnsure `DB_*` values in `.env` are correct and the database exists.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePage not found in admin panel\u003c/strong\u003e\u003c/summary\u003e\n\nIf a page is accessible but not visible in the sidebar, it may be a permission mismatch. Contact your `super_admin` to check role assignments.\n\n\u003c/details\u003e\n\n## Contributing\n\n1. **Fork** the repository\n2. **Create** a branch: `git checkout -b feature/my-feature`\n3. **Follow** existing code conventions and patterns\n4. **Add** tests for new functionality\n5. **Run** quality checks: `composer run lint \u0026\u0026 composer run stan \u0026\u0026 composer run test`\n6. **Commit** with clear messages following Conventional Commits\n7. **Open** a Pull Request\n\n## License\n\nThis project is open-source software licensed under the [MIT License](LICENSE). You are free to use, modify, and distribute this software in accordance with the license terms.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[⭐ Star this project](https://github.com/nirwanadoteth/cafe-pos)** if you find it useful!\n\nMade with ❤️ for the cafe and restaurant community\n\n\u003c/div\u003e\n\n---\n\n\u003ca name=\"bahasa-indonesia\"\u003e\u003c/a\u003e\n\n# 🇮🇩 Bahasa Indonesia\n\n**[Gambaran Umum](#gambaran-umum)** • **[Fitur](#fitur)** • **[Memulai](#memulai)** • **[Instalasi](#instalasi)** • **[Penggunaan](#penggunaan)** • **[Pengembangan](#pengembangan)**\n\n---\n\n## Gambaran Umum\n\nCafe 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.\n\nAplikasi 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.\n\n\u003e [!TIP]\n\u003e **Mulai Cepat**: Sistem dapat dijalankan secara lokal dalam waktu kurang dari 5 menit menggunakan SQLite — tidak perlu konfigurasi database tambahan.\n\n## Fitur\n\n- **📊 Dasbor Real-time** — Statistik pendapatan, pesanan, dan pelanggan dengan perbandingan tren periode\n- **🛒 Manajemen Pesanan** — Siklus pesanan lengkap: Baru → Diproses → Selesai / Dibatalkan\n- **📝 Katalog Produk** — Manajemen produk dan kategori dengan dukungan gambar dan pelacakan stok\n- **👥 Data Pelanggan** — Profil pelanggan yang terhubung dengan riwayat pesanan\n- **💰 Pencatatan Pembayaran** — Tunai, Kartu, E-Wallet, dan Transfer Bank beserta status pembayaran\n- **📈 Laporan Penjualan \u0026 Produk** — Analitik dengan filter rentang tanggal kustom\n- **🔐 Kontrol Akses Berbasis Peran** — Peran `super_admin`, `kasir`, dan `inventaris` dengan izin granular\n- **📱 Desain Responsif** — Berfungsi di komputer, tablet, dan ponsel\n- **🌐 Siap Multibahasa** — Struktur terjemahan menggunakan `resources/lang`\n- **⚡ Pelacakan Inventaris** — Pengurang dan pemulihan stok otomatis saat status pesanan berubah\n- **🩺 Pemantauan Kesehatan Sistem** — Pengecekan database, cache, antrian, dan disk\n- **📤 Impor / Ekspor** — Impor dan ekspor CSV massal untuk produk dan kategori\n\n### Dasbor\n\n- Pelacakan pendapatan dengan analisis tren periode ke periode\n- Penghitung pelanggan baru dan pesanan baru\n- Tabel pesanan terbaru\n- Grafik pertumbuhan pesanan dan pelanggan\n\n### Manajemen Pesanan\n\n- Antarmuka pembuatan pesanan dengan pemilih produk langsung\n- Validasi stok real-time (mencegah kelebihan penjualan)\n- Tab status dengan jumlah badge langsung (Baru, Diproses, Selesai, Dibatalkan)\n- Pencatatan pembayaran per pesanan (metode + status + nomor referensi)\n\n### Laporan\n\n- **Laporan Penjualan** — Min, Max, Jumlah, Rata-rata pendapatan dikelompokkan per tanggal\n- **Laporan Produk** — Jumlah terjual dan pendapatan per produk, dengan ringkasan produk terlaris / paling sedikit terjual\n\n## Memulai\n\n### Prasyarat\n\n- **PHP 8.2+** dengan ekstensi: `pdo`, `mbstring`, `json`, `openssl`, `tokenizer`, `xml`, `ctype`, `fileinfo`, `gd`\n- **Composer** — pengelola dependensi PHP\n- **Node.js 20+** dan **NPM** — kompilasi aset frontend\n- **Database** — SQLite (disarankan untuk pengembangan) atau MySQL 5.7+\n\n### Mulai Cepat dengan SQLite\n\n```bash\n# 1. Clone repositori\ngit clone https://github.com/nirwanadoteth/cafe-pos.git\ncd cafe-pos\n\n# 2. Instal dependensi\ncomposer install\nnpm install\n\n# 3. Konfigurasi environment\ncp .env.example .env\nphp artisan key:generate\nphp artisan storage:link\n\n# 4. Setup database (SQLite — dibuat otomatis)\nphp artisan migrate --seed\n\n# 5. Build aset frontend\nnpm run build\n\n# 6. Jalankan server pengembangan\ncomposer run dev\n```\n\nBuka **\u003chttp://localhost:8000\u003e** di browser Anda.\n\n\u003e [!NOTE]\n\u003e `composer run dev` menjalankan server Laravel, queue worker, dan Vite secara bersamaan.\n\n### Setup dengan MySQL\n\n1. Buat database MySQL (contoh: `cafe_pos`)\n2. Perbarui file `.env`:\n\n```env\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=cafe_pos\nDB_USERNAME=username_anda\nDB_PASSWORD=password_anda\n```\n\n1. Jalankan migrasi: `php artisan migrate --seed`\n\n## Instalasi\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLangkah 1 — Clone dan Instal Dependensi\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/nirwanadoteth/cafe-pos.git\ncd cafe-pos\ncomposer install\nnpm install\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLangkah 2 — Konfigurasi Environment\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\ncp .env.example .env\nphp artisan key:generate\nphp artisan storage:link\n```\n\nPengaturan `.env` penting yang perlu diperiksa:\n\n- `APP_URL` — atur ke domain Anda di produksi\n- `DB_CONNECTION` — `sqlite` atau `mysql`\n- `QUEUE_CONNECTION` — `sync` untuk pengembangan, `database` atau `redis` untuk produksi\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLangkah 3 — Setup Database\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Menjalankan migrasi dan mengisi data contoh (produk, kategori, pengguna)\nphp artisan migrate --seed\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLangkah 4 — Buat Pengguna Admin\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nphp artisan db:seed --class=AdminUserSeeder\n```\n\nAnda akan diminta memasukkan:\n\n- Alamat email admin\n- Nama lengkap\n- Kata sandi yang kuat (minimal 12 karakter)\n\nPengguna akan diberikan peran `super_admin` dengan akses penuh ke seluruh sistem.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLangkah 5 — Mulai Pengembangan\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\ncomposer run dev\n```\n\nMenjalankan secara bersamaan:\n\n- Server Laravel (`localhost:8000`)\n- Queue worker\n- Vite untuk hot-reload aset frontend\n\n\u003c/details\u003e\n\n### Deployment Produksi\n\n1. Atur `APP_ENV=production` dan `APP_DEBUG=false`\n2. Gunakan MySQL dengan indeks yang tepat\n3. Konfigurasi Redis untuk cache dan sesi\n4. Pasang Supervisor untuk queue worker\n5. Gunakan Nginx atau Apache dengan HTTPS\n\nLihat [dokumentasi deployment Laravel](https://laravel.com/docs/12.x/deployment) untuk panduan lengkap.\n\n## Penggunaan\n\n### Mengakses Panel Admin\n\nBuka `/admin` dan masuk menggunakan kredensial Anda.\n\n### Peran Pengguna\n\n| Peran | Akses |\n|-------|-------|\n| `super_admin` | Akses penuh ke semua fitur |\n| `kasir` | Membuat dan mengelola pesanan, mencatat pembayaran |\n| `inventaris` | Mengelola produk dan kategori (impor/ekspor) |\n\n### Alur Kerja Kasir\n\n1. Buka **Pesanan → Pesanan Baru**\n2. Pilih atau buat pelanggan baru\n3. Atur jumlah produk di formulir pesanan\n4. Simpan pesanan — status awal: **Baru**\n5. Ubah status ke **Diproses** saat pesanan sedang disiapkan\n6. Catat metode pembayaran dan tandai sebagai **Selesai**\n\n### Mengelola Katalog\n\n- Buka **Katalog → Kategori** dan buat kategori terlebih dahulu\n- Buka **Katalog → Produk** dan tambahkan produk dengan harga, stok, dan gambar\n- Aktifkan toggle **Visible** untuk mengatur produk yang tampil di halaman menu publik\n\n### Melihat Laporan\n\n- Buka **Laporan → Laporan Penjualan** untuk analisis pendapatan\n- Buka **Laporan → Laporan Produk** untuk melihat produk terlaris\n- Gunakan filter **Rentang Tanggal** untuk mempersempit hasil\n\n## Pengembangan\n\n### Struktur Proyek\n\n```\napp/\n├── Filament/\n│   ├── Resources/      # Panel CRUD (Pesanan, Produk, Kategori, Pengguna, Peran)\n│   ├── Clusters/       # Halaman terkelompok (Laporan)\n│   ├── Widgets/        # Widget dasbor\n│   └── Pages/          # Halaman kustom (Dashboard, Welcome, HealthCheckResults)\n├── Livewire/           # Komponen interaktif (daftar produk publik, tabel laporan)\n├── Services/           # Logika bisnis (InventoryService, StatsOverviewCalculator, …)\n├── Models/             # Model Eloquent\n├── Enums/              # OrderStatus, PaymentMethod, PaymentStatus\n└── Helpers/            # Fungsi utilitas\n\nresources/\n├── views/              # Template Blade\n├── lang/en/            # Terjemahan bahasa Inggris\n└── css/, js/           # File sumber frontend\n```\n\n### Skrip Composer\n\n```bash\ncomposer run dev        # Jalankan lingkungan pengembangan (server + queue + vite)\ncomposer run test       # Jalankan suite pengujian PHPUnit\ncomposer run lint       # Perbaiki gaya kode dengan Laravel Pint\ncomposer run stan       # Analisis statis dengan PHPStan (level 8)\ncomposer run cs         # Format dengan Pint + Prettier\n```\n\n### Standar Kualitas Kode\n\n| Alat | Kegunaan |\n|------|----------|\n| **Laravel Pint** | Format kode PSR-12 |\n| **PHPStan Level 8** | Analisis tipe statis |\n| **PHPUnit 11** | Pengujian fitur dan unit |\n\n### Menjalankan Pengujian\n\n```bash\n# Semua pengujian\nphp artisan test --compact\n\n# File tertentu\nphp artisan test --compact tests/Feature/InventoryTrackingTest.php\n\n# Filter berdasarkan nama\nphp artisan test --compact --filter=testStockDecreases\n```\n\n## Teknologi yang Digunakan\n\n### Backend\n\n| Paket | Versi | Kegunaan |\n|-------|-------|----------|\n| Laravel Framework | 12.x | Kerangka aplikasi |\n| Filament | 5.x | Panel admin |\n| PHP | 8.2+ | Runtime bahasa |\n| Livewire | 4.x | Interaktivitas full-stack |\n| Spatie Permission | — | Sistem peran \u0026 izin |\n| barryvdh/laravel-dompdf | 3.x | Pembuatan PDF invoice |\n| bezhansalleh/filament-shield | 4.x | Integrasi izin Shield |\n| flowframe/laravel-trend | 0.4 | Data tren grafik |\n| shuvroroy/filament-spatie-laravel-health | 3.x | Pemantauan kesehatan sistem |\n\n### Frontend\n\n| Alat | Kegunaan |\n|------|----------|\n| Tailwind CSS 4.x | CSS berbasis utilitas |\n| Alpine.js | JS ringan (via Filament) |\n| Vite | Bundler aset |\n| Blade | Template engine |\n\n## Pemecahan Masalah\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTampilan atau JavaScript tidak termuat\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nnpm run build\n```\n\nAtau jalankan `npm run dev` bersamaan dengan `php artisan serve` saat pengembangan.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eError permission pada storage\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nchmod -R 775 storage bootstrap/cache\nphp artisan storage:link\nphp artisan config:clear \u0026\u0026 php artisan cache:clear\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eMasalah database\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nphp artisan migrate:fresh --seed\n```\n\nPastikan nilai `DB_*` di `.env` sudah benar dan database sudah dibuat.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eHalaman tidak muncul di sidebar panel admin\u003c/strong\u003e\u003c/summary\u003e\n\nJika halaman dapat diakses tetapi tidak muncul di sidebar, kemungkinan ada ketidakcocokan izin (permission). Hubungi `super_admin` untuk memeriksa penetapan peran pengguna Anda.\n\n\u003c/details\u003e\n\n## Kontribusi\n\n1. **Fork** repositori ini\n2. **Buat** branch baru: `git checkout -b feature/fitur-saya`\n3. **Ikuti** konvensi dan pola kode yang sudah ada\n4. **Tambahkan** pengujian untuk fungsionalitas baru\n5. **Jalankan** pemeriksaan kualitas: `composer run lint \u0026\u0026 composer run stan \u0026\u0026 composer run test`\n6. **Commit** dengan pesan yang jelas mengikuti Conventional Commits\n7. **Buat** Pull Request\n\n## Lisensi\n\nDilisensikan di bawah [Lisensi MIT](LICENSE). Bebas digunakan, dimodifikasi, dan didistribusikan.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[⭐ Beri bintang proyek ini](https://github.com/nirwanadoteth/cafe-pos)** jika bermanfaat!\n\nDibuat dengan ❤️ untuk komunitas kafe dan restoran\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirwanadoteth%2Fcafe-pos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirwanadoteth%2Fcafe-pos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirwanadoteth%2Fcafe-pos/lists"}