Skip to content
Ákos Kappel
Language: en
Theme
Light
Dark

SmartTech e-shop

Smartphone shop with typo-tolerant search, filters, a three-step checkout and an admin area.

Live demoSource code

Runs on my home server, so it may be offline now and then (for example during a power or internet outage).

Smartphone catalog with filters

About the project

The semester project for the Web Technologies course at FIIT STU in the winter of 2021, made in a pair, and my first Laravel project. The task was a server-rendered shop with filters, search, a cart that survives logout, guest checkout, accounts and an admin area.

Later I redesigned it, then upgraded it step by step to Laravel 13, covered it with tests first and moved it to my home server.

What you can try

  • Search that forgives typos (try "samsng"), with suggestions while you type
  • Filters for price, brand, colour, memory, display size and system, each with a live count of matching phones
  • Filtering, sorting and paging without page reloads, with clean URLs you can share
  • Three-step checkout with delivery and payment options, also as a guest
  • The cart is saved when you log out and merged when you log in again
  • The whole shop in English, German and Slovak, each language under its own URL
  • Sale prices and discount codes; the cart suggests one to try in the demo
  • Reviews with star ratings, a wishlist and a side-by-side comparison of up to four phones
  • Order history with the status of each order
  • Ctrl+K quick find for pages and phones, and a dark mode
  • Admin area for products and photos, orders and their status, discount codes, visitor statistics without cookies, translations and planned maintenance
  • Try the admin area with "Try the admin demo": a throwaway account whose products only it can see, deleted every night

Highlights

  • Fuzzy search with PostgreSQL trigrams and live suggestions
  • Filters, sorting and pagination without page reloads
  • Guest checkout, cart kept across sessions, stock tracking
  • Automated tests in GitHub Actions, Docker Compose deployment

Under the hood

  • About 140 tests run against PostgreSQL in GitHub Actions
  • Admin routes protected by gates and a policy; demo admins have their own rate limit and never touch the shop's products or orders
  • A read-only JSON API for the catalog, public and rate-limited per visitor
  • Canonical links, structured data for products and breadcrumbs, a sitemap and hreflang links between languages
  • Uploaded photos are re-encoded, scaled down and get WebP thumbnails; unexpected errors show a reference code that is also written to the log
  • I replaced the cart library with my own class after finding that saved carts could never be restored: PostgreSQL cut the serialized text at the first null byte
  • Typo-tolerant search with PostgreSQL trigram similarity
  • Docker Compose with PHP-FPM, nginx and PostgreSQL, a nightly demo reset, rate limiting and a health check

Architecture

  1. 1BrowserServer-rendered Blade pages styled with Tailwind CSS
  2. 2Tailscale FunnelPublic HTTPS from a sidecar container
  3. 3nginxWeb server in front of PHP-FPM
  4. 4LaravelCatalog, cart, checkout and admin on PHP-FPM; a scheduler container resets the demo every night
  5. 5PostgreSQLProducts and orders, with trigram search

Changelog

  • Tests written first, then Laravel 8 and PHP 8.1 to Laravel 13 and PHP 8.5, one major version at a time
  • Tailwind CSS from the CDN to a local Tailwind 4 build
  • PostgreSQL 18
When
2021 – 2026
Type
Team
Versions
  • Laravel 13
  • PHP 8.5
  • PostgreSQL 18
  • Tailwind CSS 4
Stack
  • Laravel
  • PHP
  • PostgreSQL
  • Tailwind CSS
  • Docker
  • nginx
  • Tailscale
  • GitHub Actions
Home page of the SmartTech shop with a phone and three reasons to buy
Home page with the demo banner, search and language switcher.
Product page of a Sony phone with quantity, total price and an add to cart button
Product detail with quantity, live total and specifications.
Search suggestions for the misspelt query samsng, listing Samsung phones with photos and prices
Live suggestions find Samsung phones even for "samsng".
Smartphone catalog in the dark theme filtered to Apple, Google and Samsung, sorted by price
The catalog in the dark theme, with brand filters shown as removable chips.
Shopping cart with one phone, a quantity selector, a discount code field and the total
The cart with a field for discount codes.
Admin product list with search, sorting, thumbnails, prices and stock badges, and a demo admin notice
The admin product list, opened with a throwaway demo admin account.

1 of 6

Home page of the SmartTech shop with a phone and three reasons to buy

Home page with the demo banner, search and language switcher.