First, you will need a copy of the source code, which lives in our Github repository:
git clone https://github.com/ushahidi/platform.git
Note: if you're getting set up for development, you might want to fork the repository first.
Once you have the code, the next step is to prepare a web server.
- Vagrant*
- VirtualBox*
- Composer
- PHP >= 5.6
*Windows users_may be required to _Enable VT-X (Intel Virtualization Technology) in the computer's bios settings, disable Hyper-V on program and features page in the _control panel, and install the VirtualBox Extension Pack (installation instructions here)
First up we need to install the PHP dependencies
cd platform
composer install
If you get an error about "The requested PHP extension ... is missing from your system" you might need to run_composer install --ignore-platform-reqs_instead. You generally won't need all the PHP extensions on your host machine as they're installed in the vagrant box instead.
Then you can bring up the vagrant server and provision it:
vagrant up && vagrant provision
Our vagrant box is built on Laravel's Homestead, a pre-packaged Vagrant box that provides you with a pre-built development environment. Homestead includes the Nginx web server, PHP 7.1, MySQL, Postgres, Redis, Memcached, Node, and all of the other goodies you might need.
If you see errors about "Vagrant was unable to mount VirtualBox shared folders...", try upgrading VirtualBox or edit Homestead.yaml and change the folders to NFS as shown below, then re-run "vagrant" up.
-
map: "./"
to: /vagrant
type: "nfs"
-
map: "./"
to: /home/vagrant/Code/platform-api
type: "nfs"
At this point you should have a running web server but your deployment isn't set up yet. We still need to configure the database and run migrations.
cp .env.example .env
composer migrate
Go to 192.168.33.110 to check the API is up and running. You should see some JSON with an API version, endpoints and user info.
First, you will need a copy of the source code, which lives in our Github repository:
git clone https://github.com/ushahidi/platform-client.git
The latest install instructions for the client are always in the README. If you have any trouble check those instructions first.
First you'll need nodejs or io.js installed, npm takes care of the rest of our dependencies.
- nodejs >= v4.0
-
Clone the repo
git clone https://github.com/ushahidi/platform-client.git
Note: if you're getting set up for development, you might want to fork the repository first.
-
Navigate to project root
cd platform-client
-
Install Build Requirements
npm install -g gulp
-
Install Packages
npm install
-
Set up build options. Create a
.env
file, you'll need to pointBACKEND_URL
at an instance of the platform api (If you followed the vagrant instructions above that'll be: http://192.168.33.110)BACKEND_URL=http://192.168.33.110
-
Run gulp
gulp
-
You should now have a local development server running on http://localhost:3000/
The default install creates a user admin with password admin. Once logged in this user can create further user accounts or give others admin permissions too.