Flex | WE4B Project in third year at UTBM.
Before you begin, ensure you have the following software installed on your system:
- Node.js and npm
- Angular CLI - version 13.3.3
- PHP
- Composer (Optional)
- MySQL Server running on the default port 3306
-
Clone the Repository
git clone https://github.com/hugoallaine/WE4B_Project
cd WE4B_Project
-
Install PHP Dependencies You have two options to install the PHP dependencies:
- Download the vendor archive
- Unzip it and place it in the
php
folder inside thebackend
folder. The structure should look like this:backend/php/vendor
- Navigate to the
backend/php
directory and run the following command:cd backend/php composer update
-
Install Angular Dependencies
- Navigate to the
angular-app
folder and run the following commands:cd angular-app npm install ng serve
- This will start the Angular development server. By default, it runs at
http://localhost:4200
.
- Navigate to the
-
Launch PHP Server
- Open another terminal and navigate to the
backend/php
directory:cd backend/php php -S localhost:8000
- This will start the PHP server at
http://localhost:8000
.
- Open another terminal and navigate to the
-
Set Up MySQL Database
-
Ensure your MySQL server is running on the default port 3306.
-
Download the database SQL file from this link.
-
Import the SQL file into your MySQL database using a tool like phpMyAdmin or the MySQL command line:
mysql -u your_username -p your_database_name < path_to_sql_file.sql
-
Important: Ensure you set up a MySQL user with the appropriate privileges to access the database.
-
Create a
backend/private.json
file with your credentials as follows (don't use localhost for db_host, it may not work):{ "mailserver": "mail.server.com", "SMTP_port": 465, "SMTP_user": "[email protected]", "SMTP_password": "smpt_password", "SMTP_noreply": "[email protected]", "db_host": "127.0.0.1", "db_user": "your_username", "db_password": "your_password", "db_name": "your_database_name", "SPOTIFY_CLIENT_ID": "your_spotify_client_id", "SPOTIFY_CLIENT_SECRET": "your_spotify_client_secret", "tmdb_api_key": "your_tmdb_api_key" }
-
-
Configure
php.ini
- The
php.ini
file is usually located in the PHP installation directory, such asC:\php\php.ini
orC:\Program Files\php\php.ini
. - Open your
php.ini
file and ensure the following line is uncommented (remove the leading;
if present):extension=gd
- The
php.ini
file is typically located in/etc/php/php.ini
. - Open your
php.ini
file and ensure the following lines are uncommented (remove the leading;
if present):extension=gd extension=iconv extension=mysqli extension=pdo_mysql
- Additionally, you may need to install the
php-gd
package. On Debian-based distributions (such as Ubuntu) and Arch-based distributions, you can install it using the package manager:sudo apt-get install php-gd # For Debian-based distributions sudo pacman -S php-gd # For Arch-based distributions
- The
-
User Verification Without SMTP Server
- If you do not have an SMTP server set up, you can manually verify users by changing the value of the
isverified
column to1
in theuser
table of the database.
- If you do not have an SMTP server set up, you can manually verify users by changing the value of the
- Ensure your file structure matches the expected layout:
├── angular-app/ │ ├── src/ │ ├── ... ├── backend/ │ ├── php/ │ │ ├── vendor/ │ │ ├── ... │ ├── private.json │ ├── ... ├── video/ ├── audio/
- Put your audio files in the
audio
folder and video files in thevideo
folder.
- Put your audio files in the
Two-factor authentication :
Sending mail using SMTP authentication :
Extract metadata from from files :