Dev Stack Recommendation for Static Site With Occasional DB Requirements

Joined
Dec 28, 2015
Messages
159
Likes
173
Degree
1
I'm looking to grow my niche site to a fully fledged business in the future. The site is currently running on WP. I'm thinking I should choose a stack at the moment rather than wait in the future, when things may be too complicated i.e. site may be too large.

Here's what I'll need the tech I choose to accomplish:
i) Ecommerce functionality (online store)
ii) Blogging
iii) Tools, which may need to pull info from a database e.g. calculators, quizzes that output results based on specific choices, etc.

I've been researching about Hugo and realize it doesn't work with a DB.

This is what I need:
i) A static site generator for static parts of the website
ii) A tech that can work with a DB on an "as needed' basis, e.g. when someone takes a quiz.
iii) Ecommerce capability

Is there a tech stack that can accomplish all these? Would React JS be sufficient?

Thanks all
 
Django Rest Framework and React could work.

Check out this tutorial and see if it meets your needs:

 
Wordpress with a full page cache (eg WP Fastest cache) IS a static site - static html is served direct from the webserver. It also has a comprehensive ecommerce package available out of the box (woo) and is easy to extend with custom widgets etc.
Its not cool, and the code style is old, because the software is old, but its ideal for what you a re proposing.

We do plenty of custom dev, in node, gloang, php and some c#, but if a client came to use with your requirements, it would be wordpress, woocommerce and elementor, with a custom theme and custom elementor widgets.
 
I agree. WP isn't cool but works. I'd reach for Django if I needed a lot of custom tables, web sockets, auth, and background jobs. Because I prefer python over php, and can make a Django app faster than a wp one.

One thing that confuses me when wp sites grow big, is the lack of structure. Logic in views, all post meta in one table, no controllers to easily configure endpoints, etc.
 
You could use Gatsby + Wordpress for this. With the new Wordpress GraphQL plugin it's quite easy to connect the two, and you can actually access all ACF data. With Gatsby it would be easy to pull in data from different sources as well. And it's based on React, which you might already know.

It's probably still more work than just using Wordpress, but it's getting easier and easier to use.
 
You can take your existing site and export it as a static site with your choice of static site plugins.

There are literally a small army of free ones.
 
One thing that confuses me when wp sites grow big, is the lack of structure. Logic in views, all post meta in one table, no controllers to easily configure endpoints, etc.

If we have sites under that scenario, we build out an API on a subdomain (in whatever language suits) and call in from wordpress via Ajax or curl.
Works really well with elementor custom widgets for quizzes, booking systems etc
 
I've been researching about Hugo and realize it doesn't work with a DB.
Technically, just about any static site generator can be made to work with a DB but you'll need to develop some kind of API for it to handle the DB functionality. A lot of apps are being developed this way where the back-end is nothing but an API and the front-end is a Vue, React, Angular, etc app that takes care of the UI, routes, DB/API access, etc. I'm not sure what your skill level is with programming but this approach would be considered intermediate/advanced level stuff.

Personally, my development framework of choice is Phoenix (https://www.phoenixframework.org/) as I'm using the Elixir lang (https://elixir-lang.org/). For what you want and if you're currently not an Elixir/Phoenix developer, I'd consider a framework like Django that has the capability to implement everything you require and then some right out of the box. To be blunty honest, WordPress absolutely sucks for e-commerce (Middle Finger at you, WooCommerce), especially sites with things like discount rules and tiered pricing (admin is a PITA).
 
Why not a simple static site with markdown for content, snipcart for ecommerce ? When you need your quizzes and dB interactivity, build some JS widgets that calls to whatever api backend in whatever language you want, and use SQLite as your database.

Easy to backup, easy to maintain, Easy to develop.
 
Back