Croatian Car Import Tax Calculator by Mario ŽitkovićCroatian Car Import Tax Calculator by Mario Žitković

Croatian Car Import Tax Calculator

Mario Žitković

Mario Žitković

Croatian Car Import Tax Calculator

Full-stack web application for calculating Croatian vehicle import costs from vehicle data and online listings.

Main page of the application
Main page of the application
Stack: Next.js · FastAPI · Python · PostgreSQL · Docker · nginx

The problem

Vehicle import calculations depend on several pieces of vehicle data and Croatian tax rules.
The difficult part is not just implementing the formulas. Information such as CO₂ emissions, original vehicle pricing or the exact model variant may be incomplete or missing from the listing itself.
A wrong assumption can materially change the result, so I wanted the application to avoid silently guessing when the data is ambiguous.

What I built

The application consists of:
a Next.js frontend for entering vehicle data and presenting the calculation
a FastAPI backend containing the tax logic and data-processing pipeline
PostgreSQL for structured vehicle and pricing data
scraping integrations for several vehicle-listing websites
a catalogue created from 2,163 official vehicle price lists
Docker-based deployment on a Hetzner VPS Users can either enter data manually or provide a supported listing URL.
The application extracts whatever information is available, matches the vehicle against the processed datasets and asks the user to confirm uncertain matches instead of silently choosing one.

Correctness over guessing

One of the main design decisions was how to handle incomplete or ambiguous vehicle information. I considered automatically selecting the closest matching model, but rejected that approach because a silent mismatch could produce a convincing but incorrect financial result. Instead, the application uses a tiered resolution process:
extract data from the listing
match it against structured vehicle data
use fallback data sources where necessary
ask the user to confirm when more than one plausible match remains
That creates slightly more friction, but it makes uncertainty visible instead of hiding it.

Testing the tax engine

I implemented the tax rules from the relevant Croatian regulations and verified the calculation against an official Croatian Customs worked example.
The tax engine is covered by 243 automated tests.
This was important because even small changes to thresholds, vehicle values or emissions data can affect the result.
Itemised output showing the individual components of the calculated import cost.
Itemised output showing the individual components of the calculated import cost.

Data processing

The application also required turning official vehicle price information into something that could be queried programmatically.
I processed 2,163 official price lists and built a structured dataset that the application can use during vehicle matching and calculation.
I also built scrapers for four vehicle websites so users do not always have to manually copy information from a listing.

Deployment

The application runs in production on a Hetzner VPS. The deployment includes:
Docker
nginx
PostgreSQL
production environment configuration
automated deployment workflow
I maintain both the application and the production environment.

Result

The result is a production web application that takes a process involving multiple rules and fragmented data sources and turns it into a single guided calculation.
The project demonstrates my ability to own a product end to end: requirements, architecture, frontend, backend, data processing, testing and deployment.
Like this project

Posted Sep 22, 2026

Full-stack web application for calculating Croatian vehicle import costs from vehicle data and online listings.