Welcome to the Dokan Multivendor Marketplace repository on GitHub!
Dokan is the ultimate frontend multivendor marketplace plugin for WordPress, powered by WooCommerce, helping you build your own multivendor marketplace similar to Amazon, Shopify, eBay, and Magento.
Here you can find the source code, open issues, and contribute to the development of the Dokan plugin.
We recommend all developers to follow the Dokan blog to stay up to date about everything happening in the project. You can also follow @DokanTweets on X for the latest development updates.
To get up and running with Dokan development, you will need to make sure that you have installed all of the prerequisites.
- Node.js (>= 20.x): We recommend using NVM (Node Version Manager) to ensure you're using the correct version of Node.
- npm: Used to manage project dependencies and run various scripts involved in building and testing the project.
- PHP 7.4+: Dokan currently features a minimum PHP version of 7.4. It is also needed to run Composer and various project build scripts.
- Composer: We use Composer to manage all of the dependencies for PHP packages and plugins.
- WordPress: A working WordPress installation with WooCommerce activated.
- WooCommerce: Dokan is built on top of WooCommerce and requires it to function.
Once you've installed all of the prerequisites, the following will prepare all of the build outputs necessary for development:
# Navigate to the Dokan plugin directory
cd wp-content/plugins/dokan-lite
# Install the PHP dependencies
composer install && composer du -o
# Install the npm dependencies
npm install
# OR build for production
npm run build
# Build the assets in development mode with watch
npm run start
Dokan follows a structured organization to make development and contribution easier:
dokan-lite/
βββ π assets/ # Contains all the frontend and admin assets.
β βββ css/ # CSS stylesheets.
β βββ js/ # JavaScript files.
β βββ images/ # Image assets.
β βββ src/ # Source files for the style, script and other frontend codes.
β βββ ... # Rest of the files.
βββ π includes/ # Core PHP files that power the plugin functionality.
β βββ Admin/ # Admin-specific code.
β βββ functions.php # Global functions.
β βββ ... # Rest of the core functionality files.
βββ π templates/ # Frontend template files.
β βββ dashboard/ # Vendor dashboard templates.
β βββ global/ # Vendor global templates.
β βββ emails/ # Email templates.
β βββ settings/ # Vendor settings templates.
β βββ ... # Rest of the templates.
βββ π tests/ # Test suites.
β βββ php/ # PHPUnit tests.
β βββ pw/ # Playwrite tests.
βββ π src/ # Source files for react, vue frontend codes.
β βββ admin/ # Admin frontend codes.
β βββ components/ # Global components for reactive frontend.
β βββ hooks/ # Hooks for reactive frontend.
β βββ utilities/ # Utilitiy functions for reactive frontend.
βββ π lib/ # Third-party libraries and dependencies.
βββ π docs/ # Documentation files.
βββ π languages/ # Translation files.
Dokan provides comprehensive documentation to help developers understand the codebase, architecture, and extend or customize the plugin effectively.
The documentation is available in the docs
directory:
- Admin Setup Guide: Dokan admin configuration, setup pages, fields, and administrative documentation.
- Vendor Analytics: Dokan analytics reports, vendor comprehensive analytics info for vendor insights.
- API: Dokan REST API standard documentation.
- Feature Override: Frontend template customization guide and override documentation.
- Slots: Frontend slot system documentation.
- TDD: Dokan TDD practices, testing frameworks documentation for Dokan development.
- Container: Dokan container documentation.
- Coupon: Dokan coupon workflow, implementation flowchart & system documentation.
Dokan includes several npm scripts to help with development:
Command | Purpose |
---|---|
npm run start |
Development build with watch mode. |
npm run start:hot |
Development with hot module replacement. |
npm run build |
Production build. |
npm run makepot |
Generates the POT file for translations. |
npm run format |
Formats code according to WordPress coding standards. |
npm run lint:css |
Lints CSS files. |
npm run lint:js |
Lints JavaScript files. |
npm run release |
Prepares a full release package. |
Dokan also provides Composer scripts for PHP development:
Command | Purpose |
---|---|
composer phpcs |
Runs PHP CodeSniffer to check coding standards. |
composer phpcs:report |
Generates a PHP CodeSniffer report file. |
composer phpcbf |
Automatically fixes coding standard violations where possible. |
composer test |
Runs PHPUnit tests. |
composer test-f |
Runs specific PHPUnit tests (requires filter parameter). |
Dokan follows Test Driven Development (TDD) practices to ensure code quality and reliability. The repository includes comprehensive documentation and resources for testing in the docs/tdd
directory:
- TDD Overview: Introduction to TDD in Dokan.
- Getting Started with Testing: Best practices and organization of test cases.
- Test Factories: Using factories to create test data.
- Mocking: Use mocking to test external functionalities.
To run tests, you can use the Composer scripts mentioned above or run PHPUnit directly:
# Run all tests
./vendor/bin/phpunit
# Run tests with a specific filter
./vendor/bin/phpunit --filter=test_name
To disclose a security issue to our team, please submit a report via our contact form.
This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core Dokan issues only. Support can take place through the appropriate channels:
- The Dokan documentation for help getting started.
- The Dokan support portal for customers who have purchased themes or extensions.
- The WordPress.org forums for users of the free Dokan Lite plugin.
For peer to peer support and discussions:
- Join our Facebook community
- Follow us on X
- Subscribe to our YouTube channel
Community contributions are always welcomed and help us remain the Number 1 Multivendor Marketplace plugin for WordPress. As an open source project, we rely on community contributions to continue to improve Dokan. Feel free to answer questions on GitHub and within the various Dokan communities.
There are many ways to contribute to Dokan:
Please read our Contribution Guidelines to learn the best practices for contributing to Dokan.
If you found a bug in the source code and can reproduce it consistently after troubleshooting it, you can help us by submitting a Bug Report.
Even better, you can submit a Pull Request with a fix, and we will happily review it.
When submitting pull requests, please ensure you follow our commit message and contribution guidelines.
Additionally, include the Needs: Dev Review
and Needs: Testing
labels for progress tracking.
Do you have a brilliant idea, enhancement, or feature you would love to see in Dokan? We're all ears!
Suggest new ideas, features, or enhancements by submitting a Feature Request. You can also support existing ideas by voting for your favorite requests.
The Dokan User Interface was designed with a global audience in mind. It supports a wide range of languages and is also RTL compatible.
Want to make a difference?
We would appreciate your contribution by adding a new language or helping translate existing ones at translate.wordpress.org.