HEY, I'M BEN.

I build things. I lead people. I figure stuff out.

Software engineer. Engineering leader. Former factory-floor problem solver.

Ben Leeth

The story so far.

Engineering Manager | Software Engineer | Technical Leader

I'm a software engineer and engineering leader with experience spanning full-stack development, technical architecture, and team management. My career began on manufacturing floors before transitioning into software development in 2012. That unconventional path shaped how I approach engineering: understand the problem, work through the details, and build practical solutions.

As an engineering leader, I believe in staying technically involved, helping people recognize their potential, and creating an environment where teams can do serious work without taking themselves too seriously.

Outside of work, I'm a husband, father, motorcycle enthusiast, and someone who enjoys building things and figuring out how they work. Whether it's software, electronics, or something mechanical, there's always something new to learn.

More about me →

WHAT I BRING TO THE TABLE

Qualifications.

Engineering Leadership

  • Team Development
  • Technical Mentorship
  • Career Development
  • Promotion Advocacy
  • Agile Delivery
  • Technical Direction

Software Engineering

  • Full-Stack Development
  • Application Architecture
  • API Development & Integration
  • Code Reviews
  • Production Troubleshooting

Languages & Frameworks

  • JavaScript
  • Vue.js
  • Java
  • Spring Boot
  • PHP
  • Laravel
  • WordPress
  • SCSS

Tools & Platforms

  • MySQL/MariaDB
  • AWS
  • Git
  • CI/CD
  • Vite
THINGS I'VE BUILT

Portfolio.

A collection of projects I've built, contributed to, and helped bring to life.

UNDER THE HOOD

Code Examples.

A look at how I approach real engineering problems.

PHP Examples

Dynamic Vite Asset Resolution

When migrating my Laravel and Twill-powered portfolio from Laravel Mix to Vite, I needed to preserve an existing system where content blocks declare their own JavaScript and stylesheet dependencies. I built a PHP resolver that parses the rendered HTML, identifies block-specific assets, maps legacy paths to Vite entry points, and generates the appropriate asset tags. The implementation deduplicates dependencies, supports development and production builds through Laravel's Vite integration, and allows existing Twill blocks to continue working without individual rewrites.

VIEW SOURCE CODE HIDE SOURCE CODE
public function resolve(string $html): string
{
    $dom = new DOMDocument();

    $previous = libxml_use_internal_errors(true);
    $dom->loadHTML($html);
    libxml_clear_errors();
    libxml_use_internal_errors($previous);

    $xpath = new DOMXPath($dom);

    $entries = [];
    $externalScripts = [];

    $nodes = $xpath->query(
        '//link[@rel="stylesheet" and @data-concatenate="true"]'
        . ' | //script[@data-concatenate="true"]'
        . ' | //script[@data-concatenate="false" and @data-placement="above"]'
    );

    foreach (iterator_to_array($nodes) as $node) {
        if (! $node instanceof DOMElement) {
            continue;
        }

        $url = $node->tagName === 'link'
            ? $node->getAttribute('href')
            : $node->getAttribute('src');

        if ($node->getAttribute('data-concatenate') === 'false') {
            if ($url !== '') {
                $externalScripts[$url] = true;
            }
        } else {
            $entry = $this->sourcePath($url);
            $entries[$entry] = true;
        }

        $node->parentNode?->removeChild($node);
    }

    $viteTags = '';

    if ($entries !== []) {
        $viteTags = (string) Vite::useBuildDirectory('build')->usePreloadTagAttributes(function ($src, $url, $chunk, $manifest) {
            return isset($chunk['isEntry']) && $chunk['isEntry'] ? false : [];
        })(
            array_keys($entries)
        );
    }

    $head = $xpath->query('//head')->item(0);

    if (! $head) {
        throw new RuntimeException('HTML document has no head.');
    }

    $this->appendHtml($dom, $head, $viteTags);

    $body = $xpath->query('//body')->item(0);

    if ($body) {
        foreach (array_keys($externalScripts) as $url) {
            $script = $dom->createElement('script');
            $script->setAttribute('src', $url);
            $body->appendChild($script);
        }
    }

    $this->removePlaceholder(
        $xpath,
        '//link[@rel="stylesheet" and @data-placement="all"]'
    );

    $this->removePlaceholder(
        $xpath,
        '//script[@data-placement="all" and not(@src)]'
    );

    return $dom->saveHTML();
}
private function sourcePath(string $url): string
{
    $path = parse_url($url, PHP_URL_PATH);

    if (! is_string($path)) {
        throw new RuntimeException("Invalid asset URL: {$url}");
    }

    if (str_starts_with($path, '/assets/js/')) {
        $entry = 'resources/js/'
            . substr($path, strlen('/assets/js/'));
    } elseif (str_starts_with($path, '/assets/css/')) {
        $relative = substr($path, strlen('/assets/css/'));

        $entry = 'resources/scss/'
            . preg_replace('/\.css$/', '.scss', $relative);
    } else {
        throw new RuntimeException(
            "Unsupported asset URL: {$url}"
        );
    }

    if (! is_file(base_path($entry))) {
        throw new RuntimeException(
            "Vite source file not found: {$entry}"
        );
    }

    return $entry;
}
PHP Examples

Motorcycle Catalog API with Laravel

For MyRideWish, I developed a Laravel API that provides a cascading motorcycle selection process: year, make, model, and variant. Each endpoint validates its input and uses Eloquent relationships to return only motorcycles matching the preceding selections. This prevents users from selecting combinations that don't exist in the catalog. To reduce repeated database queries, the API caches results for 24 hours using parameter-specific cache keys. The implementation keeps the frontend selection process responsive while supporting a growing motorcycle catalog.

