Skip to content

jcastillotx/room-2-exchange

Repository files navigation

Room2Exchange WordPress Plugin

A comprehensive WordPress plugin that connects host families with students/individuals seeking room and board arrangements. Built with modern PHP, AI-powered matching, and integrated payment processing.

🏠 Overview

Room2Exchange is a full-featured matching platform that facilitates connections between:

  • Host Families: Offering room and board in exchange for help with household tasks
  • Students/Seekers: Looking for accommodation while providing assistance to families

✨ Key Features

πŸ€– AI-Powered Matching

  • ChatGPT Integration: Intelligent compatibility analysis using OpenAI GPT-4o
  • Smart Algorithms: Considers location, preferences, skills, and lifestyle compatibility
  • Compatibility Scoring: Detailed match scores with explanations

πŸ‘₯ User Management

  • Dual User Types: Separate onboarding flows for hosts and students
  • Custom User Roles: WordPress integration with custom capabilities
  • Profile Management: Comprehensive profile systems for both user types

πŸ’¬ Communication System

  • Private Messaging: Secure messaging between matched users
  • Real-time Notifications: Email and in-app notifications
  • Message History: Complete conversation tracking
  • Admin Oversight: Full admin visibility of all communications

πŸ’³ Payment Processing

  • Stripe Integration: Secure payment processing for background checks
  • Background Check Services: Integration ready for Checkr API
  • Invoice Generation: Automated billing and receipts
  • Webhook Support: Real-time payment status updates

πŸ“± Modern Interface

  • Responsive Design: Mobile-first approach with Tailwind CSS styling
  • Multi-step Forms: Beautiful onboarding experience
  • Interactive Dashboards: Comprehensive user dashboards
  • Admin Panel: Full-featured WordPress admin integration

πŸš€ Installation

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • MySQL 5.7+
  • SSL Certificate (required for payments)

Quick Install

  1. Download the plugin files
  2. Upload to /wp-content/plugins/room2exchange/
  3. Activate through WordPress admin
  4. Configure API keys in Settings
  5. Create your first host family or student profile

Manual Installation

# Clone or download the plugin
cd /path/to/wordpress/wp-content/plugins/
# Upload room2exchange folder
# Activate in WordPress admin

βš™οΈ Configuration

Required API Keys

OpenAI API (Required for Matching)

  1. Get API key from OpenRouter
  2. Add to Room2Exchange Settings
  3. Choose model (GPT-4o recommended)

Stripe API (Required for Payments)

  1. Create account at Stripe
  2. Get Secret and Publishable keys
  3. Configure webhook endpoint
  4. Add keys to plugin settings

Checkr API (Optional - Future Feature)

  • Background check integration
  • Currently placeholder for future development

WordPress Pages

The plugin automatically creates these pages:

  • /host-onboarding/ - Host family registration
  • /student-onboarding/ - Student registration
  • /host-dashboard/ - Host family dashboard
  • /student-dashboard/ - Student dashboard

πŸ—οΈ Architecture

File Structure

room2exchange/
β”œβ”€β”€ room2exchange.php          # Main plugin file
β”œβ”€β”€ includes/                  # Core functionality
β”‚   β”œβ”€β”€ class-database.php     # Database operations
β”‚   β”œβ”€β”€ class-user-roles.php   # User management
β”‚   β”œβ”€β”€ class-matching-engine.php # AI matching
β”‚   β”œβ”€β”€ class-payment-handler.php # Stripe integration
β”‚   └── class-messaging-system.php # Communications
β”œβ”€β”€ admin/                     # Admin interface
β”‚   β”œβ”€β”€ class-admin.php        # Admin functionality
β”‚   β”œβ”€β”€ admin-dashboard.php    # Admin dashboard
β”‚   └── settings.php           # Settings page
β”œβ”€β”€ public/                    # Frontend functionality
β”‚   └── class-public.php       # Public-facing features
β”œβ”€β”€ templates/                 # Page templates
β”‚   β”œβ”€β”€ host-onboarding-form.php
β”‚   β”œβ”€β”€ student-onboarding-form.php
β”‚   β”œβ”€β”€ host-dashboard.php
β”‚   └── student-dashboard.php
└── assets/                    # Static assets
    β”œβ”€β”€ css/                   # Stylesheets
    └── js/                    # JavaScript files

Database Schema

Custom Tables

  • r2e_matches - Match relationships and status
  • r2e_messages - Private messaging system
  • r2e_background_checks - Background check records
  • r2e_user_preferences - User profile data

WordPress Integration

  • Custom user roles: r2e_host_family, r2e_student
  • Custom capabilities for access control
  • WordPress user meta for basic information

🎯 Usage Guide

For Host Families

Registration Process

  1. Visit /host-onboarding/
  2. Complete 4-step registration:
    • Basic Information
    • Location Details
    • Accommodation Description
    • Family Preferences
  3. Automatic redirect to dashboard

