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.
- 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
- 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)
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Apache web server
- XAMPP, WAMP, or similar local development environment
- Modern web browser
# If using Git
git clone <repository-url>
cd skill-swap-php
# Or download and extract the ZIP file
- Download and install XAMPP
- Start Apache and MySQL services
- Place the project folder in
htdocs
directory
- Open phpMyAdmin (http://localhost/phpmyadmin)
- Create a new database named
skill_swap
- Import the database schema:
- Go to the
Import
tab - Select the file
database/schema.sql
- Click
Go
to import
- Go to the
- Open
config/database.php
- Update the database credentials if needed:
define('DB_HOST', 'localhost'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', ''); define('DB_NAME', 'skill_swap');
- Open
config/constants.php
- Update the site URL:
define('SITE_URL', 'http://localhost/skill-swap-php');
Ensure the following directories are writable:
uploads/
assets/images/avatars/
logs/
cache/
Open your browser and navigate to:
http://localhost/skill-swap-php
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
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');
Edit config/constants.php
to customize:
- Site name and description
- File upload limits
- Session settings
- Email configuration
- Skill categories and levels
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
- Edit
assets/css/style.css
for custom styles - Modify Tailwind configuration in
includes/header.php
- Update color schemes in the constants file
- New Pages: Create PHP files in the appropriate
pages/
subdirectory - New Functions: Add functions to
includes/functions.php
- Database Changes: Update
database/schema.sql
and run migrations - API Endpoints: Create new files in the
api/
directory
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
- 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)
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
- 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
-
Database Connection Error
- Check database credentials in
config/database.php
- Ensure MySQL service is running
- Verify database exists
- Check database credentials in
-
File Upload Issues
- Check directory permissions
- Verify PHP upload settings
- Check file size limits
-
404 Errors
- Ensure Apache mod_rewrite is enabled
- Check
.htaccess
file is present - Verify file paths are correct
-
Session Issues
- Check PHP session configuration
- Verify session directory permissions
- Clear browser cookies
To enable debug mode, edit config/constants.php
:
define('DEBUG_MODE', true);
This project is open source and available under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For support and questions:
- Create an issue in the repository
- Check the documentation
- Review the troubleshooting section
To update the application:
- Backup your database and files
- Download the latest version
- Replace files (except config and uploads)
- Run any database migrations
- Test the application
The application uses the following main tables:
users
- User accounts and profilesskill_listings
- Skill offerings and requestslisting_skills
- Individual skills within listingsexchanges
- Skill exchange requests and statusnotifications
- User notificationsuser_sessions
- Session managementsystem_settings
- Application configuration
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