Danilo.codes

Treeland Nursery — Custom E-commerce Platform

A fully custom e-commerce platform built with MedusaJS and Next.js, including a bespoke admin, advanced search, region-based pricing, and a growing CMS & POS roadmap.

Next.jsMedusaJSNode.jsPostgreSQLRedisMeiliSearchTypeScriptDocker

Overview

Treeland Nursery is a Texas-based nursery selling trees and plants, with complex pricing, delivery, and planting rules that depend on location, volume, and product type.

This project started as a full rewrite and redesign of their legacy WordPress + WooCommerce store, which was outdated, slow, and difficult to extend with the kind of business logic they needed.

Together with one other developer, I designed and built a fully custom e-commerce platform on top of MedusaJS and Next.js:

  • A custom MedusaJS backend
  • A fully custom Next.js admin dashboard
  • A fully custom Next.js storefront
  • Advanced search powered by MeiliSearch
  • Region-based pricing using geolocation + map regions
  • Custom checkout, discount, and product logic
  • Redis caching and performance optimizations

This platform is now in production and actively used by the business. Because the client was happy with the results, we are continuing development into Phase 2, which will expand the system into a full content and operations platform (CMS + POS + inventory management).

Treeland Nursery storefront landing page
Storefront landing page

Context & Problem

The old WooCommerce store had several issues:

  • Very slow and outdated UX
  • Difficult to customize product logic and pricing rules
  • No good way to implement complex search and filtering
  • Checkout and pricing logic could not support:
    • Region-based delivery & planting prices
    • County-specific rules inside Texas
    • Custom volume discounts
    • Additional checkout questions and flows
  • Admin workflows were slow and not tailored to their business

At the same time, the business was growing and needed:

  • A modern, fast storefront
  • A custom admin tailored to their workflows
  • A flexible product and pricing model
  • A powerful search experience
  • A fully custom checkout flow
  • A platform that could scale with both sales and content

High-Level Solution

We chose:

  • MedusaJS as the commerce backend foundation
  • Next.js for both the storefront and the admin
  • MeiliSearch for fast, faceted product search
  • Redis for caching and performance
  • PostgreSQL as the primary database

Because the client’s requirements were far beyond what Medusa’s default admin and storefront could support, we:

  • Built a completely custom admin dashboard in Next.js
  • Built a completely custom storefront in Next.js
  • Overrode and extended parts of Medusa’s product, cart, and pricing models
  • Implemented custom authentication, authorization, and business logic

The result is a Medusa-based but fully bespoke e-commerce platform adapted precisely to the client’s business.

MedusaJS Backend
Node.js, custom extensions
PostgreSQLRedisMeiliSearch
Admin Dashboard
Next.js, custom UI
MedusaJS Backend
Storefront
Next.js, custom UI
MedusaJS Backend
PostgreSQL
Primary database
Redis
Caching
MeiliSearch
Search & filtering

Architecture

Backend

  • MedusaJS (Node.js)
  • PostgreSQL
  • Redis for caching
  • MeiliSearch for search & filtering
  • Custom extensions for products, pricing, cart, and checkout logic

Admin Dashboard (Next.js)

  • Custom UI for managing products, pricing, regions, orders, and content
  • Custom role-based access control
  • Two-factor authentication (2FA)
  • Workflows tailored to the client’s operations

Storefront (Next.js)

  • Fully custom product listing and product pages
  • Advanced faceted search (MeiliSearch)
  • Table view and grid view for products
  • Custom checkout flow
  • SEO and performance optimizations
Storefront landing
Storefront landing page

Phase 1 — Custom E-commerce Platform

Phase 1 focused on replacing the legacy WooCommerce store and delivering a modern, fast, and flexible commerce system.

1. Custom Admin Dashboard

We could not use Medusa’s built-in admin because:

  • Product and pricing logic was heavily customized
  • The client needed custom workflows
  • We needed fine-grained access control and 2FA

So we built a bespoke admin app in Next.js with:

  • Custom product management
  • Custom pricing and region management
  • Role-based access control
  • Two-factor authentication
  • Interfaces tailored to real business processes
Admin login page
Admin login with 2FA
Admin products list
Product management
Admin product detail page
Product detail in admin

2. Advanced Search & Filtering (MeiliSearch)

