Compare commits

..

No commits in common. "b44eb2cdc300ae080268b2486e98e3a73f743a1e" and "d442e2e691b914f8255d94abc61a4bb387cb8bbb" have entirely different histories.

8 changed files with 77 additions and 265 deletions

View File

@ -1,82 +1,10 @@
# ======================================== node_modules
# Docker Ignore File vendor
# ======================================== .env
Dockerfile
# Git docker-compose.yml
.git .git
.gitignore .gitignore
.gitattributes tests
# Documentation
README.md
CHANGELOG.md
Documentation/
*.md
# Tests
tests/
phpunit.xml
.phpunit.cache
.phpunit.result.cache
# IDE & Editors
.vscode/
.idea/
.fleet/
.nova/
.zed/
*.swp
*.swo
*~
.DS_Store
Thumbs.db
.phpactor.json
# Docker files (tidak perlu di-copy ke image)
Dockerfile
docker-compose*.yml
.dockerignore
# Environment files (akan di-set via environment variables)
.env
.env.*
!.env.example
# Dependencies (akan di-install via composer & npm)
/vendor/
/node_modules/
# Build artifacts (akan di-build di stage terpisah)
/public/hot
/public/build
# Storage & Cache (akan di-mount sebagai volume)
/storage/*.key
/storage/logs/*
/storage/framework/cache/*
/storage/framework/sessions/*
/storage/framework/views/*
/storage/pail
# Generated files
/public/storage
/bootstrap/cache/*
# Local development files
Homestead.json
Homestead.yaml
auth.json
.vagrant
.phpstorm.meta.php
_ide_helper.php
# Logs
*.log *.log
npm-debug.log* storage/logs/*
yarn-debug.log*
yarn-error.log*
# OS Files
.DS_Store
Thumbs.db
desktop.ini

View File

@ -1,86 +0,0 @@
# ========================================
# Abbauf Kasir - Docker Environment Configuration
# ========================================
# Copy file ini ke .env sebelum deployment
# Ganti semua placeholder dengan nilai yang sesuai
# Application
APP_NAME=Abbauf-Kasir
APP_ENV=production
APP_KEY= # Generate dengan: php artisan key:generate
APP_DEBUG=false
APP_URL=http://localhost # Ganti dengan domain production
APP_LOCALE=id
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=id_ID
APP_MAINTENANCE_DRIVER=file
PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
# Logging
LOG_CHANNEL=stack
LOG_STACK=daily
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=error
# Database Configuration
DB_CONNECTION=mysql
DB_HOST=mysql # Nama service di docker-compose
DB_PORT=3306
DB_DATABASE=kasir_db # Nama database
DB_USERNAME=kasir_user # Username database
DB_PASSWORD=strong_password_here # GANTI dengan password kuat!
# MySQL Root Password (untuk docker-compose)
MYSQL_ROOT_PASSWORD=root_strong_password # GANTI dengan password root yang kuat!
# Cache & Session
CACHE_STORE=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
# Redis Configuration
REDIS_CLIENT=phpredis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
# Queue
QUEUE_CONNECTION=redis
# Broadcasting
BROADCAST_CONNECTION=log
# Filesystem
FILESYSTEM_DISK=local
# Mail Configuration (opsional)
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="noreply@abbauf-kasir.local"
MAIL_FROM_NAME="${APP_NAME}"
# AWS (jika menggunakan S3 untuk storage)
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
# Ports (untuk docker-compose)
APP_PORT=80 # Port untuk akses aplikasi
# DB_PORT=3306 # Uncomment jika ingin expose DB port
# REDIS_PORT=6379 # Uncomment jika ingin expose Redis port
# Vite
VITE_APP_NAME="${APP_NAME}"

View File

@ -1,7 +1,7 @@
APP_NAME=Abbauf-Kasir APP_NAME=Abbauf-Kasir
APP_ENV=local APP_ENV=production
APP_KEY= APP_KEY=
APP_DEBUG=true APP_DEBUG=false
APP_URL=http://localhost APP_URL=http://localhost
APP_LOCALE=en APP_LOCALE=en

5
.gitignore vendored
View File

@ -22,8 +22,3 @@
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
Thumbs.db Thumbs.db
# Docker - Database Backups (exclude backups from git)
/docker/mysql/backups/*.sql
/docker/mysql/backups/*.sql.gz
!/docker/mysql/backups/README.md

View File

@ -1,6 +1,6 @@
# 💎 Aplikasi Kasir Toko Perhiasan # 💎 Aplikasi Kasir Toko Perhiasan
Aplikasi kasir modern berbasis web untuk toko perhiasan dengan sistem manajemen yang lengkap dan antarmuka yang user-friendly. Dibuat khusus sesuai kebutuhan Toko Emas Jakarta Citayam. Aplikasi kasir modern berbasis web untuk toko perhiasan dengan sistem manajemen yang lengkap dan antarmuka yang user-friendly.
## 👥 Tim Development ## 👥 Tim Development
@ -15,7 +15,7 @@ Aplikasi kasir modern berbasis web untuk toko perhiasan dengan sistem manajemen
## 🚀 Tentang Aplikasi ## 🚀 Tentang Aplikasi
Semuah sistem Point of Sale (POS) yang dirancang khusus untuk kebutuhan toko perhiasan dengan fitur manajemen yang komprehensif dan sistem role-based access control. Aplikasi Kasir Toko Perhiasan adalah sistem Point of Sale (POS) yang dirancang khusus untuk kebutuhan toko perhiasan dengan fitur manajemen yang komprehensif dan sistem role-based access control.
### ✨ Fitur Utama ### ✨ Fitur Utama
@ -38,7 +38,7 @@ Semuah sistem Point of Sale (POS) yang dirancang khusus untuk kebutuhan toko per
- **Backend**: Laravel 11.x - **Backend**: Laravel 11.x
- **Frontend**: Vue.js 3 + Vue Router - **Frontend**: Vue.js 3 + Vue Router
- **Database**: MySQL - **Database**: MySQL/PostgreSQL
- **Styling**: Tailwind CSS - **Styling**: Tailwind CSS
- **Build Tool**: Vite - **Build Tool**: Vite
- **Authentication**: Laravel Sanctum - **Authentication**: Laravel Sanctum
@ -48,25 +48,18 @@ Semuah sistem Point of Sale (POS) yang dirancang khusus untuk kebutuhan toko per
## 📋 Prerequisites ## 📋 Prerequisites
### Opsi 1: Docker (Recommended) 🐳 Pastikan sistem Anda sudah memiliki:
- **Docker Desktop** (Windows/Mac) atau **Docker Engine** (Linux) - **PHP** >= 8.1
- **Docker Compose** v2.0+ - **Composer** >= 2.0
- **Git** - **Node.js** >= 16.x
- **NPM** atau **Yarn**
### Opsi 2: Manual Installation - **MySQL** >= 8.0 atau **PostgreSQL** >= 13
- **PHP** 8.2+
- **Composer**
- **Node.js** 18+
- **NPM**
- **MySQL** 8.0+
- **Redis** (optional)
- **Git** - **Git**
--- ---
## Installation ## 🔧 Instalasi
### 1. Clone Repository ### 1. Clone Repository
@ -97,30 +90,33 @@ npm install
### 4. Konfigurasi Database ### 4. Konfigurasi Database
Edit file `.env` sesuai dengan konfigurasi database: Edit file `.env` sesuai dengan konfigurasi database Anda:
```env ```env
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3306 DB_PORT=3306
DB_DATABASE=toko_emas DB_DATABASE=kasir_perhiasan
DB_USERNAME=root DB_USERNAME=your_username
DB_PASSWORD= DB_PASSWORD=your_password
``` ```
---
### 5. Setup Database ### 5. Setup Database
```bash ```bash
# Jalankan migrasi
php artisan migrate php artisan migrate
```
```bash # Jalankan seeder (data dummy)
php artisan db:seed php artisan db:seed
``` ```
### 6. Storage Link ### 6. Storage Link
```bash ```bash
# Buat symbolic link untuk storage
php artisan storage:link php artisan storage:link
``` ```
@ -129,21 +125,22 @@ php artisan storage:link
#### Development Mode #### Development Mode
```bash ```bash
# Terminal 1 - Laravel Server
php artisan serve
# Terminal 2 - Vite Dev Server
npm run dev npm run dev
``` ```
#### Production Mode #### Production Mode
```bash ```bash
# Pastikan env production sudah tersedia # Build untuk production
docker compose --env-file .env.production up -d --build npm run build
# Siapkan database # Jalankan dengan web server (Apache/Nginx)
docker exec -it abbauf_kasir_app php artisan migrate --seed # atau gunakan PHP built-in server
php artisan serve --host=0.0.0.0 --port=8000
# Periksa database (opsional)
docker exec -it abbauf_kasir_db bash
mysql -u root -p
``` ```
### 8. Print Label ### 8. Print Label
@ -164,18 +161,19 @@ mysql -u root -p
Setelah instalasi berhasil, akses aplikasi melalui: Setelah instalasi berhasil, akses aplikasi melalui:
- **URL**: http://localhost:8000 - **URL**: http://localhost:8000
- **Admin Panel**: http://localhost:8000/admin (jika tersedia)
### 👤 Default Login ### 👤 Default Login
**Owner Account:** **Owner Account:**
- Username: `admin` - Email: `owner@tokoperhiasan.com`
- Password: `123123` - Password: `password123`
**Kasir Account:** **Kasir Account:**
- Username: `kasir` - Email: `kasir@tokoperhiasan.com`
- Password: `123123` - Password: `password123`
--- ---

View File

@ -5,6 +5,7 @@ namespace Database\Seeders;
use App\Models\Kategori; use App\Models\Kategori;
use App\Models\Nampan; use App\Models\Nampan;
use App\Models\Produk; use App\Models\Produk;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class DataSeeder extends Seeder class DataSeeder extends Seeder
@ -15,60 +16,47 @@ class DataSeeder extends Seeder
public function run(): void public function run(): void
{ {
// Nampan // Nampan
for ($i = 0; $i < 30; $i++) { for ($i=0; $i < 30; $i++) {
if ($i != 12) { if ($i != 12) {
Nampan::create([ Nampan::factory()->create([
'nama' => 'A' . ($i + 1), 'nama' => 'A' . ($i + 1)
'created_at' => now(),
'updated_at' => now(),
]); ]);
} }
} }
// Kategori // Kategori
$kategoriList = ['Cincin', 'Gelang Rantai', 'Gelang Bulat', 'Kalung', 'Liontin', 'Anting', 'Giwang']; $kategoriList = ['Cincin', 'Gelang Rantai', 'Gelang Bulat', 'Kalung', 'Liontin', 'Anting', 'Giwang'];
foreach ($kategoriList as $index => $kategori) { foreach ($kategoriList as $kategori) {
Kategori::create([ Kategori::factory()->create([
'nama' => $kategori, 'nama' => $kategori
'created_at' => now(),
'updated_at' => now(),
]); ]);
} }
// Produk 1 // Produk
$produk1 = Produk::create([ $produk1 = Produk::factory()->create([
'nama' => 'Gelang serut daun shimmer mp (mas putih)', 'nama'=>'Gelang serut daun shimmer mp (mas putih)',
'id_kategori' => Kategori::where('nama', 'Gelang Rantai')->first()->id, 'id_kategori'=>Kategori::find(2),
'berat' => 1.4, 'berat'=>1.4,
'kadar' => 8, 'kadar'=>8,
'harga_per_gram' => 900000, 'harga_per_gram'=>900000,
'harga_jual' => 1260000, 'harga_jual'=>1260000,
'created_at' => now(),
'updated_at' => now(),
]); ]);
$produk1->foto()->create([ $produk1->foto()->create([
'id_produk' => $produk1->id, 'id_produk'=>$produk1->id,
'url' => 'https://i.imgur.com/eGYHzvw.jpeg', 'url'=>'https://i.imgur.com/eGYHzvw.jpeg'
'created_at' => now(),
'updated_at' => now(),
]); ]);
// Produk 2 $produk2 = Produk::factory()->create([
$produk2 = Produk::create([ 'nama'=>'Gelang rantai 5 buah clover merah',
'nama' => 'Gelang rantai 5 buah clover merah', 'id_kategori'=>Kategori::find(2),
'id_kategori' => Kategori::where('nama', 'Gelang Rantai')->first()->id, 'berat'=>3.6,
'berat' => 3.6, 'kadar'=>8,
'kadar' => 8, 'harga_per_gram'=>850000,
'harga_per_gram' => 850000, 'harga_jual'=>3060000,
'harga_jual' => 3060000,
'created_at' => now(),
'updated_at' => now(),
]); ]);
$produk2->foto()->create([ $produk2->foto()->create([
'id_produk' => $produk2->id, 'id_produk'=>$produk2->id,
'url' => 'https://i.imgur.com/UjQzYoE.jpeg', 'url'=>'https://i.imgur.com/UjQzYoE.jpeg'
'created_at' => now(),
'updated_at' => now(),
]); ]);
} }
} }

View File

@ -9,8 +9,8 @@ use App\Models\Produk;
use App\Models\Sales; use App\Models\Sales;
use App\Models\Transaksi; use App\Models\Transaksi;
use App\Models\User; use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {
@ -19,35 +19,24 @@ class DatabaseSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
// Create admin user User::factory()->create([
User::create([
'nama' => 'admin', 'nama' => 'admin',
'role' => 'owner', 'role' => 'owner',
'password' => Hash::make('123123'), 'password' => bcrypt('123123'),
'created_at' => now(),
'updated_at' => now(),
]); ]);
User::factory()->create([
// Create kasir user
User::create([
'nama' => 'kasir', 'nama' => 'kasir',
'role' => 'kasir', 'role' => 'kasir',
'password' => Hash::make('123123'), 'password' => bcrypt('123123'),
'created_at' => now(),
'updated_at' => now(),
]); ]);
// Create sales record Sales::factory()->create([
Sales::create([
'nama' => 'Kasir', 'nama' => 'Kasir',
'no_hp' => '-', 'no_hp' => '-',
'alamat' => '-', 'alamat' => '-',
'created_at' => now(),
'updated_at' => now(),
]); ]);
// Call other seeders
$this->call(DataSeeder::class); $this->call(DataSeeder::class);
$this->call(DummySeeder::class); $this->call(DummySeeder::class);
} }
} }

View File

@ -106,7 +106,7 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
# command: --default-authentication-plugin=mysql_native_password command: --default-authentication-plugin=mysql_native_password
# ======================================== # ========================================
# Redis Cache & Session Store # Redis Cache & Session Store