Just Write: A Client-Side React App for Writing and Editing WordPress Posts

WordPress developer Jason Bobich has created an open source client-side React app called Just Write that provides a decoupled editing experience for WordPress. Bobich said he built the app in 10 days to explore the possibilities of React and the WP REST API.

Although it’s still a work in progress, the app has a demo where curious testers can manage posts from any WordPress website that’s secured with HTTPS and has the JWT Authentication plugin installed. Alternatively, testers can click on the “play in the sandbox” to bypass authentication.

Once logged in, the user sees a dashboard with the most recent posts, a deliberate design decision that Bobich made to “motivate the user to do one thing – to just write.”

The editor includes support for Markdown and a simple preview with a sticky toolbar at the top. Just Write also allows the user to edit their profile and personal information in a dropdown at the top of the screen.

Bobich said he created to the app to improve his JavaScript skills and doesn’t have a plan to use it for business.

“Ever since we were all told a couple of years ago, ‘Learn JavaScript deeply,’ I’ve seen just how many holes I had in my own JavaScript knowledge,” Bobich said. “I’ve been working hard the last couple of years to become more than just a jQuery monkey. And so this project is just another step towards my personal growth surrounding the technologies involved here. It’s so exciting to think about the potential things that we can build in the community with React and the WordPress API.”

WP REST API Currently Poses Complicated Hurdles for App Developers

After the REST API was merged into core, the time seemed ripe for developers to build a proliferation of different writing experiences for users. However, working with the API still has many hurdles for application developers, limitations that Bobich said he became acquainted with while developing Just Write.

“For anyone wanting to build a practical application like this, the first glaring issue is around authentication,” Bobich said. “WordPress has no way to securely authenticate from outside of the WordPress admin. So expecting any average user to set up oAuth or JWT with a third-party plugin is a bit of a reach.”

Bobich also encountered issues working with media and saving content the WordPress way (which allows shortcodes to get parsed before wpautop()). The application is not yet ready for real, practical use but would require even more API calls to do things like get ahold of categories and tags or add the ability to create new ones.

“Think about all the work WordPress has put into the way we embed media in different ways,” Bobich said. “Just having basic things we take for granted — pasting a YouTube link, a tweet, uploading an image and having it cropped 100 ways ’til Sunday — for all work properly would all take custom JavaScript coding.”

Bobich said he thinks these limitations are the reason why there aren’t yet more applications built with decoupled editing experiences. Yet, in the new era of Gutenberg, Just Write’s alternative writing interface offers a simplicity that some users may prefer.

“As the WordPress admin continues to grow and become more complex, some people get excited and others moan and grown,” Bobich said. “But building something like Just Write shows us that there’s more to WordPress than just what we see. There’s more than a menu full of plugins and a new editor built in React that we may or may not like. WordPress can be what we want. It can fit our own needs or any client’s. And this all comes from the potential ability to decouple the editing experience.”

As WordPress has evolved to accommodate different user types from blogging, websites, and niche applications, Bobich said he thinks the next logical step is for developers to begin creating admin interfaces catered specifically to users’ individual needs.

“Gutenberg marks an important turn in the evolution,” Bobich said. “For those that were clinging to the simplicity of WordPress and blocking out some of the other noise, this might not be something they end up liking… or maybe it will?

“But the bigger point is that what we see there in the admin doesn’t have to be it. I hope people will be braver than me and really set out to build these different alternatives. If I can polish my React skills and build that myself in 10 days, I can only imagine what others can do.”

13 Comments


  1. I have an out of the box solution for REST API authentication I worked on with others, the WordPress IndieAuth plugin. I agree that integrated options not being there is a problem. But there are a few maintained solutions.

    Report

    Reply

  2. Hey just wanted to say I’m in a similar huddle regarding the rest API. For authentication via JWT, I came across this plugin which can do logins via JWT tokens.

    I also rolled a review for it on wpplugincheck too. I’m using it for production atm if anyone isn’t feeling confident on using it.

    For the time being, I feel like the rest api is lacking in a lot of areas, especially documentation and lack of good examples. I’m exploring using airtable via airpress as an alternative.

    Report

    Reply

  3. The name “Just Write” catches me as we have a WordPress theme called Justread!

    Anyway, I love the minimalist design of the app. How does it work with Gutenberg (when it comes)?

    Report

    Reply

  4. “As the WordPress admin continues to grow and become more complex, some people get excited and others moan and grown,”

    *groan :)

    Report

    Reply

  5. Great article Sarah. It perfectly represents the state of WordPress right now. I saw a really bright future for WP when they launched the WP Rest API but all that kinda deflated right at the end. The Rest API stayed kind of stagnant while they decided to double down back on the very thing the Rest API seemed to be trying to move WordPress away from: becoming a simple Visual Composer CMS and a Squarespace competitor, instead of a CMS/App-framework for everyone.

    Sadly, I don’t think there’s any coming back now, so I hope some other project takes over and fills that hole. I’m quite interested in headless CMSs, which seem to be getting a lot of traction, but none of them have less than a long way to get where WordPress is in term of features, let alone community support.

    We’ll see how we manage content in the years to come, but seems like, for the more tech inclined, WordPress won’t be there, at least not so much as it’s been all those years. We’ll also see if that means a movement in the dev community too, since they are the ones most interested in the API way of doing things, and not so much in the Squarespace one. If that’s the case, maybe Matt Mullenweg should learn a thing or two from Steve Ballmer: Developers! Developers! Developers! :D

    Report

    Reply

      1. Nice! I think it is a great moment to start a headless CMS project. Although I personally prefer php-based systems over Node.js ones, so shared hosting users don’t get cut out. But nice project anyway, good luck with it! (:

        Report


    1. You can also check the project I’m building: https://getpop.org (sorry for the self-promotion!). It basically wraps WordPress in a way that allows it to behave like a headless CMS. The installation scripts are not ready yet (I need a few months more of work), but the concept works like a charm, allowing to do absolutely everything that you can already do in WordPress (including authentication) through standard HTTP requests, and getting a JSON response back (it is not REST though). And it’s pure PHP, Handlebars and vanilla Javascript, so other than Handlebars (just for markup, and very easy to use), it’s pretty much the same technology stack as WP (the open source repo is at https://github.com/leoloso/PoP). Just check it out, I hope you like it :)

      Report

      Reply

    2. It should be noted that Gutenberg heavily utilizes the REST API in WordPress and when work began on the new editor, the team discovered a lot of things lacking in the API. Over time, they’ve made a number of improvements to the API alongside Gutenberg and it seems like a lot of people believe that the API has simply been ignored which isn’t the case.

      Report

      Reply

  6. The biggest problem is speed namely lack of it and it can’t be fixed so easily.

    Report

    Reply

  7. In all honesty, a writing interface like this is what I expected out of Gutenberg.

    Report

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *