This Laravel application is a platform backoffice that manages the matching process between mentors with mentees, based on their preferences and skills.
- First time install
- Setup the Database
- Add seed data to DB
- Building the project
- Compiling assets
- Contributing
- License
- Credits
After cloning the project, create an .env
file (should be a copy of .env.example
),
containing the information about your database name and credentials.
cp .env.example .env
You can use the docker-compose.yml
file that exists at project root, to quickly set up a docker container.
To build the docker container, run:
docker compose build
And then run
docker compose up
To fire up the container.
Then, you can enter the container by running
docker exec -it mentorship_matching_platform_server bash
And from there, you can run all the php artisan
, composer
, and npm
commands.
In a nutshell (assuming debian-based OS), first install the dependencies needed:
Note: Please install the node and npm versions as listed below:
$ node -v
v14.21.3
$ npm -v
6.14.18
If using NVM, you can install the correct versions by running:
nvm use # reads the .nvmrc file and installs the correct node and npm versions
Note: php package installs apache2 as a dependency so we have no need to add it manually.
sudo aptitude install php7.4 php7.4-cli mcrypt php7.4-mcrypt mysql-server php7.4-mysql
Install composer globally by following the instructions here.
Edit the /etc/apache2/sites-available/mentorhsip-matching.conf
so that it looks like:
<VirtualHost *:80>
ServerName dev.mentorhsip-matching
DocumentRoot "/path/to/Mentorship-matching-backend/public"
<Directory "/path/to/Mentorship-matching-backend/public">
AllowOverride all
</Directory>
</VirtualHost>
Make the symbolic link:
cd /etc/apache2/sites-enabled && sudo ln -s ../sites-available/mentorhsip-matching.conf
Enable mod_rewrite
and restart the server:
sudo a2enmod rewrite && sudo service apache2 restart
Fix permissions for storage directory:
sudo chown -R user:www-data storage
chmod 775 storage
cd storage/
find . -type f -exec chmod 664 {} \;
find . -type d -exec chmod 775 {} \;
Test the setup by navigating to http://dev.mentorhsip-matching
in your browser.
You can also test your setup by running the Laravel local server:
php artisan serve
and navigating to localhost:8000.
Laravel provides a simple yet powerful mechanism for creating the DB schema,
called Migrations
Simply run php artisan migrate
to create the appropriate DB schema.
Run php artisan db:seed
in order to insert the starter data to the DB by
using Laravel seeder
Download all Laravel dependencies through Composer, by running
composer install
composer update
After all Laravel dependencies have been downloaded, it's time to download all Javascript libraries and dependencies. We achieve that by using npm. Read this link in order to understand how npm should be installed.
If you prefer installing npm through homebrew or linuxbrew, read this.
So, when in project root directory, and after npm has been installed correctly, run
npm install
To download and install all libraries and dependencies.
When in project root directory, run
npm run dev
Or any other npm
script that you want to run. The available scripts are listed in the package.json
file.
To contribute to MyEIC Common Library, follow these steps:
- Fork this repository.
- Read the CONTRIBUTING file.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
This project is open-sourced software licensed under the Apache License, Version 2.0.
Icons used in this project are made by
- Freepik from www.flaticon.com
- Vectors Market from www.flaticon.com
- Prosymbols from www.flaticon.com