Place4Market — classifieds board

A free classifieds site for Serbia: people and companies sell and rent out cars, flats and electronics, and offer jobs and services.

RoleSole developer — from scratch to launch and ongoing support: architecture, backend, frontend, database, admin panel, SEO, server and deployment
StackPHP 8.5 · MariaDB · vanilla JS · OpenLiteSpeed — no frameworks and no third-party PHP libraries
Site languagesSerbian in Latin script, Serbian in Cyrillic, English; admin panel in English and Russian

In short — if you are not a developer

What the site is

Place4Market is a free classifieds site: people and companies sell and rent out cars, flats and electronics, and offer jobs and services. It runs in three versions — Serbian in Latin script, Serbian in Cyrillic and English — so it works both for locals and for foreigners.

I built the whole project on my own, from scratch to launch, and I keep supporting it: I designed how the site works, wrote the site and the admin panel, set up the server, email and automatic deployment, prepared the site for Google and got it into search.

What it achieved

  • Top Google scores. PageSpeed checks a site in four areas — speed, accessibility, best practices and SEO. The home page and catalogue pages get 100 out of 100 in all four; the rest get 98–100 for speed and 100 for everything else, on phone and desktop. For a classifieds board with dozens of photos per page, that is rare.
  • Pages open in 1–2 seconds on a phone, and nothing jumps around while loading.
  • Ready for search from day one: 471 pages built around what people actually search for — “flats for sale in Zemun”, “used Volkswagen” — and texts for every section in two languages.
  • Comfortable on any device — from a small phone to a large monitor.
  • Reliable: every error is logged and sent as an alert, data is backed up daily, and updates go live without taking the site down.
  • Tested: three full audits of code and server for bugs and vulnerabilities, a manual check of every feature together with the client, and an automated crawl of every page.

What the site does

  • For buyers: 20 sections and 163 subsections, filters by price, city and district, brand and condition — results update instantly. Search finds a listing even if the query is in Latin script and the listing is in Cyrillic. The site remembers the chosen city.
  • Favourites and saved searches: the site emails you when a price drops or a matching new listing appears.
  • For sellers: a listing takes a couple of minutes, with a live preview. Up to 12 photos — the phone shrinks heavy pictures and strips location data. Video up to a minute is compressed right on the phone: 100 MB turns into about 15 MB in a few seconds.
  • Managing listings: take down, restore, bump, renew, mark as sold — the profile shows how much has been sold and for how much.
  • Protection from spammers: a seller’s phone number is visible only to registered users. Only someone who actually messaged the seller can leave a review.
  • Built-in messenger: messages arrive without reloading, with read receipts. On a phone the chat opens full screen and adapts to the keyboard.
  • An admin panel for the owner in English and Russian that works on a phone too: listing review, complaints, users, sections and texts for Google, settings, error log, costs and Excel export — all without a programmer.

In depth — for developers

Results in numbers

  • Lighthouse (mobile and desktop, 16 templates): Performance 98–100, Accessibility 100, Best Practices 100, SEO 100 after indexing was opened.
  • Core Web Vitals (lab, mobile): LCP 1.1–1.9 s, CLS 0, TBT 0–3 ms; on desktop LCP 0.5–0.8 s.
  • Accessibility: WCAG 2.1 AA — axe reports nothing on key pages at two widths; tap targets of at least 44 px.
  • Size: ~21,800 lines of PHP, ~9,100 of CSS, ~3,500 of JS (without libraries and dictionaries), 150 PHP files, 35 DB migrations; ~790 interface strings per language version.
  • Quality: 3 rounds of code and server audits, a 16-chapter manual checklist, a crawl of 1,371 sitemap URLs and ~5,000 links — 0 5xx errors, 0 links to redirects.

Stack

  • Backend: PHP 8.5 with no frameworks and no Composer dependencies — from routing and the SMTP client to signing S3 requests.
  • Database: MariaDB 10.11, InnoDB, utf8mb4; migrations through an own migrator.
  • Frontend: semantic HTML, CSS on design tokens, vanilla JS with defer and data attributes — no jQuery, no frameworks.
  • Media: PHP GD (photos, WebP), ffmpeg and ffprobe (video), WebCodecs and Mediabunny (in-browser video compression).
  • Server: VPS on AlmaLinux 9, DirectAdmin, OpenLiteSpeed and lsphp, CSF, cron, systemd; mail — exim with DKIM, SPF and DMARC.
  • CI/CD: GitHub Actions — esbuild → rsync over SSH → migrations → atomic release.
  • Integrations: Google Analytics 4 with Consent Mode v2, Search Console, National Bank of Serbia exchange rate; ready and switched on by a setting — Twilio Verify, S3-compatible storage, external SMTP, Telegram alerts.

Architecture

  • Own router: human-readable URLs in three languages (/oglasi/vozila/automobili/volkswagen/beograd, /cir/…, /en/listings/vehicles/cars/…) are parsed into a page and parameters; an unknown URL gets its own 404 in the prefix language.
  • One bootstrap for every page: logging and error capture → helpers → SEO → security headers → language → DB → auth → mail → maintenance mode → URL canonicalisation.
  • Layers: all SQL lives only in the data repository (220+ functions), pages receive ready arrays; output goes through templates, always escaped.
  • Progressive enhancement: every link is real and every form works without JS; scripts add live filters, uploads, chat and notifications.
  • Background jobs are console scripts on cron: web PHP on this server cannot launch external programs, and the video queue is designed around that.

