Compare commits
12 Commits
d442e2e691
...
b44eb2cdc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b44eb2cdc3 | ||
|
|
42de65fc6b | ||
|
|
0dc0cb365f | ||
|
|
06ec582ffb | ||
|
|
6a42f15822 | ||
|
|
a0100af842 | ||
|
|
065c21e07c | ||
|
|
70c1a7a0bf | ||
|
|
1d7b9e2d32 | ||
|
|
f2d77a07c3 | ||
|
|
92d30617e3 | ||
|
|
37d48c8b15 |
@ -1,10 +1,82 @@
|
||||
node_modules
|
||||
vendor
|
||||
.env
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
# ========================================
|
||||
# Docker Ignore File
|
||||
# ========================================
|
||||
|
||||
# Git
|
||||
.git
|
||||
.gitignore
|
||||
tests
|
||||
.gitattributes
|
||||
|
||||
# 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
|
||||
storage/logs/*
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# OS Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
86
.env.docker
Normal file
86
.env.docker
Normal file
@ -0,0 +1,86 @@
|
||||
# ========================================
|
||||
# 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}"
|
||||
@ -1,7 +1,7 @@
|
||||
APP_NAME=Abbauf-Kasir
|
||||
APP_ENV=production
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=false
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_LOCALE=en
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -22,3 +22,8 @@
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
Thumbs.db
|
||||
|
||||
# Docker - Database Backups (exclude backups from git)
|
||||
/docker/mysql/backups/*.sql
|
||||
/docker/mysql/backups/*.sql.gz
|
||||
!/docker/mysql/backups/README.md
|
||||
|
||||
68
README.md
68
README.md
@ -1,6 +1,6 @@
|
||||
# 💎 Aplikasi Kasir Toko Perhiasan
|
||||
|
||||
Aplikasi kasir modern berbasis web untuk toko perhiasan dengan sistem manajemen yang lengkap dan antarmuka yang user-friendly.
|
||||
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.
|
||||
|
||||
## 👥 Tim Development
|
||||
|
||||
@ -15,7 +15,7 @@ Aplikasi kasir modern berbasis web untuk toko perhiasan dengan sistem manajemen
|
||||
|
||||
## 🚀 Tentang Aplikasi
|
||||
|
||||
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.
|
||||
Semuah 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
|
||||
|
||||
@ -38,7 +38,7 @@ Aplikasi Kasir Toko Perhiasan adalah sistem Point of Sale (POS) yang dirancang k
|
||||
|
||||
- **Backend**: Laravel 11.x
|
||||
- **Frontend**: Vue.js 3 + Vue Router
|
||||
- **Database**: MySQL/PostgreSQL
|
||||
- **Database**: MySQL
|
||||
- **Styling**: Tailwind CSS
|
||||
- **Build Tool**: Vite
|
||||
- **Authentication**: Laravel Sanctum
|
||||
@ -48,18 +48,25 @@ Aplikasi Kasir Toko Perhiasan adalah sistem Point of Sale (POS) yang dirancang k
|
||||
|
||||
## 📋 Prerequisites
|
||||
|
||||
Pastikan sistem Anda sudah memiliki:
|
||||
### Opsi 1: Docker (Recommended) 🐳
|
||||
|
||||
- **PHP** >= 8.1
|
||||
- **Composer** >= 2.0
|
||||
- **Node.js** >= 16.x
|
||||
- **NPM** atau **Yarn**
|
||||
- **MySQL** >= 8.0 atau **PostgreSQL** >= 13
|
||||
- **Docker Desktop** (Windows/Mac) atau **Docker Engine** (Linux)
|
||||
- **Docker Compose** v2.0+
|
||||
- **Git**
|
||||
|
||||
### Opsi 2: Manual Installation
|
||||
|
||||
- **PHP** 8.2+
|
||||
- **Composer**
|
||||
- **Node.js** 18+
|
||||
- **NPM**
|
||||
- **MySQL** 8.0+
|
||||
- **Redis** (optional)
|
||||
- **Git**
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Instalasi
|
||||
## Installation
|
||||
|
||||
### 1. Clone Repository
|
||||
|
||||
@ -90,33 +97,30 @@ npm install
|
||||
|
||||
### 4. Konfigurasi Database
|
||||
|
||||
Edit file `.env` sesuai dengan konfigurasi database Anda:
|
||||
Edit file `.env` sesuai dengan konfigurasi database:
|
||||
|
||||
```env
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=kasir_perhiasan
|
||||
DB_USERNAME=your_username
|
||||
DB_PASSWORD=your_password
|
||||
DB_DATABASE=toko_emas
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 5. Setup Database
|
||||
|
||||
```bash
|
||||
# Jalankan migrasi
|
||||
php artisan migrate
|
||||
```
|
||||
|
||||
# Jalankan seeder (data dummy)
|
||||
```bash
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### 6. Storage Link
|
||||
|
||||
```bash
|
||||
# Buat symbolic link untuk storage
|
||||
php artisan storage:link
|
||||
```
|
||||
|
||||
@ -125,22 +129,21 @@ php artisan storage:link
|
||||
#### Development Mode
|
||||
|
||||
```bash
|
||||
# Terminal 1 - Laravel Server
|
||||
php artisan serve
|
||||
|
||||
# Terminal 2 - Vite Dev Server
|
||||
npm run dev
|
||||
```
|
||||
|
||||
#### Production Mode
|
||||
|
||||
```bash
|
||||
# Build untuk production
|
||||
npm run build
|
||||
# Pastikan env production sudah tersedia
|
||||
docker compose --env-file .env.production up -d --build
|
||||
|
||||
# Jalankan dengan web server (Apache/Nginx)
|
||||
# atau gunakan PHP built-in server
|
||||
php artisan serve --host=0.0.0.0 --port=8000
|
||||
# Siapkan database
|
||||
docker exec -it abbauf_kasir_app php artisan migrate --seed
|
||||
|
||||
# Periksa database (opsional)
|
||||
docker exec -it abbauf_kasir_db bash
|
||||
mysql -u root -p
|
||||
```
|
||||
|
||||
### 8. Print Label
|
||||
@ -161,19 +164,18 @@ php artisan serve --host=0.0.0.0 --port=8000
|
||||
Setelah instalasi berhasil, akses aplikasi melalui:
|
||||
|
||||
- **URL**: http://localhost:8000
|
||||
- **Admin Panel**: http://localhost:8000/admin (jika tersedia)
|
||||
|
||||
### 👤 Default Login
|
||||
|
||||
**Owner Account:**
|
||||
|
||||
- Email: `owner@tokoperhiasan.com`
|
||||
- Password: `password123`
|
||||
- Username: `admin`
|
||||
- Password: `123123`
|
||||
|
||||
**Kasir Account:**
|
||||
|
||||
- Email: `kasir@tokoperhiasan.com`
|
||||
- Password: `password123`
|
||||
- Username: `kasir`
|
||||
- Password: `123123`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ namespace Database\Seeders;
|
||||
use App\Models\Kategori;
|
||||
use App\Models\Nampan;
|
||||
use App\Models\Produk;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DataSeeder extends Seeder
|
||||
@ -16,47 +15,60 @@ class DataSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
// Nampan
|
||||
for ($i=0; $i < 30; $i++) {
|
||||
for ($i = 0; $i < 30; $i++) {
|
||||
if ($i != 12) {
|
||||
Nampan::factory()->create([
|
||||
'nama' => 'A' . ($i + 1)
|
||||
Nampan::create([
|
||||
'nama' => 'A' . ($i + 1),
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// Kategori
|
||||
$kategoriList = ['Cincin', 'Gelang Rantai', 'Gelang Bulat', 'Kalung', 'Liontin', 'Anting', 'Giwang'];
|
||||
foreach ($kategoriList as $kategori) {
|
||||
Kategori::factory()->create([
|
||||
'nama' => $kategori
|
||||
foreach ($kategoriList as $index => $kategori) {
|
||||
Kategori::create([
|
||||
'nama' => $kategori,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
// Produk
|
||||
$produk1 = Produk::factory()->create([
|
||||
'nama'=>'Gelang serut daun shimmer mp (mas putih)',
|
||||
'id_kategori'=>Kategori::find(2),
|
||||
'berat'=>1.4,
|
||||
'kadar'=>8,
|
||||
'harga_per_gram'=>900000,
|
||||
'harga_jual'=>1260000,
|
||||
// Produk 1
|
||||
$produk1 = Produk::create([
|
||||
'nama' => 'Gelang serut daun shimmer mp (mas putih)',
|
||||
'id_kategori' => Kategori::where('nama', 'Gelang Rantai')->first()->id,
|
||||
'berat' => 1.4,
|
||||
'kadar' => 8,
|
||||
'harga_per_gram' => 900000,
|
||||
'harga_jual' => 1260000,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$produk1->foto()->create([
|
||||
'id_produk'=>$produk1->id,
|
||||
'url'=>'https://i.imgur.com/eGYHzvw.jpeg'
|
||||
'id_produk' => $produk1->id,
|
||||
'url' => 'https://i.imgur.com/eGYHzvw.jpeg',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$produk2 = Produk::factory()->create([
|
||||
'nama'=>'Gelang rantai 5 buah clover merah',
|
||||
'id_kategori'=>Kategori::find(2),
|
||||
'berat'=>3.6,
|
||||
'kadar'=>8,
|
||||
'harga_per_gram'=>850000,
|
||||
'harga_jual'=>3060000,
|
||||
// Produk 2
|
||||
$produk2 = Produk::create([
|
||||
'nama' => 'Gelang rantai 5 buah clover merah',
|
||||
'id_kategori' => Kategori::where('nama', 'Gelang Rantai')->first()->id,
|
||||
'berat' => 3.6,
|
||||
'kadar' => 8,
|
||||
'harga_per_gram' => 850000,
|
||||
'harga_jual' => 3060000,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$produk2->foto()->create([
|
||||
'id_produk'=>$produk2->id,
|
||||
'url'=>'https://i.imgur.com/UjQzYoE.jpeg'
|
||||
'id_produk' => $produk2->id,
|
||||
'url' => 'https://i.imgur.com/UjQzYoE.jpeg',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,8 +9,8 @@ use App\Models\Produk;
|
||||
use App\Models\Sales;
|
||||
use App\Models\Transaksi;
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
@ -19,23 +19,34 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
User::factory()->create([
|
||||
// Create admin user
|
||||
User::create([
|
||||
'nama' => 'admin',
|
||||
'role' => 'owner',
|
||||
'password' => bcrypt('123123'),
|
||||
]);
|
||||
User::factory()->create([
|
||||
'nama' => 'kasir',
|
||||
'role' => 'kasir',
|
||||
'password' => bcrypt('123123'),
|
||||
'password' => Hash::make('123123'),
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
Sales::factory()->create([
|
||||
// Create kasir user
|
||||
User::create([
|
||||
'nama' => 'kasir',
|
||||
'role' => 'kasir',
|
||||
'password' => Hash::make('123123'),
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// Create sales record
|
||||
Sales::create([
|
||||
'nama' => 'Kasir',
|
||||
'no_hp' => '-',
|
||||
'alamat' => '-',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// Call other seeders
|
||||
$this->call(DataSeeder::class);
|
||||
$this->call(DummySeeder::class);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
# command: --default-authentication-plugin=mysql_native_password
|
||||
|
||||
# ========================================
|
||||
# Redis Cache & Session Store
|
||||
|
||||
Loading…
Reference in New Issue
Block a user