This document explains all the scripts included in the notebook item resource project and how to use them.
The resource is focused on notebook items only:
- notebook_item/: Core notebook functionality resource for 4 supported item types
- notebook - Personal notes and thoughts
- journal - Extended diary entries
- businesscard - Professional contact information
- photo - Photo descriptions and memories
Note: Phone apps and other integrations are handled in separate repositories for better modularity.
All scripts have been updated to work with this notebook-only structure.
The main script that provides a unified interface for all notebook resource operations.
./notebook.sh # Interactive menu
./notebook.sh validate # Run validation for notebook items
./notebook.sh build # Build package
./notebook.sh deploy # Deploy to server
./notebook.sh install # Quick install
./notebook.sh test # Test installation
./notebook.sh status # Show project status
./notebook.sh clean # Clean build filesFeatures:
- Interactive menu-driven interface
- Color-coded output for better readability
- Developer tools submenu
- Documentation viewer
- Project status overview
- Notebook-only validation and testing
The resource strictly validates and processes only these 4 item types:
- notebook: Personal notes and thoughts (500 character limit)
- journal: Extended diary entries (1000 character limit)
- businesscard: Professional contact information (300 character limit)
- photo: Photo descriptions and memories (250 character limit)
Any item not in the supported list will be rejected with clear error messages, ensuring focused functionality and preventing conflicts.
Validates the notebook resource structure and checks for common issues.
./validate.sh # Full validation
./validate.sh --quiet # Quiet mode (minimal output)Checks:
- Required files exist for notebook_item resource
- Lua syntax validation
- fxmanifest.lua configuration
- Export function presence
- Notebook item configuration validation
- Item type support verification
- Notebook item limit validation
- Icon and asset verification
Creates distribution packages and release archives for the notebook item resource.
./build.sh # Full build process
./build.sh --clean # Clean build directories onlyCreates:
- Complete installation package (ZIP)
- Resource-only release archive (ZIP)
- Notebook item configuration packages
- SHA256 checksums
- Build manifest (JSON)
The build script focuses on the notebook item resource:
./build.sh # Builds the notebook_item resourcePackage Contents:
- notebook_item resource folder
- Installation scripts
- Configuration files
- Documentation
Comprehensive deployment script with validation and configuration.
./deploy.sh # Interactive deployment
./deploy.sh --validate-only # Validation onlyFeatures:
- Resource structure validation
- Automatic backup of existing installations
- server.cfg configuration
- ox_inventory integration check
- Notebook item configuration validation
- Item type support verification
- Installation testing
- Detailed reporting
The deployment script focuses on notebook items only:
./deploy.sh # Interactive deployment with notebook validation
./deploy.sh --notebook-only # Deploy only the notebook_item resourceResource Integration:
- qbox/qbx_core: Framework compatibility validation
- ox_inventory: Item definition setup
- ox_lib: UI library integration
- Notebook item validation and testing
Basic installation script for copying the notebook resource to server.
./install.sh # Interactive installationFeatures:
- Simple path-based installation
- Basic validation
- Next steps guidance
-
Development Workflow:
# Make changes to code (notebook_item or phone_apps) ./notebook.sh validate # Validate all resources ./notebook.sh build # Build complete suite ./notebook.sh test # Test installation
-
Phone App Development:
# Working on phone apps specifically ./validate.sh # Validate phone app structure # Test individual phone apps # Modify web UI files in phone_apps/*/web/ ./build.sh # Build updated packages
-
Release Workflow:
./notebook.sh validate # Final validation of all resources ./notebook.sh build # Create distribution packages # Upload dist/*.zip to GitHub releases
-
Complete Suite Installation:
./notebook.sh install # Install all resources # OR ./deploy.sh # Full deployment with phone apps
-
Phone Apps Only:
./deploy.sh --phone-apps-only # Install only phone applications -
Selective Installation:
# Copy individual resources as needed: # - notebook_item/ (core functionality) # - phone_apps/notebook_phone_app/ # - phone_apps/invoice_phone_app/ # - phone_apps/unified_phone_app/
- 🔵 Blue: Steps and actions
- 🟢 Green: Success messages
- 🟡 Yellow: Warnings
- 🔴 Red: Errors
- 🟣 Purple: Headers
- 🔷 Cyan: Information
- All scripts use
set -efor immediate error exit - Comprehensive error messages
- Graceful failure handling
- Backup creation before destructive operations
- Menu-driven interfaces
- Progress indicators
- User confirmation prompts
- Clear next-step guidance
dist/
├── notebook_item_v1.0.0_YYYYMMDD_HHMMSS.zip # Complete package
├── notebook_item_v1.0.0_YYYYMMDD_HHMMSS.zip.sha256
├── notebook_item_release_v1.0.0.zip # Resource only
├── notebook_item_release_v1.0.0.zip.sha256
└── build_manifest.json # Build metadata
installation_report_YYYYMMDD_HHMMSS.txt # Installation details
server/resources/notebook_item_backup_YYYYMMDD_HHMMSS/ # Automatic backups
- bash: Shell interpreter
- zip: Archive creation (for build.sh)
- find: File searching
- grep: Text searching
- cp/mv/rm: File operations
- lua: Syntax validation (recommended)
- tree: Directory structure display
- less: Document viewer
- ✅ macOS (tested)
- ✅ Linux (should work)
- ❓ Windows (via WSL/Git Bash)
# Add custom checks to validate.sh
if ! custom_check; then
print_error "Custom validation failed"
((errors++))
fi# Modify build.sh to include additional files
additional_files=("custom_config.lua" "extra_docs.md")
for file in "${additional_files[@]}"; do
[ -f "$file" ] && cp "$file" "$BUILD_DIR/"
done# Add pre/post deployment hooks to deploy.sh
pre_deploy_hook() {
# Custom pre-deployment actions
}
post_deploy_hook() {
# Custom post-deployment actions
}-
Permission Denied
chmod +x *.sh # Make scripts executable
-
Lua Not Found
# Install Lua (macOS) brew install lua # Install Lua (Ubuntu/Debian) sudo apt-get install lua5.4
-
Script Not Found
ls -la *.sh # Check script existence pwd # Verify current directory
-
Phone App Not Showing
# Check phone system compatibility # Verify phone_apps folder structure # Check fxmanifest.lua client_scripts
-
Web UI Not Loading
# Verify web/ folder exists in phone app # Check HTML/CSS/JS files are present # Validate NUI callbacks registration
-
Icons Missing (lb-phone)
# Check if icon.png exists in phone app root # Verify icon path in fxmanifest.lua # Follow lb-phone icon setup guide
-
qb-phone Integration
# Ensure qb-phone is running # Check exports are correctly configured # Verify phone app registration
-
lb-phone Integration
# Verify lb-phone app registration # Check icon file placement # Validate app manifest format
-
qs-smartphone Integration
# Check qs-smartphone configuration # Verify app registration method # Validate callback structure
Most scripts support verbose output:
# Enable debug output
set -x # Add to script for debuggingThe included .github/workflows/validate.yml uses these scripts:
- name: Validate resource structure
run: ./validate.sh
- name: Check Lua syntax
run: find notebook_item -name "*.lua" -exec lua -l {} \;- Run
./build.shto create distribution packages - Upload
dist/*.zipfiles to GitHub releases - Include
build_manifest.jsonin release notes
- Keep scripts executable:
chmod +x *.sh - Use consistent error handling
- Maintain color coding standards
- Update version numbers when modifying
- Test on all supported phone systems
- Maintain responsive web UI design
- Follow phone system specific guidelines:
- qb-phone: Use qb-phone app structure
- lb-phone: Include proper icon files and registration
- qs-smartphone: Follow qs app manifest format
- Keep web assets optimized for mobile view
- Use consistent UI/UX patterns across apps
- Keep phone apps in the
phone_apps/directory - Maintain consistent folder structure across apps
- Use modular code organization (client/server/shared)
- Document phone system compatibility clearly
- Commit scripts with the resource
- Tag releases after successful builds
- Include script changes in changelog
- Update this document when adding features
- Include usage examples for new options
- Document any external dependencies
This script ecosystem provides a complete solution for developing, building, testing, and deploying the entire notebook resource suite efficiently and reliably. The suite includes the core notebook_item resource and comprehensive phone app integrations for all major FiveM phone systems.