[go: up one dir, main page]

Skip to content

Job-Pairs is an online tool, designed to help university graduates to successfully (re-)enter the labor market.

License

Notifications You must be signed in to change notification settings

scify/Mentorship-matching-backend

Repository files navigation

Mentorship matching backend platform

This Laravel application is a platform backoffice that manages the matching process between mentors with mentees, based on their preferences and skills.

Table of Contents

First time install

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

Docker option (recommended)

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.

Non-Docker option

Installing dependencies (assuming apache as web server and mysql as db):

In a nutshell (assuming debian-based OS), first install the dependencies needed:

Frontend dependencies

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

Backend dependencies

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
Composer installation

Install composer globally by following the instructions here.

Apache configuration:

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.

Laravel local server

You can also test your setup by running the Laravel local server:

php artisan serve

and navigating to localhost:8000.

Setup the Database

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.

Add seed data to DB

Run php artisan db:seed in order to insert the starter data to the DB by using Laravel seeder

Building the project

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.

Compiling assets

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.

Contributing

To contribute to MyEIC Common Library, follow these steps:

  1. Fork this repository.
  2. Read the CONTRIBUTING file.
  3. Create a branch: git checkout -b <branch_name>.
  4. Make your changes and commit them: git commit -m '<commit_message>'
  5. Push to the original branch: git push origin <project_name>/<location>
  6. Create the pull request.

License

This project is open-sourced software licensed under the Apache License, Version 2.0.

Credits

Icons used in this project are made by

About

Job-Pairs is an online tool, designed to help university graduates to successfully (re-)enter the labor market.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published