ramsaylanier / WordExpress

WordPress using Node, React, GraphQL, and Apollo
http://wordexpress.io
MIT License
1.56k stars 129 forks source link

Contributors wanted? #7

Open Nubuck opened 8 years ago

Nubuck commented 8 years ago

@ramsaylanier awesome work. I felt exactly the same about Wordpress and PHP, so I attempted to do something similar - only I chose waterline and I started before relay or redux was really a thing. waterpress. I realised recently that waterline is really not enough and I had planned to switch from waterline and fluxible to sequelize and redux as soon as I had finished the projects I was building waterpress for.

You've done that already - only much better, which is awesome. I would love to contribute - how may I get involved?

ramsaylanier commented 8 years ago

Thanks! I suppose I should make a road map. Right now, I really need to figure out how to get server side rendering to work. There is a ln isomorphic-relay package that I think does this but haven't looked into it. That would be a big help.

ramsaylanier commented 8 years ago

The other thing is I'm trying to rebuild how Layout components should work. Right now its kinda bad, how it works now seems hacky - if you could think of a better solution let me know.

Nubuck commented 8 years ago

I'm super interested to hear where you see this project going. I'm also keen to look into server side rendering relay. Currently I'm using Fluxible, with the Fetchr plugin which generates out the RESTful end points from service definitions. Those service definitions execute chainable waterpress methods. Fluxible has a cool feature where it plugs those service definitions into the action context, so you don't break flux directional flow and handles whether the service is executed on the server or requested over XHR from the browser. Fluxible also offers methods in the stores that dehydrate your store state by serialising it and injecting it into the markup response, which is rehydrated back into the stores once the browser loads.

I've used a similar approach in a simple Redux project, by serializing the store state in the server response and initializing the store in the browser from that serialized state.

It'll be an interesting investigation into relay to achieve the same. I can look into it this week coming.

As far as Layout components go - I haven't spend much time trying to directly integrate with the WP admin panel or theme settings. I match posts and categories by slug in the react app with react router and a "match route url to api call" type of action. So my react router paths looked like 'story/:slug', 'category/:slug(/:childslug)', 'page/:slug' etc Since WP reads template names out of the theme's .php files to populate the layout template select field in the admin panel, I hacked a poc to generate php files in a WP template folder, to match layout component files, when express booted with bootable. In the end all it did was make the booting process slower for a feature I only need to ship later. Right now, sadly, I don't have any better ideas... though I'll definitely give it thought this week as I spend more time on the platform. On a similar note as layout templates... I've started a PHP WP plugin that will provide WP hooks to browser mounted React SPA forms that are packed and served from the app node project (current wip for app on buildaid.co That way I can create management UIs for clients or admins in the same space as my js app and trigger data services in my app from the wp hooks... while writing less php.

ramsaylanier commented 8 years ago

If you could look in SSR, that would be a huge help. As I mentioned, you might want to start by looking at isomorphic-relay-router - which uses the isomorphic-relay package. I haven't looked at source, but it seems to handle SSR with relay, which is an absolute must.

I'll figure out something for layouts. Right now, you just create a custom text field and type the name of a React component that serves as a "layout template" for lack of a better term. The big problem is that Relay has to make a query, get the page, then get the page meta for that page, then re-run itself. Its weird how Relay works, and I don't think the current setup is tenable.

Nubuck commented 8 years ago

Cool, I'll look into SSR this week. I'm having a look at the relay-router, seems straight forward. Also having a look at react-universal as reference.

ramsaylanier commented 8 years ago

Awesome, I've added a new issue specifically for SSR.

viral810 commented 8 years ago

Hello Ramsay, Are you looking for contributor?

ramsaylanier commented 8 years ago

@viral810 absolutely

onucotuzyedi commented 7 years ago

Hello @ramsaylanier great start! I would like to contribute also, even though I'm not 'that' qualified, if you could point me to a direction I would love to work on it. I'm an amazing learner. I'm especially interested in making it WPML or an equivalent multilingual plug-in ready, but I'll take anything.

victorivens05 commented 6 years ago

Hey @ramsaylanier looks like it's been a long while since anything have been done in here. Have you abandoned the project for good? Pretty much everytime my wordpress' sites take more than 2 seconds to server anything I remember this project. When I need to tweak any plugin even more. I'd also like to contribute. Somehow I think what this project really need is a funding though, because it's a huge job to be done.

ramsaylanier commented 6 years ago

I've kinda put it on pause - but I'm still interested. This main thing that needs to be implemented first is server-side rendering.

gfirem commented 6 years ago

@ramsaylanier I like to help

sujanpgowda commented 2 years ago

@ramsaylanier Wrt SSR what's your opinion on faustjs.org and the previous frontity.org frameworks.

Faustjs uses Gqty graphql client https://github.com/gqty-dev/gqty https://github.com/wpengine/faustjs