VIEW SOURCE CODE HIDE SOURCE CODE
public function makes(Request $request): JsonResponse
{
    $data = $request->validate([
        'year' => ['required', 'integer', 'between:1885,2100'],
    ]);

    $year = (int) $data['year'];

    $makes = Cache::remember(
        "motorcycle-catalog:makes:{$year}",
        self::CACHE_TTL,
        fn () => MotorcycleMake::query()
            ->whereHas('models.variants', function ($query) use ($year) {
                $query->where('year', $year);
            })
            ->orderBy('name')
            ->get(['id', 'name'])
            ->toArray()
    );

    return response()->json($makes);
}
public function models(Request $request): JsonResponse
{
    $data = $request->validate([
        'year' => ['required', 'integer', 'between:1885,2100'],
        'make_id' => ['required', 'integer', 'exists:motorcycle_makes,id'],
    ]);

    $year = (int) $data['year'];
    $makeId = (int) $data['make_id'];

    $models = Cache::remember(
        "motorcycle-catalog:models:{$year}:{$makeId}",
        self::CACHE_TTL,
        fn () => MotorcycleModel::query()
            ->where('motorcycle_make_id', $makeId)
            ->whereHas('variants', fn ($query) =>
                $query->where('year', $year)
            )
            ->orderBy('name')
            ->get(['id', 'name'])
            ->toArray()
    );

    return response()->json($models);
}
JavaScript Examples

Reactive Infinite Scrolling with Vue 3

For my personal video library, I built a Vue 3 component that retrieves television series from a Laravel API and progressively loads additional results as users scroll through the page. The implementation uses Vue's Composition API to manage pagination, loading state, and reactive collections while preventing overlapping API requests. The component also integrates reusable image and metadata modal components, allowing users to view series information and manage playlists without leaving the listing.

VIEW SOURCE CODE HIDE SOURCE CODE
const seriesData = ref({ series: [], userId: null, inPlaylist: [] });
const page = ref(1);
const hasMore = ref(true);
const isLoading = ref(false);

const fetchSeries = async () => {
    if (isLoading.value || !hasMore.value) return;

    isLoading.value = true;

    try {
        const { data } = await axios.post(
            '/api/homepage-series',
            { page: page.value },
            Utils.postConfig
        );

        const result = data.homepageSeriesData;
        const newSeries = result.series;

        if (page.value === 1) {
            seriesData.value = result;
        } else {
            seriesData.value.series.push(...newSeries);
        }

        hasMore.value = page.value < result.totalPages;
        page.value++;
    } catch (error) {
        console.error('Failed to load series:', error);
    } finally {
        isLoading.value = false;
    }
};
const handleScroll = () => {
    if (isLoading.value || !hasMore.value) return;

    const seriesListing = document.querySelector('.series-listing');

    if (!seriesListing) return;

    const items = seriesListing.querySelectorAll('.video-listing__item');
    const lastItem = items[items.length - 1];

    if (!lastItem) return;

    const { top } = lastItem.getBoundingClientRect();

    if (top <= window.innerHeight + 600) {
        fetchSeries();
    }
};

onMounted(() => {
    fetchSeries();
});

onActivated(() => {
    window.addEventListener('scroll', handleScroll);
});

onDeactivated(() => {
    closeModal();
    window.removeEventListener('scroll', handleScroll);
});

onBeforeUnmount(() => {
    window.removeEventListener('scroll', handleScroll);
});
Java Examples

Priority-Based Content Selection in Java

A Java implementation demonstrating how to evaluate and select content based on multiple business rules. Using the Java Stream API, candidates are filtered by their activation dates and the current page's category. Eligible items are then sorted by priority, with the highest-priority item selected. The implementation demonstrates declarative filtering, date comparisons, comparator-based sorting, and handling cases where no eligible content exists. This is a generic example based on a real-world engineering problem, using an independent data model rather than proprietary application code.

VIEW SOURCE CODE HIDE SOURCE CODE
import java.time.LocalDate;

public record ContentItem(
    String id,
    String category,
    LocalDate activeFrom,
    LocalDate activeUntil,
    int priority
) {}
import java.time.LocalDate;
import java.util.Collection;
import java.util.Comparator;
import java.util.Objects;
import java.util.Optional;

public class ContentSelector {

    public Optional<ContentItem> select(
        Collection<ContentItem> items,
        String pageCategory,
        LocalDate today
    ) {
        return items.stream()
            .filter(item ->
                Objects.equals(item.category(), pageCategory)
            )
            .filter(item ->
                item.activeFrom() == null ||
                !today.isBefore(item.activeFrom())
            )
            .filter(item ->
                item.activeUntil() == null ||
                !today.isAfter(item.activeUntil())
            )
            .sorted(
                Comparator.comparingInt(ContentItem::priority)
                    .reversed()
            )
            .findFirst();
    }
}
THE PROFESSIONAL STUFF

Résumé.

Want the details? Here's a closer look at my experience, technical background, and engineering leadership.

DOWNLOAD RÉSUMÉ
The rivalry continues Live counter

Since Packers Lost to Bears.

Some things are worth keeping track of.

0 YEARS
0 DAYS
0 HOURS
0 MINUTES
0 SECONDS

Yes, I'm keeping count.

LET'S TALK

Contact Me.

Have an opportunity, a project, or just something worth talking about? I'd like to hear from you.

No corporate jargon required. Just say hello.

All fields are required. No spam, no nonsense.