feat: add README.md for DST Collection project, detailing tech stack, installation instructions, system requirements, and key features
This commit is contained in:
parent
78dcc4b39d
commit
632ca69c3a
289
README.md
Normal file
289
README.md
Normal file
@ -0,0 +1,289 @@
|
||||
# DST Collection - Built-in One
|
||||
|
||||
Aplikasi manajemen toko dan konveksi untuk DST Collection. Mengelola proses produksi garmen (cutting, jahit, finishing), penjualan di toko, stok bahan baku, pesanan pelanggan, dan laporan keuangan.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
### Backend
|
||||
- **PHP** 8.3+
|
||||
- **Laravel** 13
|
||||
- **MySQL** 8.0+ (database)
|
||||
- **Redis** (cache, queue, session)
|
||||
- **Inertia.js** v3 (server-side rendering)
|
||||
|
||||
### Frontend
|
||||
- **Vue.js** 3.5
|
||||
- **TypeScript** 5.2
|
||||
- **Tailwind CSS** 4.1
|
||||
- **Vite** 7.3 (build tool)
|
||||
- **Inertia.js** v3 (client-side)
|
||||
|
||||
### Packages Utama
|
||||
- **Spatie** - Permission, Media Library, Activity Log, Settings, Sluggable
|
||||
- **FullCalendar** - Kalender & penjadwalan
|
||||
- **TanStack Table** - Tabel data
|
||||
- **Reka UI** - Komponen UI
|
||||
- **Lucide** - Ikon
|
||||
- **Vue Sonner** - Notifikasi toast
|
||||
- **PWA** - Progressive Web App support
|
||||
|
||||
### Development & Testing
|
||||
- **Pest** v4 (testing)
|
||||
- **Laravel Pint** (code style)
|
||||
- **ESLint** (linting)
|
||||
- **Prettier** (formatting)
|
||||
- **Vue TSC** (type checking)
|
||||
|
||||
## Persyaratan Sistem
|
||||
|
||||
| Komponen | Versi Minimum |
|
||||
|----------|---------------|
|
||||
| PHP | 8.3 |
|
||||
| Composer | 2.x |
|
||||
| Node.js | 18.x |
|
||||
| NPM | 9.x |
|
||||
| MySQL | 8.0+ |
|
||||
| Redis | 6.0+ |
|
||||
|
||||
### Ekstensi PHP yang Dibutuhkan
|
||||
- openssl, pdo, mbstring, tokenizer, xml, ctype, json, bcmath, curl, fileinfo, gd, zip, redis
|
||||
|
||||
## Instalasi
|
||||
|
||||
### 1. Clone Repository
|
||||
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd built-in-one
|
||||
```
|
||||
|
||||
### 2. Install Dependencies
|
||||
|
||||
```bash
|
||||
composer install
|
||||
npm install
|
||||
```
|
||||
|
||||
### 3. Setup Environment
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
php artisan key:generate
|
||||
```
|
||||
|
||||
### 4. Konfigurasi Database
|
||||
|
||||
Edit file `.env`:
|
||||
|
||||
**MySQL:**
|
||||
```env
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=dst_collection
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
```
|
||||
|
||||
### 5. Konfigurasi Redis
|
||||
|
||||
Tambahkan di `.env`:
|
||||
|
||||
```env
|
||||
REDIS_CLIENT=predis
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
CACHE_STORE=redis
|
||||
QUEUE_CONNECTION=redis
|
||||
SESSION_DRIVER=redis
|
||||
```
|
||||
|
||||
### 6. Migrate Database
|
||||
|
||||
```bash
|
||||
php artisan migrate
|
||||
```
|
||||
|
||||
### 7. Seed Database (opsional)
|
||||
|
||||
```bash
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### 8. Build Frontend
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
### 9. Storage Link
|
||||
|
||||
```bash
|
||||
php artisan storage:link
|
||||
```
|
||||
|
||||
## Instalasi Satu Perintah
|
||||
|
||||
```bash
|
||||
composer setup
|
||||
```
|
||||
|
||||
Perintah ini akan menjalankan semua langkah instalasi secara otomatis.
|
||||
|
||||
## Konfigurasi Tambahan
|
||||
|
||||
### Redis
|
||||
|
||||
Sistem menggunakan Redis untuk cache, queue, dan session. Pastikan Redis server sudah berjalan:
|
||||
|
||||
```bash
|
||||
redis-cli ping # Harus merespons PONG
|
||||
```
|
||||
|
||||
### Queue Worker
|
||||
|
||||
Sistem menggunakan queue untuk beberapa proses. Jalankan queue worker:
|
||||
|
||||
```bash
|
||||
php artisan queue:listen --tries=1 --timeout=0
|
||||
```
|
||||
|
||||
### Push Notification (Web Push)
|
||||
|
||||
Untuk mengaktifkan push notification, tambahkan di `.env`:
|
||||
|
||||
```env
|
||||
VAPID_PUBLIC_KEY=<your-vapid-public-key>
|
||||
VAPID_PRIVATE_KEY=<your-vapid-private-key>
|
||||
```
|
||||
|
||||
Generate VAPID keys:
|
||||
|
||||
```bash
|
||||
php artisan web-push:vapid
|
||||
```
|
||||
|
||||
### Mail Configuration
|
||||
|
||||
```env
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
```
|
||||
|
||||
## Perintah yang Tersedia
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
composer dev
|
||||
```
|
||||
|
||||
Menjalankan server, queue worker, log viewer, dan Vite secara bersamaan.
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
npm run build # Production build
|
||||
npm run dev # Development server (Vite)
|
||||
npm run build:ssr # Build dengan SSR
|
||||
```
|
||||
|
||||
### Code Quality
|
||||
|
||||
```bash
|
||||
composer lint # Auto-fix code style (Pint)
|
||||
composer lint:check # Check code style
|
||||
npm run lint # Auto-fix ESLint
|
||||
npm run lint:check # Check ESLint
|
||||
npm run format # Format dengan Prettier
|
||||
npm run format:check # Check formatting
|
||||
npm run types:check # Type checking (Vue TSC)
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
composer test # Run semua test
|
||||
php artisan test # Run test langsung
|
||||
```
|
||||
|
||||
### Lainnya
|
||||
|
||||
```bash
|
||||
php artisan migrate # Jalankan migration
|
||||
php artisan migrate:fresh # Reset dan jalankan ulang migration
|
||||
php artisan db:seed # Seed database
|
||||
php artisan storage:link # Buat symlink storage
|
||||
php artisan config:clear # Clear config cache
|
||||
php artisan cache:clear # Clear cache
|
||||
php artisan view:clear # Clear compiled views
|
||||
```
|
||||
|
||||
## Struktur Project
|
||||
|
||||
```
|
||||
built-in-one/
|
||||
├── app/
|
||||
│ ├── Http/
|
||||
│ │ ├── Controllers/ # Controller HTTP
|
||||
│ │ ├── Middleware/ # Middleware
|
||||
│ │ └── Requests/ # Form Request validation
|
||||
│ ├── Models/ # Eloquent Models
|
||||
│ ├── Services/ # Business Logic
|
||||
│ └── ...
|
||||
├── database/
|
||||
│ ├── factories/ # Model Factories
|
||||
│ ├── migrations/ # Database Migrations
|
||||
│ └── seeders/ # Database Seeders
|
||||
├── resources/
|
||||
│ ├── js/
|
||||
│ │ ├── components/ # Vue Components
|
||||
│ │ ├── pages/ # Inertia Pages
|
||||
│ │ ├── composables/ # Vue Composables
|
||||
│ │ ├── types/ # TypeScript Types
|
||||
│ │ └── constants/ # Constants & Config
|
||||
│ └── css/ # Stylesheets
|
||||
├── routes/
|
||||
│ ├── web.php # Web Routes
|
||||
│ └── ...
|
||||
├── tests/
|
||||
│ ├── Feature/ # Feature Tests
|
||||
│ └── Unit/ # Unit Tests
|
||||
├── public/ # Public Assets
|
||||
├── storage/ # Storage & Logs
|
||||
├── .env.example # Environment Example
|
||||
├── composer.json # PHP Dependencies
|
||||
├── package.json # Node Dependencies
|
||||
└── vite.config.ts # Vite Configuration
|
||||
```
|
||||
|
||||
## Fitur Utama
|
||||
|
||||
### Konveksi
|
||||
- **Manajemen Cutting** - Kelola proses cutting bahan baku
|
||||
- **Manajemen Produksi** - Monitoring proses jahit dan finishing
|
||||
- **Manajemen Stok Bahan Baku** - Monitoring stok kain dan bahan
|
||||
|
||||
### Toko
|
||||
- **Point of Sale (POS)** - Kasir dan penjualan di toko
|
||||
- **Manajemen Produk** - Kelola katalog produk dan varian
|
||||
- **Manajemen Pesanan** - Kelola pesanan pelanggan
|
||||
|
||||
### Umum
|
||||
- **Laporan Keuangan** - Laporan pendapatan dan pengeluaran
|
||||
- **Manajemen Pengguna** - Role dan permission management
|
||||
- **Activity Log** - Log aktivitas sistem
|
||||
- **Push Notification** - Notifikasi real-time
|
||||
- **PWA** - Install sebagai aplikasi mobile
|
||||
|
||||
## License
|
||||
|
||||
Proprietary - DST Collection
|
||||
Loading…
Reference in New Issue
Block a user