An open API service indexing awesome lists of open source software.

https://github.com/greigh/fivem-phone


https://github.com/greigh/fivem-phone

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐Ÿ“ฑ FiveM Phone Apps Collection

A collection of universal phone apps for FiveM servers, compatible with multiple frameworks (ESX, QBCore, QBX) and phone systems (LB Phone, QB Phone, QS Smartphone).

> **โš ๏ธ Development Status Notice**
> These phone apps are currently in **development/testing phase** and have not been fully tested in production environments. While they pass all validation checks and are designed for universal compatibility, **we recommend using them primarily with LB Phone** as it has received the most testing attention. Use in production servers at your own discretion and please report any issues you encounter.
> Additionally this is only my second FiveM project, so please be patient with me as I learn the ropes of this FiveM.

## ๐Ÿ“‹ Apps Included

| App | Description | Size | Database Required |
|-----|-------------|------|-------------------|
| ๐Ÿ“ง **Invoicing** | Create and manage professional invoices | 1024 KB | โœ… Yes |
| ๐Ÿ“ **Notes** | Personal note-taking with categories | 512 KB | โŒ No |
| ๐Ÿ’ผ **Business Cards** | Design and share professional cards | 768 KB | โœ… Yes |
| ๐Ÿงฎ **Calculator** | Advanced calculator with history | 256 KB | โŒ No |
| ๐Ÿ“ธ **Gallery** | Photo storage and management | 1536 KB | โœ… Yes |

## ๐Ÿš€ Quick Start

> **๐Ÿ“ฑ Recommended Setup**: For the best experience, we recommend using **LB Phone** as it has received the most comprehensive testing with these apps.

### 1. Download & Extract

```bash
# Download the latest release
# Extract to your server's resources directory
```

### 2. Install Dependencies

```lua
# Add to server.cfg BEFORE the phone apps
ensure ox_lib
ensure es_extended # OR qb-core OR qbx_core
ensure lb-phone # OR qb-phone OR qs-smartphone
```

### 3. Install Phone Apps

```bash
# Run the installation script
cd phone_apps
chmod +x install.sh
./install.sh
```

### 4. Add to server.cfg

```lua
# Phone Apps (add after dependencies)
ensure invoicing
ensure notes
ensure business_cards
ensure calculator
ensure gallery
```

### 5. Restart Server

```bash
# Restart your FiveM server
restart ox_lib
restart [your-framework]
restart [your-phone-system]
start invoicing
start notes
start business_cards
start calculator
start gallery
```

## ๐Ÿ”ง Compatibility

### โœ… Supported Frameworks

- **ESX** (es_extended)
- **QBCore** (qb-core)
- **QBX** (qbx_core)

### โœ… Supported Phone Systems

- **LB Phone** (lb-phone) - **๐ŸŒŸ Recommended & Best Tested**
- **QB Phone** (qb-phone) - Limited testing
- **QS Smartphone** (qs-smartphone) - Limited testing

### โœ… Dependencies

- **ox_lib** (required)
- **MySQL Async/oxmysql** (for database apps)

## ๐Ÿ“ฑ App Details

### ๐Ÿ“ง Invoicing App

Professional invoice management system.

**Features:**

- Create and send invoices to players
- Automatic tax calculations
- Payment processing
- Invoice history and tracking
- Expiration handling

**Database:** `invoices` table (auto-created)

### ๐Ÿ“ Notes App

Personal note-taking application.

**Features:**

- Create and edit personal notes
- Category organization
- Search functionality
- Auto-save feature
- Rich text support

**Database:** Not required (uses local storage)

### ๐Ÿ’ผ Business Cards App

Professional business card creator.

**Features:**

- Design custom business cards
- Multiple professional templates
- Share with nearby players
- Contact management
- QR code generation

**Database:** `business_cards` table (auto-created)

### ๐Ÿงฎ Calculator App

Advanced calculator with memory.

**Features:**

- Basic and advanced operations
- Calculation history
- Keyboard shortcuts
- Memory functions
- Responsive design

**Database:** Not required

### ๐Ÿ“ธ Gallery App

Photo storage and management.

**Features:**

- Photo upload and storage
- Album organization
- Image viewing and sharing
- Privacy controls
- Slideshow mode

**Database:** `gallery_photos` and `gallery_albums` tables (auto-created)

## ๐Ÿ› ๏ธ Configuration

Each app includes a `config.lua` file for customization:

```lua
-- Example: Invoicing App Configuration
Config.MaxInvoiceAmount = 50000
Config.DefaultTaxRate = 0.10
Config.AllowedJobs = {} -- Empty = all jobs can use

-- Example: Business Cards Configuration
Config.MaxCards = 100
Config.SharingDistance = 5.0
Config.AllowCustomImages = true
```

## ๐Ÿ“ฑ Phone Integration

Apps automatically register with your phone system:

```lua
-- LB Phone Integration
Config.PhoneApp = {
identifier = "invoicing",
name = "Invoicing",
description = "Create and manage professional invoices",
icon = "https://cdn-icons-png.flaticon.com/512/1611/1611179.png",
category = "business",
size = 1024
}
```

## ๐Ÿ” Validation

Validate your installation:

```bash
# Run the validation script
./validate_phone_apps.sh
```

The validation script checks:

- โœ… App structure and files
- โœ… Framework compatibility
- โœ… Phone system integration
- โœ… Configuration validity
- โœ… Code quality standards

