Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 39 | All time: 10,910 This week: 96 |
Version | License | PHP version | Categories | |||
wp-react-kit 1.0 | MIT/X Consortium ... | 5 | PHP 5, Content management, Blogs |
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, e2e Test 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
./vendor/bin/phpunit
npm run test:unit
WordPress core doc link: https://make.wordpress.org/core/2019/06/27/introducing-the-wordpress-e2e-tests/
Requirements: - Must have docker installed and running by ensuring these commands -
npm run env:stop
npm run env:start
Normal e2e test
npm run test:e2e
Interactive e2e test
npm run test:e2e:watch
Get all errors of the project:
vendor/bin/phpcs .
Fix all errors of the project:
vendor/bin/phpcbf .
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
Create Job
- Method: `POST`
- URL: http://localhost/wpex/wp-json/job-place/v1/Jobs
- Body:
{
"title": "Simple Job Post",
"slug": "simple-job-post",
"description": "Simple job post description",
"company_id": 1,
"job_type_id": 2,
"is_active": 1
}
Update Job
- Method: `PUT`
- URL: http://localhost/wpex/wp-json/job-place/v1/jobs/1
- Body:
{
"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 Jobs
- Method: `DELETE`
- URL: http://localhost/wpex/wp-json/job-place/v1/jobs
- Body:
{
"ids": [1, 2]
}
Detailed Documentation - View Detailed documentations with parameters and responses of the REST API
v0.4.1 - 18/08/2022
v0.4.0 - 12/08/2022
v0.3.1 - 11/08/2022
v0.3.0 - 02/08/2022
<details>
<summary>Options for specific files:</summary>
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
</details>
<details>
<summary>Simple Version with raw PHP</summary>
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vSimple </details>
<details>
<summary>Version with EsLint and i18n Setup</summary>
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vSimpleEslint </details>
<details>
<summary>Version with EsLint, i18n and React Router Setup</summary>
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vReactRouter </details>
<details>
<summary>Version with PostCSS and Tailwind CSS Setup</summary>
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vTailwindCss </details>
<details>
<summary>Version with PHPCS setup</summary>
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vPHPCS </details>
<details>
<summary>Version with PHP OOP Architecture</summary>
https://github.com/ManiruzzamanAkash/wp-react-kit/releases/tag/vPhpOOP </details>
<details>
<summary>Simple Version Code-Structure:</summary>
</details>
<details>
<summary>Demo in WordPress plugin:</summary>
</details>
Job List Page
Job List Page with Pagination
Job List Page with search
Files (134) |
File | Role | Description | ||
---|---|---|---|---|
includes (10 directories) | ||||
src (2 files, 7 directories) | ||||
templates (1 file) | ||||
tests (3 directories) | ||||
.babelrc.js | Data | Auxiliary data | ||
.eslintignore | Data | Auxiliary data | ||
.eslintrc | Data | Auxiliary data | ||
.php_cs | Example | Example script | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
jest-unit.config.js | Data | Auxiliary data | ||
job-place.php | Class | Class source | ||
package-lock.json | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpcs.xml | Data | Auxiliary data | ||
phpunit.xml.dist | Data | Auxiliary data | ||
postcss.config.js | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
Rest-API-Docs.MD | Data | Auxiliary data | ||
tailwind.config.js | Data | Auxiliary data | ||
tsconfig.json | Data | Auxiliary data | ||
webpack.config.js | Data | Auxiliary data |
Files (134) | / | includes |
Files (134) | / | includes | / | Abstracts |
File | Role | Description |
---|---|---|
BaseModel.php | Class | Class source |
DBMigrator.php | Class | Class source |
DBSeeder.php | Class | Class source |
RESTController.php | Class | Class source |
Files (134) | / | includes | / | Databases | / | Migrations |
File | Role | Description |
---|---|---|
JobsMigration.php | Class | Class source |
Files (134) | / | includes | / | Databases | / | Seeder |
File | Role | Description |
---|---|---|
JobsSeeder.php | Class | Class source |
Manager.php | Class | Class source |
Files (134) | / | includes | / | Jobs |
File | Role | Description |
---|---|---|
Job.php | Class | Class source |
JobStatus.php | Class | Class source |
JobType.php | Class | Class source |
Manager.php | Class | Class source |
Files (134) | / | includes | / | REST |
File | Role | Description |
---|---|---|
JobsController.php | Class | Class source |
JobTypesController.php | Class | Class source |
Manager.php | Class | Class source |
Files (134) | / | includes | / | Traits |
File | Role | Description |
---|---|---|
InputSanitizer.php | Class | Class source |
Queryable.php | Class | Class source |
Files (134) | / | src |
Files (134) | / | src | / | components |
File | Role | Description | ||
---|---|---|---|---|
badge (2 files, 1 directory) | ||||
button (2 files) | ||||
dashboard (1 file) | ||||
date-picker (3 files) | ||||
inputs (7 files) | ||||
jobs (3 files) | ||||
layout (4 files) | ||||
loading (14 files) | ||||
modal (2 files) | ||||
page-partials (2 files) | ||||
pagination (2 files) | ||||
spinner (2 files) | ||||
svg (5 files) | ||||
tab (2 files) | ||||
table (3 files) | ||||
tooltip (3 files) |
Files (134) | / | src | / | components | / | badge |
File | Role | Description | ||
---|---|---|---|---|
__tests__ (1 file) | ||||
Badge.stories.tsx | Data | Auxiliary data | ||
Badge.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | badge | / | __tests__ |
File | Role | Description |
---|---|---|
Badge.test.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | date-picker |
File | Role | Description |
---|---|---|
DatePicker.stories.tsx | Data | Auxiliary data |
DatePicker.tsx | Data | Auxiliary data |
DatePickerData.ts | Data | Auxiliary data |
Files (134) | / | src | / | components | / | inputs |
File | Role | Description |
---|---|---|
Input.stories.tsx | Data | Auxiliary data |
Input.tsx | Data | Auxiliary data |
InputLabel.tsx | Data | Auxiliary data |
Select2Input.stories.tsx | Data | Auxiliary data |
Select2Input.tsx | Data | Auxiliary data |
SwitchCheckbox.tsx | Data | Auxiliary data |
SwitchInput.stories.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | jobs |
File | Role | Description |
---|---|---|
ListItemMenu.tsx | Data | Auxiliary data |
SelectCheckBox.tsx | Data | Auxiliary data |
use-table-data.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | layout |
File | Role | Description |
---|---|---|
Header.tsx | Data | Auxiliary data |
Layout.tsx | Data | Auxiliary data |
NavMenu.tsx | Data | Auxiliary data |
PageHeading.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | loading |
File | Role | Description |
---|---|---|
BarChartLoading.stories.tsx | Data | Auxiliary data |
BarChartLoading.tsx | Data | Auxiliary data |
DashboardCardLoading.stories.tsx | Data | Auxiliary data |
DashboardCardLoading.tsx | Data | Auxiliary data |
LineChartLoading.stories.tsx | Data | Auxiliary data |
LineChartLoading.tsx | Data | Auxiliary data |
Loading.stories.tsx | Data | Auxiliary data |
Loading.tsx | Data | Auxiliary data |
OverlayLoading.tsx | Data | Auxiliary data |
SettingsLoading.stories.tsx | Data | Auxiliary data |
SettingsLoading.tsx | Data | Auxiliary data |
SettingsSectionLoading.tsx | Data | Auxiliary data |
TableLoading.stories.tsx | Data | Auxiliary data |
TableLoading.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | modal |
File | Role | Description |
---|---|---|
Modal.stories.tsx | Data | Auxiliary data |
Modal.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | page-partials |
File | Role | Description |
---|---|---|
SelectedItem.tsx | Data | Auxiliary data |
SelectListItem.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | pagination |
File | Role | Description |
---|---|---|
Pagination.stories.tsx | Data | Auxiliary data |
Pagination.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | spinner |
File | Role | Description |
---|---|---|
Spinner.stories.tsx | Data | Auxiliary data |
Spinner.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | svg |
File | Role | Description |
---|---|---|
LogoIcon.tsx | Data | Auxiliary data |
SvgCircleDefaultIcon.tsx | Data | Auxiliary data |
SvgCirclePrimaryIcon.tsx | Data | Auxiliary data |
SvgCircleSuccessIcon.tsx | Data | Auxiliary data |
SvgCircleWarningIcon.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | tab |
File | Role | Description |
---|---|---|
Tab.stories.tsx | Data | Auxiliary data |
Tab.tsx | Data | Auxiliary data |
Files (134) | / | src | / | components | / | table |
File | Role | Description |
---|---|---|
Table.stories.tsx | Data | Auxiliary data |
Table.tsx | Data | Auxiliary data |
TableInterface.ts | Data | Auxiliary data |
Files (134) | / | src | / | components | / | tooltip |
File | Role | Description |
---|---|---|
ProNotExistTooltip.tsx | Data | Auxiliary data |
tooltip-style.scss | Data | Auxiliary data |
Tooltip.tsx | Data | Auxiliary data |
Files (134) | / | src | / | data | / | jobs |
File | Role | Description |
---|---|---|
actions.ts | Data | Auxiliary data |
controls.ts | Data | Auxiliary data |
endpoint.ts | Data | Auxiliary data |
index.ts | Data | Auxiliary data |
interfaces.ts | Data | Auxiliary data |
reducer.ts | Data | Auxiliary data |
resolvers.ts | Data | Auxiliary data |
selectors.ts | Data | Auxiliary data |
types.ts | Data | Auxiliary data |
Files (134) | / | src | / | hooks |
File | Role | Description |
---|---|---|
useConfirmReload.tsx | Data | Auxiliary data |
useMenuFix.tsx | Data | Auxiliary data |
useOutsideClick.tsx | Data | Auxiliary data |
Files (134) | / | src | / | style |
File | Role | Description |
---|---|---|
main.scss | Data | Auxiliary data |
tailwind.css | Data | Auxiliary data |
Files (134) | / | src | / | utils |
File | Role | Description |
---|---|---|
DateHelper.ts | Data | Auxiliary data |
global-data.ts | Data | Auxiliary data |
http.ts | Data | Auxiliary data |
MenuFix.ts | Data | Auxiliary data |
NumberFormat.ts | Data | Auxiliary data |
Select2Helper.ts | Data | Auxiliary data |
StringHelper.ts | Data | Auxiliary data |
text-parser.ts | Data | Auxiliary data |
Files (134) | / | tests |
Files (134) | / | tests | / | phpunit |
File | Role | Description | ||
---|---|---|---|---|
Api (1 file) | ||||
Install (1 file) | ||||
Jobs (1 file) | ||||
bootstrap.php | Example | Example script | ||
wp-config.php | Aux. | Auxiliary script |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.