Cooking with WordPress

While WordPress has made its name as the goto solution for blogs, websites, e-commerce sites and community websites, it can be used in numerous other applications. It even makes a great data source for mobile apps.

Those that know me, know that I love cooking and creating with food. And in the last year have taken up the art of sourdough bread baking.

The problem I have had is to keep all the recipes, notes, instruction that I have. Notebooks are great but run out of pages, loose papers go missing, but then building solutions for data are something I do - why not step out of the kitchen and create something to make my life a bit easier.

After quickly looking at the different options available, an online solution was clearly the simplest and quickest solution. I did not want to waste time building everything from the ground up after all this was not going to be something especially complicated or resource hungry so a WordPress / Advanced Custom Fields solution was clearly the way to go.

Out the box, WordPress has all the core components I would need - user control/access management, custom post types data storage along with categories and tags. ACF makes a quick job of adding custom fields and also the rendering of front end forms to create and edit content with.

Once everything was installed and ACF setup - the results where fully functioning database system that was ready for use, all be it via the WordPress admin interface, which for me was not ideal, since I wanted to be able to run this via my phone and needed to be nicely optimised, some to access the web can be a bit of problem when you are wandering around shops. The safest and easiest way to do this, is to build a custom theme. While sometimes, like when building a website, this can be a mammoth amount of work - for a personal project, its not nearly as bad since there is less functionality that's needed. In some instances, using the default WordPress admin dashboard interface can be a perfect solution for custom databases.

Once the basics where all done, I decided to take everything one step further and converted the site to a PWA - progressive web app. While of course this step was not needed, setting everything up everything as a PWA has its advantages and extends the functionality I can now add to the app whenever I get a couple of free minutes and it only took a couple of minutes to do.

So while the end product still needs a bit of touching up -

But shouldn't a mobile app be built as a single page app (SPA)?

Single page apps are probably regarded as the goto way to build an app, but some developers are finding this no longer be the perfect solution as it can lead to a very complicated code base and can make ongoing development more difficult.

Using separate pages and having an app that is under the hood is pretty much a website made the development process a dream. Testing everything is also greatly simplified. The final product is still quick and feels like a normal app.

Final Thoughts

While this was just a personal project, the resulting app is perfect my needs and something I have already enjoyed showing off a bit.

It also shows just how "easy" it can be to build a "database styled applications" with WordPress and that you could build some pretty complicated database-style applications using a simliar approach as well.