Skip to content

4x10m/coopcycle-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoopCycle

Build Status

CoopCycle is a self-hosted platform to order meals in your neighborhood and get them delivered by bike couriers. The only difference with proprietary platforms as Deliveroo or UberEats is that this software is reserved to co-ops.

The main idea is to decentralize this kind of service and to allow couriers to own the platform they are working for. In each city, couriers are encouraged to organize into co-ops, and to run their very own version of the software.

The software is under active development. If you would like to contribute we will be happy to hear from you! All instructions are in the Contribute file.

Coopcycle-web is the main repo, containing the web API, the front-end for the website and the dispatch algorithm :  Technical Overview . You can see it in action & test it here : https://demo.coopcycle.org

You can find a comprehensive list of our repos here : Our repos comprehensive list .

How to run a local instance

Prerequisites

  • Install Docker and Docker Compose.

    • On OSX : use Docker for Mac which will provide you both docker and docker-compose. It doesn't rely on Virtualbox as Docker used to.

    • On Windows : use Docker for Windows which will provide you both docker and docker-compose. Depending on your platform, Docker could be installed as Native or you have to install Docker toolbox which use VirtualBox instead of Hyper-V causing a lot a differences in implementations. If you hace the luck to have a CPU that support native Dockern you can share your hard disk as a virtual volume for your appliances.

    You will need to download openssl for generating certificates. http://gnuwin32.sourceforge.net/packages/openssl.htm The make script suppose that both are found in your Path environment variable.

    • On Linux : follow the instructions for your distribution. docker-compose binary is to be installed independently. You can use Coopcycle without root privileges, to do so run sudo usermod -aG docker your-user (will add you to the docker group).
  • Get a Google Map API Key and copy it. You will be asked for it when running make install.

  • Create a Stripe account and copy your tests credentials. You will be asked for them when running make install.

  • Run the install scripts - when asked for app/config/parameters.yml parameters please enter your Google (google_api_key) and Stripe test (stripe_secret_key and stripe_publishable_key) credentials, for others you can keep defaults.

make install
-On Windows: run `powershell make.ps1` in powershell.

Run the application

  • Start the Docker containers
docker-compose up
  • Open the platform in your browser
open http://localhost

Testing

  • Create the test database
docker-compose run php bin/console doctrine:schema:create --env=test
  • Launch the PHPUnit tests
make phpunit
  • Launch the Behat tests
make behat
  • Launch the Mocha tests
make mocha

Running migrations

When pulling change from the remote, the database models may have changed. To apply the changes, you will need to run a database migration.

make migrations-migrate

License

The code is licensed under the Peer Production License, meaning you can use this software provided:

  • You are a worker-owned business or worker-owned collective
  • All financial gain, surplus, profits and benefits produced by the business or collective are distributed among the worker-owners

About

Open source logistics platform. Only for worker-owned business.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 66.2%
  • JavaScript 14.3%
  • HTML 12.7%
  • CSS 4.5%
  • Gherkin 1.9%
  • Shell 0.2%
  • Other 0.2%