Dashboard Features

  • Matches: View compatible students
  • Messages: Communicate with potential matches
  • Profile: Update family information
  • Background Check: Request verification services
  • Settings: Account preferences

For Students

Registration Process

  1. Visit /student-onboarding/
  2. Complete 4-step registration:
    • Basic Information
    • Education Background
    • Preferences & Skills
    • Personal Details
  3. Automatic redirect to dashboard

Dashboard Features

  • Host Families: Browse compatible families
  • Messages: Communicate with hosts
  • Profile: Update personal information
  • Settings: Account preferences

For Administrators

Admin Dashboard

  • User management (hosts and students)
  • Match oversight and statistics
  • Message monitoring
  • Payment tracking
  • System configuration

Key Admin Functions

  • View all user profiles
  • Monitor match success rates
  • Access all private messages
  • Export user data
  • Configure API integrations

πŸ”§ Customization

Matching Algorithm

The AI matching system can be customized through:

  • Model selection (GPT-4o, GPT-3.5, Claude)
  • Minimum match score thresholds
  • Maximum matches per user
  • Custom matching criteria

Styling

  • Built with modern CSS variables
  • Tailwind CSS integration
  • Responsive design patterns
  • Dark mode support ready

Hooks and Filters

// Customize matching criteria
add_filter('r2e_matching_criteria', 'custom_matching_logic');

// Modify user registration
add_action('r2e_user_registered', 'custom_registration_handler');

// Custom email notifications
add_filter('r2e_notification_email', 'custom_email_template');

πŸ”’ Security Features

Data Protection

  • Nonce verification for all forms
  • SQL injection prevention
  • XSS protection
  • Capability-based access control

Privacy Controls

  • User data encryption
  • Secure API key storage
  • GDPR compliance ready
  • Data retention policies

Payment Security

  • PCI DSS compliant (via Stripe)
  • Secure webhook verification
  • Encrypted payment data
  • Fraud protection

🚨 Troubleshooting

Common Issues

Matching Not Working

  • Verify OpenAI API key is configured
  • Check API key permissions
  • Ensure sufficient API credits

Payment Failures

  • Confirm Stripe keys are correct
  • Verify webhook endpoint is accessible
  • Check SSL certificate validity

Form Submission Errors

  • Enable WordPress debug logging
  • Check PHP error logs
  • Verify nonce validation

Debug Mode

// Add to wp-config.php for debugging
define('R2E_DEBUG', true);
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

πŸ“Š Performance

Optimization Features

  • Database query optimization
  • AJAX-powered interfaces
  • Lazy loading for large datasets
  • Caching-friendly architecture

Recommended Hosting

  • WordPress-optimized hosting
  • PHP 8.0+ for best performance
  • MySQL 8.0+ recommended
  • SSL certificate required

πŸ”„ Updates & Maintenance

Version Control

  • Semantic versioning (1.0.0)
  • Database migration system
  • Backward compatibility
  • Automatic updates ready

Maintenance Tasks

  • Regular database cleanup
  • API key rotation
  • Security updates
  • Performance monitoring

🀝 Contributing

Development Setup

  1. Clone repository
  2. Install WordPress locally
  3. Configure development environment
  4. Set up API keys for testing

Code Standards

  • WordPress Coding Standards
  • PHP 7.4+ compatibility
  • Modern JavaScript (ES6+)
  • Responsive CSS practices

πŸ“„ License

This plugin is licensed under the GPL v2 or later.

πŸ‘¨β€πŸ’» Author

Jeremiah Castillo
Company: Kre8ivTech, LLC
Website: https://www.kre8ivtech.com

πŸ†˜ Support

For support and questions:

πŸ—ΊοΈ Roadmap

Version 1.1 (Planned)

  • Checkr API integration for background checks
  • Advanced search and filtering
  • Mobile app companion
  • Multi-language support

Version 1.2 (Future)

  • Video calling integration
  • Calendar scheduling system
  • Review and rating system
  • Advanced analytics dashboard

Version 2.0 (Long-term)

  • Multi-tenant support
  • White-label solutions
  • API for third-party integrations
  • Machine learning improvements

πŸ“ˆ Analytics & Reporting

Built-in Analytics

  • User registration trends
  • Match success rates
  • Message activity
  • Payment processing stats
  • Geographic distribution

Export Capabilities

  • CSV export for all data types
  • User profile exports
  • Match history reports
  • Financial transaction reports

🌐 Internationalization

Current Status

  • English (US) - Complete
  • Translation ready
  • RTL support prepared

Adding Translations

  1. Use WordPress translation tools
  2. Text domain: room2exchange
  3. POT file generation ready
  4. Community translations welcome

Room2Exchange - Connecting families and students through intelligent matching and secure communication.

Built with ❀️ by Kre8ivTech, LLC

About

Built by https://www.blackbox.ai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors