{"id":29702536,"url":"https://github.com/devgateway/seeds-dashboard","last_synced_at":"2025-07-23T12:39:33.124Z","repository":{"id":37800806,"uuid":"362105094","full_name":"devgateway/seeds-dashboard","owner":"devgateway","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-16T14:15:04.000Z","size":97527,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-04-10T10:10:13.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devgateway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-04-27T12:31:05.000Z","updated_at":"2023-07-24T12:46:21.000Z","dependencies_parsed_at":"2023-11-14T12:35:51.761Z","dependency_job_id":null,"html_url":"https://github.com/devgateway/seeds-dashboard","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"devgateway/wp-react-lib","purl":"pkg:github/devgateway/seeds-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fseeds-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fseeds-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fseeds-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fseeds-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devgateway","download_url":"https://codeload.github.com/devgateway/seeds-dashboard/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fseeds-dashboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266680674,"owners_count":23967795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-23T12:39:32.309Z","updated_at":"2025-07-23T12:39:33.111Z","avatar_url":"https://github.com/devgateway.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# WordPress React Lib\nAn easy way to integrate your react application with the world's **most popular** content management system. **wp-react-lib** uses the [Wordpress REST API](https://developer.wordpress.org/rest-api/) to load content into your classic React.js stack, it also allows embedding your own React.js components within pages and posts.\n\n# Dependecies\n\nwp-react-lib@0.1.0 uses  Redux and Immutable , you need to configure your  store as the following example:\n\n    import {applyMiddleware, compose, createStore} from 'redux'  \n    import {combineReducers} from 'redux-immutable';  \n    import {Map} from 'immutable'  \n    import thunk from 'redux-thunk'  \n    import {wordpress} from \"wp-react-lib\";\n    \n    const initialState = Map()  \n    const getRootReducer = () =\u003e combineReducers({  \n      wordpress,  \n    })  \n    const store = createStore(  \n      getRootReducer(), // root reducer with router state      \n      initialState,  \n      compose(applyMiddleware(thunk))  \n    )\n    \n\n\n## Preparing WordPress\n\n- Run dev_services.sh to start docker container using development enviroment\n- Open localhost\n- Follow WordPress setup wizard\n  - Go to settings/permalinks, then choose day and name\n    - *This configuration depends of your react routes setup*\n  - Go to appearance/themes and activate wp-react-theme\n    - *By activating this theme WordPress will disable its front-end*\n  - Go to plugins and activate the following plugins\n    - WP Multilang\n    - WP-REST-API V2 Menus\n    - **WP React Lib Components**\n- Update .env file accordingly\n- run npm install\n- run npm start\n\n## Loading pages\n\n     \u003cProvider store={store}\u003e  \n\t     \u003cdiv className=\"App\"\u003e  \n\t\t  \u003cPageProvider slug={\"home\"}\u003e  \n\t\t\t  \u003cPageConsumer\u003e \n\t\t\t\t \u003cPage/\u003e \n\t\t\t  \u003c/PageConsumer\u003e \n\t\t  \u003c/PageProvider\u003e \n\t     \u003c/div\u003e\n     \u003c/Provider\u003e\n\n\n\n## Loading Posts\n\n     \u003cProvider store={store}\u003e        \n        \u003cdiv className=\"App\"\u003e    \n           \u003cPostProvider slug={\"my-post-slug\"}\u003e    \n              \u003cPostConsumer\u003e   \n                 \u003cPost/\u003e   \n              \u003c/PostConsumer\u003e   \n           \u003c/PostProvider\u003e   \n        \u003c/div\u003e  \n     \u003c/Provider\u003e  \n\n## Loading List of Posts\n\n     const List = ({posts}) =\u003e {        \n       return \n         \u003cul\u003e  \n           {posts.map(post =\u003e(\u003cli\u003e \u003ch1 dangerouslySetInnerHTML={{__html: post.title.rendered}}/\u003e \u003c/li\u003e))} \n\t \u003c/ul\u003e\n     }    \n             \n        function ShowPosts() {    \n                return (    \n                \u003cProvider store={store}\u003e    \n                  \u003cdiv className=\"App\"\u003e    \n                     \u003cPostProvider\u003e    \n                       \u003cPostConsumer\u003e \n\t\t\t   \u003cList\u003e\u003c/List\u003e   \n                       \u003c/PostConsumer\u003e   \n                     \u003c/PostProvider\u003e   \n                  \u003c/div\u003e   \n               \u003c/Provider\u003e );    \n    \t}  \n    \n### Post Provider Properties\n\n- type: You can specify your custom post type.\n- taxonomy: Taxonomy used for filtering posts, categories is used by default.\n- categories: Array of  categories ids for filtering the post by the taxonomy.\n- before : ISO date used to filter posts by date before\n- perPage: Number of post loaded per page\n- page: Number of page that has to be returned.\n- fields: Specify which field will be returned in the post object.\n- slug: Filter by post slug.\n- store: Specify the immutable path where returned posts will be stored, useful when having multiple  components loading different posts\n- locale: Specify the post language (multiLang plugin required)\n\n\n\n## Routing\n\n*Using router for loading pages*\n\n    \u003cRoute exact path=\"/:slug\" render={(props)=\u003e{  \n        return (\u003cdiv className=\"App\"\u003e  \n\t\t\t     \u003cPageProvider slug={props.match.params.slug}\u003e  \n\t\t\t\t     \u003cPageConsumer\u003e \n\t\t\t\t\t     \u003cPage\u003e\u003c/Page\u003e \n\t\t\t\t     \u003c/PageConsumer\u003e \n\t\t\t     \u003c/PageProvider\u003e \n\t\t     \u003c/div\u003e\n\t}}\u003e  \n    \u003c/Route\u003e\n\n*Using router for loading posts*\n\n    \u003cRoute path=\"/:lan/:year/:month/:day/:slug/\" exact render=\n        {props =\u003e (  \n             \u003cPostProvider  slug={props.match.params.slug} \u003e  \n\t\t     \u003cPostConsumer\u003e \n\t\t\t     \u003cPost\u003e\u003c/Post\u003e \n\t\t     \u003c/PostConsumer\u003e \n\t     \u003c/PostProvider\u003e \n\t )}\u003e  \n    \u003c/Route\u003e\n\n\n## Embedded Components\n\nYou can  create and embed your own React components in WordPress editor, configure them, save its metadata, and render them in your React UI as part of your react application.\n\n### Embedded Components Workflow\n\n![](docs/flow1.png)\n\n![](docs/flow2.png)  \n### Embeddable Components\nTo create an embeddable component you need\n- Create your React component\n- Add a route that exposes your component without your ui layout\n- Create a wordpress plugin that wraps your component and put it available as a wordpress block.\n- Login in wordpress admin site, go to settings \u003e WP React Settings and enter React APP base URL\n\nPlease look at **wp-react-example-advanced** and **wp-react-blocks-plugin**\n\n## Contributing\n\nFor details about how to send pull requests, please read [CONTRIBUTING.md](https://github.com/devgateway/wp-react-lib/blob/main/CONTRIBUTING.md).\n\n## Autor\n\n* **Sebastian Dimunzio** - *Architecture and code* - [sdimunzio](https://github.com/sdimunzio)\n\nThe list of all contributors to this project can be read at [contributors](https://github.com/devgateway/wp-react-lib/graphs/contributors). \n\n## License\n\nThis project is under - Apache License 2.0 - for more details please check [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\n## Contact information\n\n[For any comments or suggestions, please contact us](mailto:info@developmentgateway.org \"Development Gateway's Email\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgateway%2Fseeds-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevgateway%2Fseeds-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgateway%2Fseeds-dashboard/lists"}