Skip to content

rusp-odoo/skillswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Skill Swap Platform

A modern skill exchange platform built with PHP, MySQL, and Tailwind CSS. Connect with people around the world to learn and teach skills through mutual exchanges.

πŸš€ Features

  • User Authentication: Secure registration and login system
  • Skill Listings: Create and manage skill offerings and requests
  • Exchange Management: Request, accept, and manage skill exchanges
  • Search & Filter: Advanced search functionality with multiple filters
  • User Profiles: Complete user profiles with ratings and reviews
  • Responsive Design: Mobile-first design with Tailwind CSS
  • Real-time Notifications: Stay updated with exchange requests and updates
  • File Upload: Avatar and document upload functionality
  • Pagination: Efficient data loading with pagination
  • Security: XSS protection, SQL injection prevention, and secure sessions

πŸ› οΈ Technology Stack

  • Frontend: HTML5, CSS3, JavaScript, Tailwind CSS
  • Backend: PHP 7.4+, MySQLi
  • Database: MySQL 5.7+
  • Server: Apache (XAMPP/WAMP)
  • Icons: Font Awesome
  • JavaScript Framework: Alpine.js (for dropdowns)

πŸ“‹ Requirements

  • PHP 7.4 or higher
  • MySQL 5.7 or higher
  • Apache web server
  • XAMPP, WAMP, or similar local development environment
  • Modern web browser

πŸš€ Installation

1. Clone or Download the Project

# If using Git
git clone <repository-url>
cd skill-swap-php

# Or download and extract the ZIP file

2. Set Up XAMPP

  1. Download and install XAMPP
  2. Start Apache and MySQL services
  3. Place the project folder in htdocs directory

3. Create Database

  1. Open phpMyAdmin (http://localhost/phpmyadmin)
  2. Create a new database named skill_swap
  3. Import the database schema:
    • Go to the Import tab
    • Select the file database/schema.sql
    • Click Go to import

4. Configure Database Connection

  1. Open config/database.php
  2. Update the database credentials if needed:
    define('DB_HOST', 'localhost');
    define('DB_USERNAME', 'root');
    define('DB_PASSWORD', '');
    define('DB_NAME', 'skill_swap');

5. Configure Site URL

  1. Open config/constants.php
  2. Update the site URL:
    define('SITE_URL', 'http://localhost/skill-swap-php');

6. Set File Permissions

Ensure the following directories are writable:

  • uploads/
  • assets/images/avatars/
  • logs/
  • cache/

7. Access the Application

Open your browser and navigate to:

http://localhost/skill-swap-php

πŸ“ Project Structure

skill-swap-php/
β”œβ”€β”€ config/                 # Configuration files
β”‚   β”œβ”€β”€ database.php       # Database connection
β”‚   └── constants.php      # Application constants
β”œβ”€β”€ includes/              # Core PHP files
β”‚   β”œβ”€β”€ functions.php      # All backend functions
β”‚   β”œβ”€β”€ header.php         # Common header
β”‚   └── footer.php         # Common footer
β”œβ”€β”€ pages/                 # Page files
β”‚   β”œβ”€β”€ auth/              # Authentication pages
β”‚   β”œβ”€β”€ dashboard/         # User dashboard
β”‚   β”œβ”€β”€ skills/            # Skill management
β”‚   β”œβ”€β”€ exchanges/         # Exchange management
β”‚   └── static/            # Static pages
β”œβ”€β”€ assets/                # Frontend assets
β”‚   β”œβ”€β”€ css/              # Stylesheets
β”‚   β”œβ”€β”€ js/               # JavaScript files
β”‚   └── images/           # Images and icons
β”œβ”€β”€ uploads/               # User uploads
β”œβ”€β”€ database/              # Database files
β”‚   └── schema.sql        # Database schema
β”œβ”€β”€ api/                   # API endpoints
β”œβ”€β”€ logs/                  # Application logs
β”œβ”€β”€ cache/                 # Cache files
β”œβ”€β”€ index.php             # Homepage
└── .htaccess             # Apache configuration

πŸ”§ Configuration

Database Configuration

Edit config/database.php to match your database settings:

define('DB_HOST', 'localhost');
define('DB_USERNAME', 'your_username');
define('DB_PASSWORD', 'your_password');
define('DB_NAME', 'skill_swap');

Application Settings

Edit config/constants.php to customize:

  • Site name and description
  • File upload limits
  • Session settings
  • Email configuration
  • Skill categories and levels

Security Settings

The application includes several security features:

  • Password hashing with password_hash()
  • SQL injection prevention with prepared statements
  • XSS protection with htmlspecialchars()
  • CSRF protection (implement in forms)
  • Session security

🎨 Customization

Styling

  • Edit assets/css/style.css for custom styles
  • Modify Tailwind configuration in includes/header.php
  • Update color schemes in the constants file

Adding New Features

  1. New Pages: Create PHP files in the appropriate pages/ subdirectory
  2. New Functions: Add functions to includes/functions.php
  3. Database Changes: Update database/schema.sql and run migrations
  4. API Endpoints: Create new files in the api/ directory

Extending Functionality

The modular structure makes it easy to extend:

  • Add new skill categories in config/constants.php
  • Create new exchange statuses
  • Implement additional user roles
  • Add new notification types

πŸ”’ Security Features

  • Input Validation: Server-side validation for all user inputs
  • SQL Injection Prevention: Using prepared statements
  • XSS Protection: Output escaping with htmlspecialchars()
  • Password Security: Bcrypt hashing with password_hash()
  • Session Management: Secure session handling
  • File Upload Security: Type and size validation
  • CSRF Protection: Token-based protection (implement in forms)

πŸ“± Responsive Design

The application is built with a mobile-first approach using Tailwind CSS:

  • Responsive navigation
  • Mobile-optimized forms
  • Touch-friendly interfaces
  • Adaptive layouts for all screen sizes

πŸš€ Performance Optimization

  • Database Indexing: Optimized queries with proper indexes
  • Caching: File-based caching system
  • Image Optimization: Compressed and optimized images
  • Minification: CSS and JS minification (implement in production)
  • CDN Integration: Ready for CDN deployment

πŸ› Troubleshooting

Common Issues

  1. Database Connection Error

    • Check database credentials in config/database.php
    • Ensure MySQL service is running
    • Verify database exists
  2. File Upload Issues

    • Check directory permissions
    • Verify PHP upload settings
    • Check file size limits
  3. 404 Errors

    • Ensure Apache mod_rewrite is enabled
    • Check .htaccess file is present
    • Verify file paths are correct
  4. Session Issues

    • Check PHP session configuration
    • Verify session directory permissions
    • Clear browser cookies

Debug Mode

To enable debug mode, edit config/constants.php:

define('DEBUG_MODE', true);

πŸ“„ License

This project is open source and available under the MIT License.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Check the documentation
  • Review the troubleshooting section

πŸ”„ Updates

To update the application:

  1. Backup your database and files
  2. Download the latest version
  3. Replace files (except config and uploads)
  4. Run any database migrations
  5. Test the application

πŸ“Š Database Schema

The application uses the following main tables:

  • users - User accounts and profiles
  • skill_listings - Skill offerings and requests
  • listing_skills - Individual skills within listings
  • exchanges - Skill exchange requests and status
  • notifications - User notifications
  • user_sessions - Session management
  • system_settings - Application configuration

🎯 Roadmap

Future features planned:

  • Real-time messaging
  • Video call integration
  • Mobile app
  • Advanced analytics
  • Payment integration
  • Multi-language support
  • Advanced search filters
  • Social media integration

Built with ❀️ using PHP, MySQL, and Tailwind CSS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published