A simple starter kit to work in WordPress plugin development using WordPress Rest API, WP-script, React, React Router, Tailwind CSS, PostCSS, Eslint, WP-Data, WP-Data Store, React Components, React CRUD, i18n, PHPUnit Test, JestUnit Test, WordPress Playwright e2e Test, Gutenberg blocks and PHP OOP plugin architecture easily in a minute.
# Clone the Git repository
git clone https://github.com/ManiruzzamanAkash/wp-react-kit.git
# Install PHP-composer dependencies [It's empty]
composer install
# Install node module packages
npm i
# Start development mode
npm start
# Start development with hot reload (Frontend components will be updated automatically if any changes are made)
npm run start:hot
# To run in production
npm run build
After running start
, or build
command, there will be a folder called /build
will be generated at the root directory.
You need activate the plugin from plugin list page. http://localhost/wpex/wp-admin/plugins.php
# One by one.
npm run build
npm run makepot
npm run version
npm run zip
# Single release command - which actually will run the above all in single command.
npm run release
After running release
command, there will be a folder called /dist
will be generated at the root directory with wp-react-kit.zip
project files.
composer run test
composer run test:all
npm run test:unit
Playwright doc link: https://playwright.dev/docs/running-tests
Requirements:
npm run env:stop
npm run env:start
Normal e2e test
npm run test:e2e
Interactive e2e test
npm run test:e2e:watch
For more about e2e Tests running please check - https://playwright.dev/docs/running-tests
Get all errors of the project:
composer run phpcs
Fix all errors of the project:
composer run phpcbf
Full Composer test run:
composer run test:all
http://localhost/wpex/wp-admin/admin.php?page=jobplace#/
Where, /wpex
is the project root folder inside /htdocs
.
Or, it could be your custom processed URL.
Postman API Link - https://www.getpostman.com/collections/f94073131fc1411506e8
GET
GET
GET
GET
POST
{
"title": "Simple Job Post",
"slug": "simple-job-post",
"description": "Simple job post description",
"company_id": 1,
"job_type_id": 2,
"is_active": 1
}
PUT
{
"title": "Simple Job Post Updated",
"slug": "simple-job-post-updated",
"description": "Simple job post description",
"company_id": 1,
"job_type_id": 2,
"is_active": 1
}
DELETE
{
"ids": [1, 2]
}
Detailed Documentation - View Detailed documentations with parameters and responses of the REST API
v0.9.0 - 20/12/2024
v0.8.0 - 24/05/2023
v0.7.0 - 01/01/2023
v0.5.0 - 15/11/2022
v0.4.1 - 18/08/2022
v0.4.0 - 12/08/2022
v0.3.1 - 11/08/2022
v0.3.0 - 02/08/2022
Get specific file errors of the project:
vendor/bin/phpcs job-place.php
Fix specific file errors of the project:
vendor/bin/phpcbf job-place.php
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vSimple
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vSimpleEslint
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vReactRouter
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vTailwindCss
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vPHPCS
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vPhpOOP
Job List Page
Job List Page with Pagination in different primary color
Job List Page with search
Job Create Page
Job Edit Page
Job Delete
Responsive views
Inside src/blocks
you'll find gutenberg block for ready block setup. We've made blocks like dynamic block so that future changes would not create any issue.
Contribution is open and kindly accepted. Before contributing, please check the issues tab if anything in enhancement or bug. If you want to contribute new, please create an issue first with your enhancement or feature idea. Then, fork this repository and make your Pull-Request. I'll approve, if everything goes well.
It's me, Maniruzzaman Akash. Find me at manirujjamanakash@gmail.com