# RMBXchange - Beginner Setup Guide

## 📋 What This Guide Is For

This guide will help you set up and configure the RMBXchange platform **even if you have no technical experience**. Follow each step carefully, and you'll have your currency exchange platform running in no time!

---

## 🎯 What You'll Learn

- How to install the platform on your server
- How to configure basic settings
- How to set up payment processing
- How to enable SMS notifications
- How to manage your platform as an admin

---

## ⚙️ Part 1: Initial Installation

### Step 1: Get Your Server Ready

**What you need:**
- A web hosting account (with PHP and MySQL)
- Access to your hosting control panel (cPanel, Plesk, etc.)

**What to do:**

1. **Create a MySQL Database**
   - Log in to your hosting control panel
   - Find "MySQL Databases" or "Database Manager"
   - Click "Create New Database"
   - Name it: `buy_rmb`
   - Write down the database name, username, and password

2. **Upload the Files**
   - Download all project files
   - Use FTP or File Manager to upload to your server
   - Upload to: `public_html` or `www` folder

### Step 2: Configure Database Connection

**Find the `.env` file** in your project folder

**Edit these lines:**
```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=buy_rmb
DB_USERNAME=your_database_username
DB_PASSWORD=your_database_password
```

**Replace:**
- `your_database_username` → Your actual database username
- `your_database_password` → Your actual database password

**Save the file**

### Step 3: Run Installation Commands

**Open your hosting terminal or SSH** and run these commands one by one:

```bash
# Install dependencies
composer install

# Generate application key
php artisan key:generate

# Create database tables
php artisan migrate

# Create your admin account
php artisan db:seed --class=AdminUserSeeder
```

**✅ Default Admin Login:**
- Email: `admin@rmbxchange.com`
- Password: `password123`

**⚠️ IMPORTANT:** Change this password immediately after first login!

---

## 🔐 Part 2: First Login and Security

### Step 1: Access Your Admin Panel

1. Open your browser
2. Go to: `https://yourdomain.com/admin/dashboard`
3. Log in with the default credentials above

### Step 2: Change Your Password

1. Click your name in the top right
2. Click "Account Settings"
3. Enter a new strong password
4. Click "Update Password"

**Password Tips:**
- At least 8 characters
- Mix of letters, numbers, and symbols
- Don't use common words

---

## 💰 Part 3: Payment Setup (Hubtel)

### What is Hubtel?

Hubtel is the payment gateway that processes customer payments in Ghana Cedis (GHS).

### Step 1: Get Hubtel Account

