coopcycle-web
Logistics & marketplace platform. Only for worker-owned business.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Logistics & marketplace platform. Only for worker-owned business.
Basic Info
- Host: GitHub
- Owner: coopcycle
- License: other
- Language: PHP
- Default Branch: master
- Homepage: https://coopcycle.org
- Size: 82.9 MB
Statistics
- Stars: 581
- Watchers: 27
- Forks: 132
- Open Issues: 486
- Releases: 437
Topics
Metadata Files
README.md
CoopCycle
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
Please find below the steps to install the platform locally. You can find additional tips & configurations in the wiki.
Prerequisites
Install Docker and Docker Compose.
OSX
Use Docker for Mac which will provide you both docker and docker-compose.
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 have the luck to have a CPU that supports native Docker you can share your hard disk as a virtual volume for your appliances.
Docker doesn't work under Windows, you need to install linux in hypervisualization. Follow the recommendations here to activate the necessary features under windows 11 and make sure you have an administrator account https://docs.docker.com/desktop/troubleshoot/topics/
Download docker https://www.docker.com/products/docker-desktop/ Check in the BIOS that : -hypervisualization (HYPER-V) -Data Execution Prevention (DEP). You can also use the following procedure for DEP: Windows + r Search for sysdm.cpl Advanced system settings In Performance, select settings data execution prevention "enable for all except those I select...". click on apply
install, from your PowerShell WSL 2 terminal https://learn.microsoft.com/en-us/windows/wsl/install
configure your WSL 2 environment by creating a Linux administrator account. The password is not displayed (this is normal), so remember it. https://learn.microsoft.com/fr-fr/windows/wsl/setup/environment#file-storage
Linux
Follow the instructions for your distribution. docker-compose binary is to be installed independently.
Make sure:
- to install docker-compose following instructions to get the latest version.
- to follow the post-installation steps.
Setup OpenStreetMap geocoders (optional)
CoopCycle uses OpenStreetMap to geocode addresses and provide autocomplete features.
Address autocomplete
To configure address autocomplete, choose a provider below, grab the credentials, and configure environment variables accordingly.
LOCATIONIQ_ACCESS_TOKEN
GEOCODE_EARTH_API_KEY
- For Geocode Earth, set
COOPCYCLE_AUTOCOMPLETE_ADAPTER=geocode-earth - For LocationIQ, set
COOPCYCLE_AUTOCOMPLETE_ADAPTER=locationiq
Geocoding
To configure geocoding, create an account on OpenCage, and configure the OPENCAGE_API_KEY environement variable.
Run the application
Pull the Docker containers (optional)
We have prebuilt some images and uploaded them to Docker Hub. To avoid building those images locally, you can pull them first.
sh
docker compose pull
Populate your local .env and .env.test.local files:
sh
cp .env.dist .env
touch .env.test.local
You only need to override the desired env vars at .env.test.local, like setting your GEOCODE_EARTH_API_KEY=...
Start the Docker containers
Minimum configuration:
sh
docker compose up
With Storybook:
sh
docker compose --profile devFrontend up
With Odoo:
sh
docker compose --profile devOdoo up
At this step, the platform should be up & running, but the database is still empty.
To create the schema & initialize the platform with demo data, run:
sh
make install
Open the platform in your browser
sh
open http://localhost
Testing
Create the test database
sh
docker compose run php bin/console doctrine:schema:create --env=test
Launch the PHPUnit tests
All Tests:
sh
make phpunit
One package/test:
For example, to run only the tests in the AppBundle\Sylius\OrderProcessing folder:
sh
make phpunit ARGS="/var/www/html/tests/AppBundle/Sylius/OrderProcessing"
See more command line options here.
Launch the Behat tests
All Tests:
sh
make behat
One package/test:
To run only the tests with the @only tag:
sh
make behat-only
To run only the tests in the features/authentication.feature file:
sh
make behat ARGS="features/authentication.feature"
To only show errors in logs:
sh
make behat ARGS="features/authentication.feature --no-snippets --format progress"
See more command line options here.
Launch the Jest tests
sh
make jest
or to run only one test file:
sh
make jest ARGS="js/app/api/__tests__/util.test.js"
Launch the Cypress tests
Cypress is a JS program for end-to-end testing and integration testing of components. You will launch a server in the test environment and run cypress on your own machine.
Installation:
sh
make cypress-install
install typesense for test env (automatically done with make install or make setup)
sh
docker compose exec -T php bin/console typesense:create --env=test
In the .env file you need to set GEOCODE_EARTH_API_KEY to a valid API key. You need also Stripe configured on the platform or in the .env file (STRIPE_PUBLISHABLE_KEY, STRIPE_SECRET_KEY, STRIPE_CONNECT_CLIENT_ID).
and then this command will lead you to Cypress GUI
sh
make cypress-open
The Cypress tests will run automatically in Github CI on the master branch. You can get screenshots of the failed tests from the Upload images for failed test step (there is a link there to download the failed steps).
Run linters (phpStan)
sh
docker compose exec php php vendor/bin/phpstan analyse -v
Debugging
1. Install and enable xdebug in the php container
sh
make enable-xdebug
Note: If you've been working with this stack before you'll need to rebuild the php image for this command to work:
docker compose build php docker compose restart php nginx
2. Enable php debug in VSCode
- Install a PHP Debug extension, this is tested with felixfbecker.php-debug extension.
- Add the following configuration in your
.vscode/launch.jsonof your workspace:
json
{
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9001,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
},
"xdebugSettings": {
"max_data": 65535,
"show_hidden": 1,
"max_children": 100,
"max_depth": 5
}
}
]
}
- If you're having issues connecting the debugger yo can restart nginx and php containers to reload the xdebug extension.
sh
docker compose restart php nginx
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.
sh
make migrations-migrate
License
The code is licensed under the Coopyleft License, meaning you can use this software provided:
- You are matching with the social and common company’s criteria as define by their national law, or by the European Commission in its October 25th, 2011 communication, or by default by the Article 1 of the French law n°2014-856 of July 31st, 2014 “relative à l’économie sociale et solidaire”
- You are using a cooperative model in which workers are employees
Owner
- Name: CoopCycle
- Login: coopcycle
- Kind: organization
- Location: Paris, France
- Website: https://coopcycle.org
- Repositories: 24
- Profile: https://github.com/coopcycle
Don't speculate, cooperate ❤️
GitHub Events
Total
- Fork event: 5
- Create event: 356
- Commit comment event: 5
- Release event: 185
- Issues event: 341
- Watch event: 22
- Delete event: 159
- Issue comment event: 280
- Push event: 2,085
- Gollum event: 8
- Pull request review event: 240
- Pull request review comment event: 237
- Pull request event: 291
Last Year
- Fork event: 5
- Create event: 356
- Commit comment event: 5
- Release event: 185
- Issues event: 341
- Watch event: 22
- Delete event: 159
- Issue comment event: 280
- Push event: 2,085
- Gollum event: 8
- Pull request review event: 240
- Pull request review comment event: 237
- Pull request event: 291
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Alexandre Segura | m****k@g****m | 8,468 |
| Vladimir | 7****8 | 1,764 |
| Atala | a****e@g****m | 1,535 |
| Antoine Bagnaud | c****t@a****e | 562 |
| Lucas Ferraro | l****o@f****m | 441 |
| dependabot-preview[bot] | 2****] | 282 |
| Camille Nerriere | c****e@y****r | 196 |
| Jiří Podhorecký | j****y@g****m | 74 |
| Arnaud Masson | a****v@g****m | 70 |
| Alexandre Segura | m****x@c****g | 49 |
| Thadah D. Denyse | g****a@p****m | 28 |
| Santiago | s****o@c****p | 26 |
| Nadim Hammami | n****i@h****m | 26 |
| Pierre LHOSTE | v****e@p****m | 23 |
| Diego Calero | d****o@f****p | 20 |
| Nogara Religada | a****a@h****m | 18 |
| Elie | l****e@g****m | 18 |
| Martino Correggiari | m****i@g****m | 17 |
| AniaCuapio | a****o@g****m | 15 |
| jimakker | j****r@b****t | 13 |
| Stefano Lombardo | s****o@p****e | 13 |
| Eduardo Gómez Benavides | a****o@g****m | 13 |
| kike medina | k****n@g****m | 12 |
| Ihering Delirrage | b****s@g****m | 11 |
| Miguel Peixe | m****l@p****o | 11 |
| Pier | p****a@g****m | 11 |
| zentrale | c****a@z****l | 11 |
| Flug | f****1@g****m | 10 |
| Juan Acosta | j****a@k****m | 10 |
| andrewcunnin | a****m@e****m | 10 |
| and 89 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 2,366
- Total pull requests: 2,924
- Average time to close issues: 11 months
- Average time to close pull requests: 24 days
- Total issue authors: 120
- Total pull request authors: 52
- Average comments per issue: 1.13
- Average comments per pull request: 0.76
- Merged pull requests: 1,228
- Bot issues: 16
- Bot pull requests: 1,756
Past Year
- Issues: 249
- Pull requests: 378
- Average time to close issues: 25 days
- Average time to close pull requests: 8 days
- Issue authors: 16
- Pull request authors: 9
- Average comments per issue: 0.3
- Average comments per pull request: 0.33
- Merged pull requests: 248
- Bot issues: 0
- Bot pull requests: 38
Top Authors
Issue Authors
- alexsegura (579)
- Atala (404)
- Paul-Eraman-CoopCycle (281)
- agichim (127)
- rayon9coop (103)
- vladimir-8 (97)
- AdrienSICKLO (73)
- couleurmate (57)
- r0xsh (55)
- damienlapoitavelo (49)
- GuidoHaagen (40)
- HugoLCR (30)
- tcmjlnt (29)
- joel-shiftdelivery (27)
- lillebike (18)
Pull Request Authors
- dependabot-preview[bot] (1,089)
- dependabot[bot] (667)
- alexsegura (296)
- vladimir-8 (235)
- Atala (212)
- lucasferraro (109)
- r0xsh (78)
- coopcycle-weblate (35)
- arnomasson (34)
- CamilleNerriere (17)
- AniaCuapio (12)
- diegomanuel (11)
- Ladias-Elie (10)
- flug (9)
- biologeek (9)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 453
proxy.golang.org: github.com/coopcycle/coopcycle-web
- Documentation: https://pkg.go.dev/github.com/coopcycle/coopcycle-web#section-documentation
- License: other
-
Latest release: v3.42.3+incompatible
published 9 months ago
Rankings
Dependencies
- @babel/core ^7.10.4 development
- @babel/preset-env ^7.10.4 development
- babel-jest ^26.1.0 development
- jest ^26.1.0 development
- @reduxjs/toolkit ^1.5.0
- color-hash ^2.0.1
- lodash ^4.17.15
- moment ^2.29.0
- moment-range ^4.0.2
- redux ^4.0.5
- redux-actions ^2.6.5
- reselect ^4.0.0
- 1604 dependencies
- @ant-design/compatible ^1.1.0 development
- @ant-design/icons ^4.7.0 development
- @babel/plugin-proposal-object-rest-spread ^7.17.3 development
- @babel/preset-react ^7.16.7 development
- @babel/register ^7.17.7 development
- @cubejs-client/core ^0.26.102 development
- @cubejs-client/react ^0.26.102 development
- @mapbox/polyline ^1.1.0 development
- @reduxjs/toolkit ^1.7.2 development
- @release-notes/changelog-parser ^0.1.2 development
- @stripe/react-stripe-js ^1.7.0 development
- @stripe/stripe-js ^1.22.0 development
- @symfony/webpack-encore ^1.1.2 development
- algoliasearch ^4.13.0 development
- antd ^4.20.2 development
- autoprefixer ^10.4.7 development
- axios ^0.25.0 development
- babel-eslint ^10.0.3 development
- babel-jest ^26.6.3 development
- babel-plugin-import ^1.13.5 development
- beautifymarker ^1.0.9 development
- bootstrap-sass ^3.4.3 development
- centrifuge ^2.8.4 development
- chai ^4.3.6 development
- chart.js ^3.7.1 development
- chroma-js ^2.4.2 development
- classnames ^2.3.1 development
- cleave.js ^1.6.0 development
- clipboard ^2.0.11 development
- codemirror ^5.65.3 development
- color-hash ^2.0.1 development
- compare-versions ^3.6.0 development
- core-js ^3.23.0 development
- cropperjs ^1.5.12 development
- croppie ^2.6.5 development
- cypress ^6.9.1 development
- database-cleaner ^1.3.0 development
- date-holidays ^3.14.10 development
- dropzone ^5.9.3 development
- eslint ^7.32.0 development
- eslint-plugin-jest ^24.7.0 development
- eslint-plugin-react ^7.29.4 development
- eslint-webpack-plugin ^2.6.0 development
- font-awesome ^4.7.0 development
- fontawesome-markers ^4.6.1 development
- formik ^2.2.9 development
- fuse.js ^3.4.5 development
- gasparesganga-jquery-loading-overlay ^2.1.7 development
- howler ^2.2.3 development
- html-loader ^2.1.2 development
- i18next ^19.9.2 development
- i18next-browser-languagedetector ^6.1.4 development
- inputmask ^5.0.7 development
- jest ^26.6.3 development
- jquery ^3.6.0 development
- js-cookie ^2.2.1 development
- js-yaml ^4.1.0 development
- json-loader ^0.5.7 development
- leaflet ^1.7.1 development
- leaflet-area-select ^1.0.5 development
- leaflet-polylinedecorator ^1.6.0 development
- leaflet-providers ^1.13.0 development
- leaflet-swoopy ^3.4.1 development
- leaflet.markercluster ^1.5.3 development
- less ^4.1.2 development
- less-loader ^10.0.0 development
- libphonenumber-js ^1.9.53 development
- locutus ^2.0.16 development
- lottie-web ^5.9.4 development
- micromodal ^0.4.10 development
- moment ^2.29.3 development
- moment-range ^4.0.2 development
- moment-timezone ^0.5.34 development
- ngeohash ^0.6.3 development
- numbro ^2.3.6 development
- object-hash ^2.2.0 development
- payment-icons ^1.2.1 development
- postcss-loader ^6.0.0 development
- prismjs ^1.28.0 development
- prop-types ^15.8.1 development
- qs ^6.10.3 development
- react ^16.14.0 development
- react-accessible-accordion ^3.3.5 development
- react-autosuggest ^10.1.0 development
- react-beautiful-dnd ^13.1.0 development
- react-chartjs-2 ~3.3.0 development
- react-color ^2.19.3 development
- react-contexify ^5.0.0 development
- react-cropper ^2.1.8 development
- react-dom ^16.14.0 development
- react-dropzone ^11.5.3 development
- react-i18next ^11.16.8 development
- react-markdown ^8.0.3 development
- react-modal ^3.15.1 development
- react-payment-inputs ^1.1.9 development
- react-phone-number-input ^3.1.52 development
- react-redux ^7.2.8 development
- react-select ^4.3.1 development
- react-split ^2.0.14 development
- react-stickynode ^4.0.0 development
- react-timeago ^6.2.1 development
- react-toastify ^7.0.4 development
- reduce-reducers ^1.0.4 development
- redux ^4.2.0 development
- redux-actions ^2.6.5 development
- redux-async-queue ^1.0.0 development
- redux-mock-store ^1.5.4 development
- redux-thunk ^2.4.1 development
- reselect ^4.1.5 development
- rrule ^2.6.9 development
- sass ^1.51.0 development
- sass-loader ^12.0.0 development
- sortablejs ^1.15.0 development
- store ^2.0.12 development
- styled-components ^5.3.5 development
- to-string-loader ^1.2.0 development
- url-loader ^4.1.1 development
- use-deep-compare ^1.1.0 development
- x-data-spreadsheet ^1.1.9 development
- dotenv ^8.6.0
- form-data ^2.3.3
- lodash ^4.17.21
- promise ^8.1.0
- swiper ^8.1.4
- whatwg-fetch ^2.0.4
- behat/behat ^3.7 development
- behatch/contexts dev-php80 as 3.3.0 development
- coduo/php-matcher ^6.0 development
- friends-of-behat/mink ^1.8 development
- friends-of-behat/mink-browserkit-driver ^1.4 development
- friends-of-behat/mink-extension ^2.5 development
- friends-of-behat/symfony-extension ^2.0 development
- phpspec/prophecy-phpunit ^2.0 development
- phpstan/phpstan ^1.0 development
- phpstan/phpstan-doctrine ^1.0 development
- phpstan/phpstan-symfony ^1.0 development
- phpstan/phpstan-webmozart-assert ^1.0 development
- phpunit/phpunit ^9.0 development
- rector/rector ^0.12 development
- symfony/phpunit-bridge ^5.0 development
- api-platform/core ^2.6.3
- azimolabs/apple-sign-in-php-sdk ^2.0
- azuyalabs/yasumi ^2.1
- beberlei/doctrineextensions ^1.0
- box/spout ^3.0
- centrifugal/phpcent ~3.0
- cocur/slugify ^4.0
- craue/config-bundle ~2.0
- doctrine/cache ^2.0
- doctrine/doctrine-bundle ^2.4
- doctrine/doctrine-migrations-bundle ^3.0
- doctrine/orm ^2.7
- drupal/core-vendor-hardening 9.2.x-dev
- edamov/pushok ^0.13
- egulias/email-validator ^3.0
- emcconville/google-map-polyline-encoding-tool ^1.3
- friendsofsymfony/jsrouting-bundle ^2.2
- friendsofsymfony/rest-bundle ^3.0
- gedmo/doctrine-extensions ^3.0.3
- geo6/geocoder-php-addok-provider ^1.0
- geocoder-php/chain-provider ^4.0
- geocoder-php/google-maps-provider ^4.6
- geocoder-php/nominatim-provider ^5.0
- geocoder-php/open-cage-provider ^4.4
- geocoder-php/photon-provider ^0.4.0
- gesdinet/jwt-refresh-token-bundle ^1.0
- google/apiclient ^2.11
- guzzlehttp/guzzle ^7.0
- hashids/hashids ^4.0
- hautelook/alice-bundle ~2.9.0
- hwi/oauth-bundle ^1.3.0
- jaybizzle/crawler-detect ^1.2
- jmikola/geojson ~1.0
- jsor/doctrine-postgis ^1.1
- knplabs/knp-markdown-bundle ^1.6
- knplabs/knp-paginator-bundle ^5.0
- knplabs/knp-time-bundle ^1.7
- kreait/firebase-bundle ^2.2
- laravolt/avatar ^4
- league/csv ^9.3
- league/flysystem-aws-s3-v3 ^1.0
- league/geotools @stable
- league/oauth2-server-bundle ^0.3.0
- league/omnipay ^3.2.1
- lexik/jwt-authentication-bundle ^2.8
- liip/imagine-bundle ^2.3
- m6web/daemon-bundle ^6.0
- mailjet/mailjet-apiv3-php ^1.4
- martin-georgiev/postgresql-for-doctrine ^1.3
- mercadopago/dx-php ^2.4.1
- myclabs/php-enum ^1.8
- nelmio/cors-bundle ~2.0
- nesbot/carbon ^2.0
- notfloran/mjml-bundle ^3.0
- nucleos/profile-bundle 1.7.x-dev
- nucleos/user-bundle 1.12.x-dev
- nyholm/psr7 ^1.1
- odolbeau/phone-number-bundle ^3.1
- oneup/flysystem-bundle ^3.1
- oneup/uploader-bundle ^3.0
- php >=8.0
- php-http/guzzle7-adapter ^1.0
- php-http/httplug-bundle ^1.16
- php-http/message ^1.6
- phpdocumentor/reflection-docblock ^5.1
- phpoffice/phpspreadsheet ^1.23
- ppshobi/psonic ^2.0
- ramsey/uuid ^3.9
- ramsey/uuid-doctrine ^1.6
- sensio/framework-extra-bundle ^5.4
- sentry/sentry-symfony ^4.0
- shahonseven/php-color-hash dev-master
- simple-bus/symfony-bridge ^6.0
- simshaun/recurr ^5.0
- snc/redis-bundle ^4.0
- sonata-project/seo-bundle 3.x-dev
- spatie/guzzle-rate-limiter-middleware ^2.0
- spatie/opening-hours ^2.10
- stripe/stripe-php ^7.7
- sylius/channel-bundle ^1.7.5
- sylius/currency-bundle ^1.7.5
- sylius/customer-bundle ^1.6
- sylius/inventory ^1.7.5
- sylius/order-bundle ^1.7.5
- sylius/payment-bundle ^1.7.5
- sylius/product-bundle ^1.7.5
- sylius/promotion-bundle ^1.7.5
- sylius/resource-bundle ^1.7.1
- sylius/taxation-bundle ^1.7.5
- sylius/taxonomy-bundle ^1.7.5
- symfony/amqp-messenger ^5.3
- symfony/doctrine-messenger ^5.3
- symfony/monolog-bundle ^3.5
- symfony/redis-messenger ^5.3
- symfony/symfony ^5.3
- symfony/webpack-encore-bundle ^1.6
- theofidry/alice-data-fixtures 1.4.0
- twig/cache-extra ^3.3
- twig/intl-extra ^3.0
- twig/string-extra ^3.1
- twig/twig ^2.0
- twilio/sdk ^6.10
- typesense/typesense-php ^4.7
- vich/uploader-bundle ^1.13
- 309 dependencies
- actions/checkout v2 composite
- actions/setup-node v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- cypress-io/github-action v2 composite
- shivammathur/setup-php v2 composite
- osrm/osrm-backend v5.23.0 build
- php 8.1-fpm-alpine build
- coopcycle/php 8.1 build
- node 16-alpine build
- adrianrudnik/mjml-server 2.4.0
- browserless/chrome latest
- centrifugo/centrifugo v2
- coopcycle/php 8.1
- coopcycle/webpack latest
- cubejs/cube alpine
- mdillon/postgis 9.4-alpine
- minio/mc latest
- minio/minio latest
- namshi/smtp latest
- nginx 1.11-alpine
- redis 5-alpine
- stripemock/stripe-mock v0.94.0
- tile38/tile38 latest
- typesense/typesense 0.22.2
- valeriansaliou/sonic v1.3.0
- vroomvrp/vroom-docker v1.8.0
- node 16-alpine build