Phira is a modern dating application designed to facilitate meaningful connections between users. It features real-time chat functionality, notifications, and customizable user preferences, creating an engaging and interactive experience.
- User Registration and Authentication: Secure login system with email verification.
- Matching Algorithm: Matches users based on their preferences and interactions.
- Real-Time Chat: Instant messaging using WebSockets.
- Notifications System: Notifications like new matches, messages, and updates using WebSockets.
- User Profiles:
- Detailed profiles with photos, bio, and preferences.
- Editable user information.
- Activity Logs: Users can view recent activities, including likes and interactions.
To run the Phira Dating App, ensure the following requirements are met:
- Operating System: Windows, Linux, or macOS
- WAMP Server: Version 3.3 or later (for Windows users)
- PHP: Version 8.3 or later
- MySQL: Version 8.3 or later
-
Install WAMP Server (Windows Only)
- Download the WAMP server.
- Install WAMP and ensure Apache and MySQL services are running.
-
Clone the repository to the
wamp64/wwwdirectory:git clone https://github.com/Sandakan/Phira.git
-
Install dependencies for the web server and WebSocket server:
composer install
-
Configure the environment variables in config.php file:
<?php define('BASE_URL', 'http://localhost:80/Phira'); // Base url of the application define('ROOT_DIR', dirname(__FILE__)); // Root directory of the application $BASE_URL = BASE_URL; // Database credentials define('DATABASE_HOST_NAME', 'localhost'); define('DATABASE_USERNAME', 'root'); define('DATABASE_PASSWORD', ''); define('DATABASE_NAME', 'PhiraDB'); // Mail credentials define('MAIL_HOST', '__YOUR_MAIL_HOST__'); // e.g., 'smtp.gmail.com' define('MAIL_PORT', 587); define('MAIL_USERNAME', '__YOUR_MAIL_USERNAME__'); // e.g., 'info@phira' define('MAIL_PASSWORD', '__YOUR_MAIL_PASSWORD__'); // e.g., 'password' define('MAIL_ENCRYPTION', 'tls');
-
Initialize the database by installing the provided SQL scripts.
- Run the database.sql file to create the database schema.
- Run the seeds.database.sql file to insert sample data into the database.
- User seed password:
12345678
- User seed password:
-
Create the following folders in the Phira project root to save the private data.
Phira |----- private | |---- media | |---- user_photos | |---- chats -
Start the WebSocket server by opening the websocket.server.php file in a new browser tab:
-
Navigate to the default WAMP server URL in your browser to access the Phira Dating App.
http://localhost:80/Phira/index.php
- Backend: PHP
- Frontend: HTML, CSS, JavaScript
- Database: MySQL
- Real-Time Communication: WebSockets
- Other Libraries:
React\EventLoopfor asynchronous operations.Ratchetfor WebSocket handling.
- The WebSocket server powers real-time chat and notifications. Ensure it is running.
- Notifications are implemented using WebSockets. Configure your server to support real-time updates.
- Frontend: Handles user interaction and WebSocket connections.
- Backend: PHP for data handling and WebSocket server for real-time communication.
- Database: Relational structure with tables for users, chats, messages, and notifications.
This project is licensed under the MIT License.
