🔧 **Setup Checklist - POS SaaS**

---

## ✅ Pre-Installation

- [ ] PHP 7.4+ installed
- [ ] MySQL 5.7+ installed & running
- [ ] Apache with mod_rewrite enabled
- [ ] XAMPP/LAMP/LEMP stack ready
- [ ] Browser available

---

## ✅ Installation Steps

### Step 1: Database
- [ ] Create database: `pos_saas`
- [ ] Import schema: `database/schema.sql`
- [ ] Verify tables created (should have 11 tables)
- [ ] Check character set: utf8mb4

### Step 2: Configuration
- [ ] Edit `config/database.php`
- [ ] Set DB_HOST (usually `localhost`)
- [ ] Set DB_USER (usually `root`)
- [ ] Set DB_PASS (your MySQL password)
- [ ] Verify DB_NAME = `pos_saas`

### Step 3: Apache Setup
- [ ] Enable `mod_rewrite` in Apache
- [ ] Verify `.htaccess` exists in `public/` folder
- [ ] Restart Apache service

### Step 4: File Permissions
- [ ] Set `public/` directory permissions to 755
- [ ] Set `public/uploads/` directory to 755 (create if not exist)
- [ ] Verify config files readable

### Step 5: Verification
- [ ] Access `http://localhost/pos-saas/public/`
- [ ] Landing page loads successfully
- [ ] CSS/JS files load properly
- [ ] No PHP errors in browser console

---

## ✅ First Run

- [ ] Register test account
- [ ] Login successfully
- [ ] See Dashboard (trial 7 hari shown)
- [ ] Add test product (Produk → Add)
- [ ] Create test transaction (Kasir)
- [ ] Print receipt
- [ ] Check Laporan
- [ ] View Pembayaran page

---

## ✅ Security Verification

- [ ] Password hashed in database (SELECT * FROM users)
- [ ] Session created on login
- [ ] Logout clears session
- [ ] Cannot access pages without login
- [ ] SQL injection tests passed
- [ ] CSRF protection ready

---

## ✅ Customization (Optional)

- [ ] Update company name in constants
- [ ] Customize pricing in constants
- [ ] Modify email templates
- [ ] Add company logo
- [ ] Update contact info
- [ ] Customize email

---

## ✅ Backup & Maintenance

- [ ] Database backed up locally
- [ ] Source code backed up
- [ ] Document database credentials (SECURE)
- [ ] Test restore procedure
- [ ] Setup auto-backup script

---

## ✅ Going Live (Optional)

- [ ] Deploy to production server
- [ ] Update database credentials
- [ ] Enable HTTPS/SSL
- [ ] Configure email notifications
- [ ] Setup payment gateway (Midtrans, etc)
- [ ] Test payment flow
- [ ] Monitor error logs
- [ ] Setup monitoring alerts

---

## ✅ Testing Scenarios

- [ ] User Registration Flow
  - [ ] Valid email format
  - [ ] Duplicate email rejection
  - [ ] Password strength check
  - [ ] Successful registration

- [ ] Login Flow
  - [ ] Valid credentials
  - [ ] Invalid password
  - [ ] Non-existent user
  - [ ] Session management

- [ ] Product Management
  - [ ] Add product
  - [ ] Edit product
  - [ ] Delete product
  - [ ] Low stock notification

- [ ] POS Transaction
  - [ ] Add items to cart
  - [ ] Calculate tax correctly
  - [ ] Apply discount
  - [ ] Process payment
  - [ ] Generate receipt

- [ ] Subscription
  - [ ] Trial period active
  - [ ] Trial expiration
  - [ ] Upgrade subscription
  - [ ] Payment pending
  - [ ] Payment confirmation

---

## ✅ Documentation Review

- [ ] README.md read completely
- [ ] INSTALLATION.md understood
- [ ] QUICKSTART.md tested
- [ ] CHANGELOG.md reviewed
- [ ] Code comments understood

---

## 📊 System Status

**Database**: _____________ (✅ OK / ❌ Error)
**Apache**: _____________ (✅ OK / ❌ Error)
**PHP**: _____________ (✅ OK / ❌ Error)
**Website**: _____________ (✅ OK / ❌ Error)

---

## 🎯 Launch Date

Expected Launch: _________________

Go-Live Checklist Completed: _________________ (Date)

---

## 📝 Notes

```
_________________________________________________
_________________________________________________
_________________________________________________
_________________________________________________
```

---

**Setup Checklist Version 1.0**
*Last Updated: March 21, 2026*