1. Go to [https://developers.hubtel.com](https://developers.hubtel.com)
2. Click "Sign Up"
3. Complete registration
4. Verify your email

### Step 2: Get Your API Credentials

1. Log in to Hubtel Developer Portal
2. Click "Create New Application"
3. Name it: "RMBXchange"
4. Copy these three things:
   - **Client ID** (looks like: `abc123xyz`)
   - **Client Secret** (looks like: `secret_abc123xyz`)
   - **Merchant Account Number** (looks like: `HM12345`)

### Step 3: Add to Your Platform

1. Go to your admin dashboard
2. Click "Settings" in the top menu
3. Scroll to "Payment Gateway Settings"
4. Fill in:
   - **Hubtel Client ID:** Paste your Client ID
   - **Hubtel Client Secret:** Paste your Client Secret
   - **Hubtel Merchant Account:** Paste your Merchant Account Number
5. Click "Save Settings" at the bottom

**✅ Done!** Your platform can now accept payments.

---

## 📱 Part 4: SMS Notifications Setup

### Why SMS?

SMS notifications keep your customers informed about their transactions instantly.

### Choose Your SMS Provider

You have 3 options. Pick ONE that works best for you:

#### Option A: mNotify (Recommended for Beginners)

**Step 1: Create Account**
1. Go to [https://mnotify.com](https://mnotify.com)
2. Click "Sign Up"
3. Complete registration
4. Buy SMS credits (minimum 100 GHS)

**Step 2: Get API Key**
1. Log in to mNotify dashboard
2. Click "API Settings"
3. Click "Generate API Key"
4. Copy the API Key (looks like: `mnotify_abc123xyz`)

**Step 3: Register Sender ID**
1. In mNotify dashboard, click "Sender IDs"
2. Click "Add New Sender ID"
3. Enter: `RMBXchange` (or your business name)
4. Wait for approval (usually 24 hours)

**Step 4: Add to Your Platform**
1. Go to admin dashboard → Settings
2. Scroll to "SMS Provider Settings"
3. Select "mNotify" from dropdown
4. Fill in:
   - **mNotify API Key:** Paste your API key
   - **mNotify Sender ID:** Enter `RMBXchange`
5. Click "Save Settings"

#### Option B: BulkSMS Ghana

**Step 1: Create Account**
1. Go to BulkSMS Ghana website
2. Register for an account
3. Purchase SMS credits

**Step 2: Get API Key**
1. Log in to your dashboard
2. Go to API Settings
3. Generate and copy API Key

**Step 3: Add to Platform**
1. Admin dashboard → Settings
2. Select "BulkSMS Ghana" from dropdown
3. Enter API Key and Sender ID
4. Save Settings

#### Option C: SMS Online GH

**Step 1: Create Account**
1. Go to SMS Online GH website
2. Register and verify account
3. Top up your account

**Step 2: Get API Key**
1. Dashboard → API Settings
2. Copy your API Key

**Step 3: Add to Platform**
1. Admin dashboard → Settings
2. Select "SMS Online GH" from dropdown
3. Enter API Key and Sender ID
4. Save Settings

---

## 📧 Part 5: Email Setup

### Why Email?

Email is used for:
- Welcome messages to new users
- Transaction confirmations
- Password resets
- Admin notifications

### Using Gmail (Easiest Method)

**Step 1: Enable 2-Step Verification**
1. Go to [https://myaccount.google.com/security](https://myaccount.google.com/security)
2. Click "2-Step Verification"
3. Follow the setup process

**Step 2: Create App Password**
1. Go to [https://myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords)
2. Select "Mail" and "Other (Custom name)"
3. Type: "RMBXchange"
4. Click "Generate"
5. Copy the 16-character password (looks like: `abcd efgh ijkl mnop`)

**Step 3: Add to Your Platform**
1. Admin dashboard → Settings
2. Scroll to "Email Configuration"
3. Fill in:
   - **SMTP Host:** `smtp.gmail.com`
   - **SMTP Port:** `587`
   - **SMTP Username:** Your Gmail address
   - **SMTP Password:** The 16-character app password
   - **SMTP Encryption:** `tls`
   - **From Email:** Your Gmail address
   - **From Name:** `RMBXchange`
4. Click "Save Settings"

**Step 4: Test Email**
1. Try registering a new user
2. Check if welcome email arrives
3. If not, check spam folder

---

## 💱 Part 6: Exchange Rate Setup

### Understanding Exchange Rates

Your platform exchanges Ghana Cedis (GHS) to Chinese Yuan (CNY).

**Example:**
- If rate is 0.57, it means: 1 GHS = 0.57 CNY
- Customers see it as: 1 CNY = 1.75 GHS

### Setting Your Rate

**Step 1: Check Current Market Rate**
1. Google "GHS to CNY exchange rate"
2. Note the current rate

**Step 2: Add Your Margin**
- Market rate: 0.57
- Your margin: +0.01 (your profit)
- Your rate: 0.56 (you give customers slightly less)

**Step 3: Update in Platform**
1. Admin dashboard → Settings
2. Find "Exchange Rate (GHS to CNY)"
3. Enter your rate (e.g., `0.56`)
4. Click "Save Settings"

**Step 4: Update Regularly**
- Check market rate daily
- Update your rate to stay competitive
- Consider using automated rate updates later

---

## 👥 Part 7: Managing Your Platform

### Daily Tasks

**1. Check Dashboard**
- Log in to admin dashboard daily
- Review new orders
- Check pending withdrawals

**2. Process Withdrawals**
1. Go to "Withdrawals" menu
2. Review pending requests
3. Click "Approve" or "Reject"
4. Customer gets notified automatically

**3. Monitor Transactions**
1. Go to "Orders" menu
2. Check completed transactions
3. Verify payments received

### Weekly Tasks

**1. Update Exchange Rate**
- Check market rate
- Update if needed
- Announce changes to customers

**2. Check SMS Balance**
- View SMS credits in dashboard
- Top up if running low
- Aim to keep 500+ credits

**3. Review Analytics**
- Go to "Analytics" menu
- Check transaction volume
- Monitor user growth

### Monthly Tasks

**1. Financial Review**
- Export transaction reports
- Calculate total revenue
- Plan for next month

**2. System Maintenance**
- Check for updates
- Review error logs
- Backup database

---

## 🎨 Part 8: Customizing Your Platform

### Change Site Name and Logo

**Step 1: Update Site Name**
1. Edit `.env` file
2. Find: `APP_NAME="RMBXchange"`
3. Change to your business name
4. Save file

**Step 2: Replace Logo**
1. Prepare your logo (PNG format, 200x200px)
2. Name it: `RMBXchange-Photoroom.png`
3. Upload to `public` folder
4. Replace existing file

### Edit Homepage Content

**Step 1: Access CMS**
1. Admin dashboard → "Pages" menu
2. Click on page you want to edit
3. Edit content in the editor
4. Click "Update Page"

**Available Pages:**
- About Us
- Terms of Service
- Privacy Policy
- FAQ
- Contact Us

### Change Colors and Styling

**For Advanced Users:**
- Edit `resources/views/home.blade.php`
- Modify CSS variables in `<style>` section
- Change colors, fonts, spacing

---

## 🆘 Part 9: Troubleshooting Common Issues

### Problem: Can't Log In

**Solutions:**
1. Check if you're using correct email/password
2. Try password reset
3. Clear browser cache
4. Try different browser

### Problem: Payments Not Working

**Check:**
1. Hubtel credentials correct?
2. Merchant account active?
3. Test mode vs live mode?
4. Check error logs

**How to check logs:**
1. Go to `storage/logs/laravel.log`
2. Look for recent errors
3. Search for "Hubtel" or "payment"

### Problem: SMS Not Sending

**Check:**
1. SMS provider selected correctly?
2. API key valid?
3. Sender ID approved?
4. Sufficient SMS credits?

**Test SMS:**
1. Admin dashboard → Settings
2. Scroll to SMS section
3. Click "Test SMS" button
4. Check if you receive test message

### Problem: Emails Not Sending

**Check:**
1. SMTP credentials correct?
2. App password (not regular password)?
3. Port 587 not blocked?
4. Gmail "Less secure apps" enabled?

**Test Email:**
1. Try password reset feature
2. Check spam folder
3. Verify SMTP settings

### Problem: Exchange Rate Not Showing

**Solutions:**
1. Admin dashboard → Settings
2. Make sure rate is set (not 0)
3. Clear cache: `php artisan cache:clear`
4. Refresh browser

---

## 📞 Part 10: Getting Help

### Before Asking for Help

**Gather this information:**
1. What were you trying to do?
2. What happened instead?
3. Any error messages?
4. Screenshot of the issue

### Check Documentation

**Available Guides:**
- `PROJECT_SETTINGS.md` - All settings explained
- `HUBTEL_INTEGRATION.md` - Payment setup details
- `MNOTIFY_INTEGRATION.md` - SMS setup details
- `EMAIL_TEMPLATES.md` - Email customization
- `WALLET_SYSTEM.md` - Wallet features
- `CMS_SYSTEM.md` - Content management

### Error Logs

**Where to find logs:**
```
storage/logs/laravel.log
```

**How to read logs:**
1. Open the file
2. Scroll to bottom (most recent)
3. Look for "ERROR" or "EXCEPTION"
4. Copy the error message

---

## ✅ Part 11: Launch Checklist

Before going live, make sure you've completed:

### Security
- [ ] Changed default admin password
- [ ] Updated `.env` with strong passwords
- [ ] Set `APP_DEBUG=false` in `.env`
- [ ] Set `APP_ENV=production` in `.env`

### Payment
- [ ] Hubtel credentials added
- [ ] Test payment completed successfully
- [ ] Merchant account verified

### Communication
- [ ] SMS provider configured
- [ ] Test SMS sent successfully
- [ ] Email SMTP configured
- [ ] Test email sent successfully

### Content
- [ ] Logo uploaded
- [ ] Site name updated
- [ ] About Us page completed
- [ ] Terms of Service updated
- [ ] Privacy Policy updated
- [ ] Contact information added

### Settings
- [ ] Exchange rate set
- [ ] Minimum/maximum amounts configured
- [ ] Admin email set
- [ ] Admin phone number set

### Testing
- [ ] Created test user account
- [ ] Completed test transaction
- [ ] Tested withdrawal process
- [ ] Verified all emails received
- [ ] Verified all SMS received

---

## 🎓 Part 12: Understanding Key Concepts

### What is an Exchange Rate?

**Simple Explanation:**
- It's how much one currency is worth in another currency
- Example: 1 GHS = 0.57 CNY means you get 0.57 Chinese Yuan for every 1 Ghana Cedi

**Your Profit:**
- Market rate: 1 GHS = 0.57 CNY
- Your rate: 1 GHS = 0.56 CNY
- Your profit: 0.01 CNY per GHS exchanged

### What is a Wallet?

**Simple Explanation:**
- A digital account where customers store Chinese Yuan (CNY)
- Like a bank account, but for your platform only

**How it works:**
1. Customer pays GHS via Hubtel
2. System converts to CNY using your rate
3. CNY added to customer's wallet
4. Customer can withdraw CNY later

### What is an API Key?

**Simple Explanation:**
- A secret password that lets your platform talk to other services
- Like a key that unlocks a door

**Examples:**
- Hubtel API Key: Lets you process payments
- SMS API Key: Lets you send text messages
- Keep these secret! Don't share with anyone

### What is SMTP?

**Simple Explanation:**
- The system that sends emails
- Like a post office for digital mail

**Settings you need:**
- Host: The email server address
- Port: The door number to use
- Username: Your email address
- Password: Your email password

---

## 📊 Part 13: Understanding Your Dashboard

### Dashboard Overview

**Top Section:**
- **Wallet Balance:** Total CNY in system
- **Exchange Rate:** Current GHS to CNY rate
- **SMS Balance:** Remaining SMS credits

**Statistics Cards:**
- **Top-Ups:** Number of wallet deposits
- **Pending:** Withdrawals waiting for approval
- **Done:** Completed withdrawals
- **Volume:** Total GHS processed

### Orders Page

**What you see:**
- All customer transactions
- Payment status
- Amount exchanged
- Date and time

**Order Statuses:**
- **Pending:** Payment not confirmed
- **Processing:** Payment received, converting
- **Completed:** Transaction finished
- **Failed:** Payment failed

### Withdrawals Page

**What you see:**
- Customer withdrawal requests
- Amount requested
- Bank details
- Status

**Your Actions:**
- **Approve:** Release funds to customer
- **Reject:** Deny request (with reason)

### Users Page

**What you see:**
- All registered users
- Email addresses
- Registration dates
- Account status

**Your Actions:**
- View user details
- Check transaction history
- Disable accounts if needed

---

## 🚀 Part 14: Growing Your Business

### Marketing Tips

**1. Social Media**
- Create Facebook page
- Post daily exchange rates
- Share customer testimonials
- Run promotions

**2. WhatsApp Business**
- Create business account
- Share rate updates
- Answer customer questions
- Process orders via chat

**3. Referral Program**
- Offer bonus for referrals
- Give both parties a reward
- Track referrals in system

### Customer Service

**Best Practices:**
1. Respond quickly (within 1 hour)
2. Be polite and professional
3. Explain processes clearly
4. Follow up on issues

**Common Questions:**
- "How long does transfer take?" → 5-30 minutes
- "What's your rate?" → Check dashboard, tell them
- "Is it safe?" → Explain security measures
- "How do I withdraw?" → Guide them step-by-step

### Competitive Advantages

**What makes you different:**
1. Fast processing (5-30 minutes)
2. Competitive rates
3. Reliable service
4. Good customer support
5. Easy-to-use platform

---

## 📝 Part 15: Daily Operations Workflow

### Morning Routine (9:00 AM)

1. **Log in to admin dashboard**
2. **Check overnight transactions**
   - Review completed orders
   - Verify payments received
3. **Update exchange rate**
   - Check market rate
   - Update if needed
4. **Check SMS balance**
   - Top up if below 200 credits
5. **Review pending withdrawals**
   - Process urgent requests

### Afternoon Routine (2:00 PM)

1. **Check new orders**
2. **Process withdrawals**
3. **Respond to customer messages**
4. **Monitor system performance**

### Evening Routine (6:00 PM)

1. **Final withdrawal processing**
2. **Review day's transactions**
3. **Calculate daily revenue**
4. **Plan for next day**

---

## 🎯 Success Metrics

### Track These Numbers

**Daily:**
- Number of transactions
- Total GHS processed
- Total CNY exchanged
- New user registrations

**Weekly:**
- Average transaction size
- Customer retention rate
- SMS delivery rate
- Email open rate

**Monthly:**
- Total revenue
- Growth percentage
- Customer satisfaction
- System uptime

---

## 🔒 Security Reminders

### Protect Your Platform

**Do:**
- ✅ Use strong passwords
- ✅ Change passwords regularly
- ✅ Keep API keys secret
- ✅ Backup database weekly
- ✅ Monitor for suspicious activity
- ✅ Update software regularly

**Don't:**
- ❌ Share admin credentials
- ❌ Use public WiFi for admin access
- ❌ Store passwords in plain text
- ❌ Ignore security warnings
- ❌ Skip backups

---

## 📞 Quick Reference

### Important URLs

```
Homepage: https://yourdomain.com
Admin Login: https://yourdomain.com/admin/dashboard
User Login: https://yourdomain.com/login
Settings: https://yourdomain.com/admin/settings
```

### Important Commands

```bash
# Clear cache
php artisan cache:clear

# Clear config
php artisan config:clear

# Check exchange rate
php artisan exchange:check-rate

# Database backup
php artisan db:backup
```

### Emergency Contacts

**Hosting Support:** [Your hosting provider]
**Payment Gateway:** Hubtel Support
**SMS Provider:** [Your SMS provider support]

---

## 🎉 Congratulations!

You've completed the beginner setup guide! Your RMBXchange platform is now ready to process currency exchanges.

**Next Steps:**
1. Complete the launch checklist
2. Test everything thoroughly
3. Start with friends and family
4. Gradually expand to more customers
5. Keep learning and improving

**Remember:**
- Start small and grow gradually
- Focus on excellent customer service
- Keep your rates competitive
- Monitor your platform daily
- Ask for help when needed

**Good luck with your currency exchange business! 🚀**

---

**Need Help?** Check the other documentation files or contact your technical support team.

**Last Updated:** April 30, 2026  
**Version:** 1.0 - Beginner Friendly  
**Maintained By:** RMBXchange Team