## ๐Ÿงช Testing Status & Recommendations

### ๐ŸŒŸ Recommended Configuration

- **Framework**: Any (ESX, QBCore, QBX) - All tested and working
- **Phone System**: **LB Phone** - Most thoroughly tested
- **Environment**: Development/Testing servers initially

### โš ๏ธ Testing Status by Phone System

| Phone System | Testing Level | Status | Recommendation |
|--------------|---------------|--------|----------------|
| **LB Phone** | Comprehensive | โœ… Well Tested | **Recommended for production** |
| **QB Phone** | Basic | โš ๏ธ Limited Testing | Use with caution, test thoroughly |
| **QS Smartphone** | Basic | โš ๏ธ Limited Testing | Use with caution, test thoroughly |

### ๐Ÿ”ฌ What Has Been Tested

- โœ… Framework detection and compatibility (ESX/QB/QBX)
- โœ… App installation and registration
- โœ… Basic functionality of all 5 apps
- โœ… Database integration (where required)
- โœ… NUI interface loading and interaction
- โœ… LB Phone integration and app appearance

### โš ๏ธ What Needs More Testing

- ๐Ÿ”„ Extended production use in live servers
- ๐Ÿ”„ QB Phone and QS Smartphone integration edge cases
- ๐Ÿ”„ Performance under high player loads
- ๐Ÿ”„ Cross-framework data compatibility
- ๐Ÿ”„ Advanced features in complex server environments

### ๐Ÿ’ก For Production Use

1. **Test in a development environment first**
2. **Start with LB Phone if possible**
3. **Monitor console for any errors**
4. **Test with a small group of users initially**
5. **Report any issues you encounter**

## ๐Ÿ› Troubleshooting

### Apps Not Appearing in Phone

1. Check console for registration messages
2. Verify dependencies are loaded first
3. Ensure framework is detected correctly
4. Check resource loading order
5. **For best results, use LB Phone** (most tested)

### Framework Detection Issues

```lua
-- Debug framework detection
print("Framework:", PhoneApps.GetFramework())
```

### Phone System Specific Issues

**LB Phone (Recommended):**

- Most stable and tested integration
- Apps should appear automatically in the app grid
- Check LB Phone configuration if apps don't show

**QB Phone / QS Smartphone:**

- Limited testing - may require additional configuration
- Monitor console for specific error messages
- Consider switching to LB Phone if issues persist

### Database Connection Problems

1. Verify MySQL resource is running
2. Check table creation in database
3. Validate Config.TableName settings

### Common Error Solutions

```bash
# Framework not detected
# Solution: Install ESX, QBCore, or QBX

# Phone system not found
# Solution: Install lb-phone, qb-phone, or qs-smartphone

# ox_lib not found
# Solution: Install ox_lib dependency
```

## ๐Ÿ“š Documentation

- ๐Ÿ“– **[LB Phone Setup Guide](LB_PHONE_SETUP.md)** - Detailed LB Phone integration
- ๐Ÿ”ง **[Framework Implementation](FRAMEWORK_IMPLEMENTATION.md)** - Technical details
- ๐Ÿš€ **[Universal Implementation](UNIVERSAL_IMPLEMENTATION_COMPLETE.md)** - Compatibility guide

## ๐Ÿ”„ Migration

### From QB Phone to LB Phone

1. Backup existing app data
2. Update phone system references
3. Test all features
4. Import user data if needed

### Framework Migration

The apps automatically adapt to your framework:

- No code changes required
- Universal compatibility layer
- Automatic detection and configuration

## โœ… Testing Checklist

After installation:

- [ ] All apps appear in phone interface
- [ ] Apps open without errors
- [ ] Framework detection working
- [ ] Database tables created (if required)
- [ ] NUI interfaces load correctly
- [ ] Server callbacks function properly
- [ ] **Recommended**: Test with LB Phone first
- [ ] Test in development environment before production
- [ ] Monitor console for any warning messages

## ๐Ÿ“ž Support

For issues or questions:

1. **Check Console**: Look for error messages in F8 console
2. **Run Validation**: Use `./validate_phone_apps.sh`
3. **Verify Setup**: Follow installation guide step by step
4. **Update Resources**: Ensure all dependencies are current
5. **Try LB Phone**: If using QB Phone/QS Smartphone, test with LB Phone
6. **Report Issues**: Help improve the apps by reporting bugs and feedback

> **๐Ÿค Community Feedback Welcome**
> Since these apps are in active development, your feedback is valuable! Please report any issues, suggestions, or successful implementations to help improve compatibility across different setups.

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run validation script
5. Submit a pull request

## ๐Ÿ”„ Changelog

### v1.0.0-beta (Current)

- โœ… Universal framework compatibility (ESX/QB/QBX)
- โœ… Multi-phone system support (LB/QB/QS)
- โœ… 5 complete phone apps included
- โœ… Automatic validation and testing
- โœ… Comprehensive documentation
- โœ… Production-ready code quality
- ๐ŸŒŸ **Best tested with LB Phone**
- โš ๏ธ **Beta status**: Requires further testing in production environments

### Upcoming

- ๐Ÿ”„ Enhanced QB Phone and QS Smartphone compatibility
- ๐Ÿ”„ Extended production testing
- ๐Ÿ”„ Performance optimizations
- ๐Ÿ”„ Additional features based on community feedback

---

#### Made with โค๏ธ for the FiveM community

*Compatible with all major frameworks and phone systems - just install and go!*