Skip to content
johnenrick edited this page Jul 7, 2020 · 4 revisions

Welcome to the vergepos-api-gateway wiki!

VergePOS is composed of two projects, one for the backend(this repo), and one for the front end. You need to set up both in your machine.

Before Cloning

If you have xampp or apache, make sure to use the following folder structure:

  • htdocs <- server root folder
    • vergepos
      • api -
        • vergepos-api-gateway - this repo
      • app
        • vergepos-app - the frontend app repo

If you are not using xampp or apache, you need to modify a file in the frontend app to change the backend path and the services in the database

Setting Up the Backend

Prerequisite

Before proceeding to installation, you must install PHP Composer

Steps

Also make sure to copy env_example and rename it to .env. Then change the database configuration. Note: if you dont find the env_example, it is probably hidden by your IDE because it has no extension.

Before installing, make sure to clone the submodules `git submodule update --init --recursive

This project uses Laravel framework. Follow the steps for the basic installation:

  1. composer install
  2. composer dump-autoload
  3. composer update
  4. php artisan key:generate
  5. php artisan vendor:publish --provider="Barryvdh\Cors\ServiceProvider"
  6. php artisan jwt:secret
  7. php artisan config:cache
  8. php artisan migrate
  9. php artisan db:seed
  10. php artisan db:seed --class=ServiceRestore

Setting up the FrontEnd

Prerequisite

Make sure to install npm.

Steps

The front end app uses VueJS. Follow the steps for the basic installation:

  1. npm install
  2. npm run serve for running the local server

Notes

Both frontend and backend have submodules(a git repo inside a git repo). Whenever you need to update the submodule, use the following command: git pull --recurse-submodules

Clone this wiki locally