Skip to content
Back to Portfolio
Advertising Operations2020 – 2023Software Engineer & R&D Core Team

Klasika — Kompas Classified Ads

Kompas's classified-ad platform — advertisers compose, price, schedule and order print ads for the Kompas newspaper, and readers browse published ads by category.

Node.jsExpress.jsEJSMySQLBootstrapjQueryDocker
Overview

About This Project

Klasika is Kompas's classified-advertising platform for the print newspaper. Advertisers pick a category (property, automotive, careers, miscellaneous or obituaries), choose an ad format, compose the ad, get an instant price quote, pick a publish date and payment method, and receive an order reference. Readers browse and search published ads by category.
Challenge

The Problem

Classified pricing is detail-heavy — formats priced per column-millimetre, per line or as fixed sizes, with surcharges, discounts, VAT and payment-method discounts — and publish dates must skip days the paper doesn't print. The legacy flow calculated prices in the browser, and old static URLs used for bookmarks and payment callbacks had to keep working.
Solution

How We Solved It

I moved the platform to a layered Express architecture (routes, controllers, services, repositories) with MySQL and server-rendered EJS views. A pricing service is the single source of truth for every quote and stored order, mirroring the legacy formula across fixed, line-based, mm-column and mm² formats, while a publish-date service rejects same-day and non-print-day bookings. Orders are created in a database transaction, ad content is sanitized, input is validated with Zod, optional images go through Multer, and payment confirmation sits behind an API key. Legacy .html URLs 301-redirect to the new routes with their query strings preserved.
Flow

How It Works

  1. 1

    Browse classified ads

    Visitors open the Express + EJS site and browse ads by group (property, automotive, careers, miscellaneous, obituaries) or search ads through the API.

  2. 2

    Choose a category and style

    The ad builder loads categories and their print styles from MySQL; each style defines column width, height rules and pricing type (fixed, per line, per mm-column or per mm²).

  3. 3

    Write the ad and get a quote

    As the ad text is entered, POST /api/orders/quote prices it on the server, including minimum height, surcharge, discount, payment-method discount and 11% VAT.

  4. 4

    Pick publish dates and place the order

    Publish dates must be from tomorrow onwards and not on holidays. The order, with optional uploaded images, is stored in a transaction and returns an order reference.

  5. 5

    Pay and track

    The finish page shows payment instructions and order status by reference; payment is confirmed through an API-key-protected endpoint that marks the order as paid.

Features

Key Capabilities

📰

Ad Composer

Format-specific composition for line ads, column ads, greetings and obituaries, with optional images.
🧮

Server-Side Pricing

Quotes calculated on the server including surcharges, discounts, VAT and payment discounts.
📆

Publish-Date Rules

Bookings from the next day onward, blocking dates without a print edition.
🔍

Category Listings & Search

Browse published ads by category and search across listings.
🧾

Order Tracking

Every order gets a reference for order and payment status.
🔗

Legacy URL Support

301 redirects keep old bookmarks and payment callbacks working.
Technical

Under the Hood

Frontend
Server-rendered EJS views with Bootstrap 5, jQuery, Slick and Flatpickr, reusing the established Kompas ad styles and composition forms.
Backend
Express with layered routes, services and repositories over MySQL (mysql2), Zod validation, sanitize-html, Multer uploads and Helmet.
Data
Relational schema for categories, ad styles, category-style mappings, payment methods, orders, ads and ad images, with transactional order creation.
Infrastructure
Node test runner suites for API, pricing and validation, packaged with Docker and delivered through Jenkins and Helm.
Results

Impact & Outcomes

Streamlined classified ad booking for the Kompas print edition

Server-side pricing as the single source of truth for every order

Legacy links and payment callbacks preserved through redirects

Reflection

What I Learned

Booking tools look simple but carry a lot of business rules. Pulling pricing and date rules into small, tested services instead of the browser made the system trustworthy for both advertisers and the finance team.

Other Projects