The product catalog is large and complex, so search had to be:

  • Extremely fast
  • Faceted (by category, size, type, etc.)
  • Able to combine many filters
  • Performant under load

We implemented:

  • MeiliSearch indexing
  • Custom filter logic
  • Highly optimized queries
  • A UX that allows users to quickly narrow down exactly what they need

This became one of the most praised features by customers.

Product search and filters
Faceted search and filtering (MeiliSearch)

3. Region-Based Pricing with Map Data

Treeland only operates in Texas, but:

  • Prices vary by county and region
  • Delivery and planting costs differ by area
  • Taxes and rules depend on location

We built a system where:

  • The business can upload and manage .KML map regions
  • Each region has its own pricing rules
  • At checkout, we:
    • Geolocate the customer
    • Detect which region they’re in
    • Apply the correct pricing dynamically

This allows fully automated, location-aware pricing without manual intervention.


4. Custom Checkout Flow

The checkout is fully bespoke and includes:

  • Geolocation-based pricing logic
  • Custom volume discount rules
  • Additional business-specific questions
  • Custom validation and flows

All of this is built on top of Medusa’s core, but heavily extended and customized.

Cart page
Shopping cart
Checkout
Checkout flow
Delivery info check
Delivery information check
Delivery success
Delivery confirmation

Phase 2 — Content Platform & Operations (Planned / In Progress)

After Phase 1 launched successfully and the client saw strong results, we started planning Phase 2, which expands the platform beyond e-commerce.

1. CMS / Blog Platform (SEO & Content)

The business has writers producing:

  • Blog posts
  • Tree care guides
  • Educational content for customers

Currently, content is markdown-based. Phase 2 introduces:

  • A full CMS inside the admin
  • Rich content editing for non-technical writers
  • Content workflows and publishing tools
  • Better SEO tooling and structured content
  • Tight integration between content and products

The goal is to turn the platform into a content + commerce engine that supports long-term SEO and growth.


2. POS & Inventory Management System

Another major Phase 2 goal is to build a POS and inventory system that ties the entire business together:

  • Inventory tracking inside the admin
  • POS devices used by delivery & planting teams
  • Ability to:
    • Charge customers on-site
    • Sync orders, payments, and inventory in real time
  • Unified system connecting:
    • Online store
    • In-field operations
    • Inventory management
    • Accounting and reporting

This turns the platform from “just an online store” into a full operational backbone for the business.


My Role

I:

  • Led client communication and requirements gathering
  • Designed the overall system architecture
  • Made key technology and tooling decisions
  • Designed the UX structure of both admin and storefront
  • Built:
    • The Next.js storefront
    • The Next.js admin dashboard
  • Implemented:
    • Product filtering and search UI
    • Large parts of the custom product and pricing logic
    • Authentication and authorization features (including 2FA)
    • Various cart and checkout customizations
  • Worked on backend extensions where Medusa needed to be adapted to the business model

In practice, this was a full-stack, product-level ownership role spanning architecture, frontend, backend, and delivery.


Results & Impact

  • The new site is significantly faster and more reliable
  • The UX is modern, clear, and customer-friendly
  • Customers can:
    • Browse products in grid or table view
    • Use powerful search and filters
    • Create quotes and offers more easily
    • Find exactly what they need much faster
  • The business can:
    • Manage complex pricing rules easily
    • Adjust regions and prices without code changes
    • Operate more efficiently through the custom admin

After launch, the client reported:

  • Increased sales
  • Much better customer feedback
  • Far smoother internal workflows

While we don’t have exact public numbers, the platform replaced a slow, limiting legacy system and unlocked new business capabilities.


Tech Stack

  • Frontend: Next.js, React, TypeScript, Tailwind
  • Backend: MedusaJS, Node.js
  • Database: PostgreSQL
  • Caching: Redis
  • Search: MeiliSearch
  • Infrastructure: Docker, self-hosted services
  • Auth: Custom auth + 2FA
  • Maps & Regions: KML-based region system

Closing Thoughts

This project is a good example of:

  • Taking an off-the-shelf platform (MedusaJS)
  • Extending it deeply
  • And turning it into a fully custom, business-specific commerce and operations platform

It combines product thinking, architecture, frontend UX, backend customization, and real-world business constraints—and continues to evolve as the client’s business grows.

Read more