Catalogue and listings

  • A two-level category tree, deal type (sale, rent…), kind, brand, city and district — all part of the page URL.
  • Filters without reloads on desktop (fetch and history.pushState, Back works, focus is kept); on a phone — a sheet with a live “Show 12 listings” counter. Without JS — a regular form with the same URLs.
  • Search over normalised text: Latin finds Cyrillic and vice versa, ignoring case and diacritics (cacak → Čačak).
  • Photos: up to 12; in the browser — EXIF rotation, downscaling to 2,560 px and geotag removal (5–12 MB → ~1 MB); on the server — content-based checks, 5 WebP sizes, the frame’s average colour as a placeholder (CLS 0), a watermark.
  • Video up to a minute: on-device compression via WebCodecs (105 MB → 16 MB in 5 s), chunked upload with resume, background ffmpeg processing, protection against “video playlists”. On the page — a facade: the video tag is created only on click.
  • Smart pre-moderation: editing only the price, currency, negotiability or photo order does not send a listing back for review; stop words always do.
  • The seller’s number is not in the page — it is fetched on request by signed-in users only. 93 attribute sets across subcategories.

Users and messaging

  • “Remember me” on the selector:validator scheme with token rotation that behaves correctly under concurrent requests from several tabs; password reset, email confirmation and email change by code.
  • Serbian phone normalisation, a +381 input mask, SMS verification via Twilio Verify.
  • Messenger: conversations per listing, read ticks, quoted replies, unsending unread messages; on a phone — a full-screen mode that follows the on-screen keyboard (visualViewport).
  • Browser notifications — a toast, a sound and a system notification in a background tab; 13 email templates in the recipient’s language.
  • Seller reviews only from real conversation partners; trust badges — email, phone, company.

Admin panel

  • 19 sections, two layouts (desktop and phone), English and Russian — each staff member picks their own.
  • Moderation with a rejection reason in the seller’s language, bulk actions, complaints with resolution options, roles, “sign out everywhere”.
  • Categories with names in three languages and SEO fields; when a URL changes, the old one answers with a 301. 471 landing pages with demand, listing counts and indexing status.
  • Error and action logs, migrations with an apply button, storage and costs, orphaned-file search, backups, Twilio balance; CSV export with CSV-injection protection.

SEO

  • Three language versions with their own URLs and hreflang sr-Latn / sr-Cyrl / en + x-default; language is determined by the URL only.
  • Cyrillic is generated from Latin — interface, site texts and user texts on the fly; brands, models, emails and English words stay in Latin script.
  • One page, one URL: old URLs, ?lang=, case, trailing slash, former titles and invalid pagination → 301 to the canonical; utm tags are preserved.
  • Keyword research with Keyword Planner and competitors → catalogue structure and 471 landing pages. SEO texts for all 183 categories and 272 landing pages; links inside texts appear only while the target page is indexable.
  • Indexed: clean categories, landing pages with listings, listings and sellers; search, filters and empty pages are noindex, follow.
  • JSON-LD: Organization, WebSite with SearchAction, BreadcrumbList, ItemList, Product and Offer, VideoObject, ProfilePage, FAQPage; a dynamic sitemap split into parts of 10,000 entries.

Performance and responsive layout

  • Own fonts: variable woff2, subset by script, metric-matched fallbacks so text does not jump on swap; only two above-the-fold files are preloaded.
  • srcset and sizes from the measured width of every slot, fetchpriority=high for the first row of cards, lazy below the fold.
  • Facades instead of heavy things: video and analytics; the video compression library (113 KB gzip) loads only when a file is chosen. Dropdowns build their options on first open — 400 fewer DOM nodes on results pages.
  • Four device classes, a 360 px reference, no horizontal scroll down to 320 px; inputs of at least 16 px — no zoom on iOS.
  • A token-based design system: the site rebrand (logo, colours, fonts) was done without touching components.

Security and operations

  • Prepared SQL statements, escaping of all output, CSP without inline scripts, HSTS and the other headers; a CSRF token on every POST, an ownership check in every data-changing function (IDOR protection).
  • Email tokens are single-use and expiring, with only a hash in the DB. Rate limits on every repeatable action, with breaches written to the log.
  • A log of every error — PHP, DB, mail, external APIs and browser JS via sendBeacon; if the DB is down, to files with later import. Critical ones go by email or Telegram with duplicate suppression.
  • Zero-downtime deploys: push to main → GitHub Actions → rsync into a release folder → migrations before the code release → publish; the deploy key is restricted by a forced-command gateway.
  • Daily backups of the database and uploads with integrity checks; storage is abstracted — local disk or S3-compatible cloud through an own AWS Signature V4 implementation.
  • A move to a dedicated server mid-project: account, DNS, mail, SSL, adaptation to OpenLiteSpeed — with no data loss.

What next

Other work is in the portfolio on the home page. If you need a similar site, timelines and price ranges are on the how much a website costs page.