A todo list, React, Redux and the WordPress JSON REST API

I always wanted to create a very simple WordPress based Todo App. After putting it off for a very long time I finally had the time to look into it.

The Idea

The idea was a simple todo list that takes over your WP home page and relies on a standard to do post type for persistence. The interface should be driven by React using redux for state management.  The result should be WordPress plugin that simply works without any configuration. The app works over the WordPress JSON REST API and must have a very simple UI framework.

Screen Shot 2017-06-19 at 11.42.07 PM

The Parts

1.Defining the data we need to store:

  • user – name and login details. For this, I cheated and simply use the WP login interface.
  • Todo item –  with the ability to save details on a todo. For this, I use simply used a new post type. The title being the todo, the content being further information and post meta to store the state( completed/not completed )

2. Define the todo post type which we’ll use to store todo items. Each todo item relates to a post. You will notice that it’s not anything fancy but includes a few rest API configuration to make it easy for us to call posts at a later stage.

3. Setting up the JS system. I used Webpack to manage all frontend modules. I used yarn for package management and also Bable to allow me to use ES6 syntax.

4. For the UI framework, I used spectre as it is very light: https://picturepan2.github.io/spectre/

5. For user authentication, I used the user login and then relied on the WP cookie to allow the user to create todos over the REST API.

You can find the source code to play with here, it’s a wp plugin so you can install it:

https://github.com/dwainm/wpdone

I attempted this project mainly because wanted learn about all the new frontend tools. I mostly work in PHP and doing this was very refreshing. I’m inspired to do more of these. Even if no one ever needs it, I built it coz I wanted to.

Design inspiration the right way

I do not consider myself to be a designer.

I still don’t think of myself as one, but I’m slowly realising that though I’m not one by profession, I am taking part in the act of designing. Not in the traditional sense of arts and visual expression but as an architect of API’s (programming interfaces)

I create software, specifically WordPress plugins and more specifically WooCommerce extensions. Together with our team, I re-create and re-define software interfaces.

The software one person wrote has to interact with software another person wrote. Without thinking about the design of these interfaces and considering the effects of one’s decisions, we ultimately negatively impact not just the software another person wrote, but actually the person itself.

This other person is more important than the code we share. In this I know that designing software in the correct manner extremely important.

I’ve found so many inspiring articles on design and inclusion on https://design.blog. These articles shape the way I think about design beyond simply visual expression: Find your more inspiration here:
https://design.blog

What I do have

Today I turn 30. I woke up and my first thoughts were those of gratitude, which immediate turned into thoughts of empty mess and sadness.

The first few minutes I thought about what I don’t have. How many things I didn’t accomplish and how many things I’d like to have, but then I realized I’m already amongst the top percentage in the world because of the the things I do have:
So today and for the rest of my life I want to reflect on the thing I do have. The will be the fuel that drives me to make a great impact:

  • A loving Heavenly Father who gave his only Son to die for me and I’m not ashamed of my faith.
  • Health
  • An amazing wife.
  • A baby boy on the way
  • A family that love me
  • Growing up in a fully functioning family
  • Having a place to work at and earn a living
  • Being able to work from anywhere 

The list can be even more elaborate and this blog post is raw( unedited) but I need to get into the habit of publishing more often.

Thanks for reading!

I believe there is a Creator

If you’re reading this as an atheist or and agnostic thinker please know that this comes from a personal place.

There is one and only one reason: The systems we see in nature and even our own bodies are so well defined that I can’t think it to be random. The way in which our organs work as a cohesive system, can it be random?  Everything I look at in nature hints some sort of intent this is why I believe there is a Creator.

Do things go wrong in nature? Definitely, but is that the majority? 

Now on the word believe. I use this  cause there is no scientific proof. Hence I believe ( not I can prove or I have scientific evedince ) I believe is a deduction based on personal observations.  The very word believe says we can’t prove it ( yet )

Technology and Science may never be able to prove a Creator exists or point Him out in nature.

I believe all things were created. Though things created can evolve that may just have been by design.

I don’t judge anyone on their journey and I hope that those In search will find truth and peace. I respect your choices but also ask that you respect mine.