Building an E-Commerce Platform for a Local Organic Farm – A Self-Hosting Challenge

In this project, I used ChatGPT to generate a random client, who runs a local organic farm looking to build an online store to connect with customers directly. With the increasing demand for farm-to-table products, having a digital presence is no longer optional for small farms—it’s a necessity. To meet this need, I explored open-source, self-hosted solutions that fit within the client's budget and requirements.

The Client

Let’s start by reviewing the client profile that ChatGPT generated:

undefined

  • Client: Greenfields Organic Farm

  • Business: A local farm offering fresh, organic produce.

  • Goal: Establish an online store to sell products directly to customers.

Client Requirements:

undefined

  • Online Ordering System

  • Customer Management

  • Inventory Management

  • Self-Hosted Blog

  • Email Newsletter

Ideally, the client wants these systems to be integrated for a seamless experience.


Searching for the Right Solution

To find a suitable solution, I consulted NotebookLM and explored the “Awesome Self-Hosting” repository on GitHub. I asked: “Is there an online ordering system solution that fits?”
Among the options presented, some of the storefronts didn’t seem as user-friendly or inviting, so I decided to go with Bagisto, an open-source e-commerce platform built on Laravel. It stood out due to its extensive features, flexibility, and user-friendly interface, making it an ideal choice for this project.
Bagisto covered most of the client’s requirements out-of-the-box. The only missing feature was a self-hosted blog, but luckily, Bagisto has an extension for that: Blog for Bagisto. This plugin can be easily installed after Bagisto is set up.

Recap of Requirements:

  • Online Ordering System: ✅ Bagisto

  • Customer Management: ✅ Bagisto

  • Inventory Management: ✅ Bagisto

  • Self-Hosted Blog: ✅ Bagisto Plugin

  • Email Newsletter: ✅ Bagisto

 


Setting Up Bagisto

For the setup, we’ll be using Docker. Bagisto provides a ready-to-use GitHub repository that contains all the necessary files: Bagisto Docker Setup.
Here’s the process:

  1. Install Git and Docker on the server.

  2. Clone the Bagisto repository from GitHub.

  3. Follow the instructions in the README.md file.

However, before we run the setup.sh script, we need to ensure that we get the stable version of Bagisto. There are two ways to do this:

  1. Add --branch v.2.2.3 after the docker exec line in the setup block.

  2. Uncomment the line for the stable version in the setup.sh file.

This step is crucial to avoid potential bugs during setup.
Once everything is set up, you can run the setup.sh script and wait for it to build and pull the necessary containers. After you see the “finished” message, Bagisto will be fully installed on your system.

Setting Up the Blog Plugin

To install the Blog plugin, follow these steps:

  1. Enter the container’s shell to gain access to PHP:

    docker exec -it bagisto-docker-bagisto-php-apache-1 bash

  2. Navigate to the Bagisto folder:

    cd bagisto

  3. Follow the instructions on the Blog for Bagisto GitHub page.

Once installed, the blog menu should appear in the Bagisto admin console.

 


Customizing the Store

To populate the store with realistic sample data, I used ChatGPT to generate client details and product descriptions. Additionally, I used AI-generated tools to create visually appealing product images. These steps streamlined the process and made the store look professional.
The client’s email newsletter system was also set up, integrating seamlessly into Bagisto’s framework.

undefined


Conclusion

As mentioned, Bagisto provided nearly everything the client needed: a user-friendly storefront, powerful admin interface, customizable features, and integrations with multiple payment gateways. While the self-hosted blog feature required an additional plugin, it was easy to implement.
This project reaffirmed the value of self-hosting for small businesses. With open-source tools like Bagisto, local farms can establish affordable, sustainable online stores, while maintaining full control over their data and operations.
Have you tried setting up an e-commerce platform for a small business? I’d love to hear your thoughts and experiences in the comments!

What we used in this project