AI-coded: MockScale

MockScale is a small log-viewer app modelled on a well-known log-management tool.


I built this thing in Cursor to show off in a job interview. You MIGHT be able to guess the company from the app name? Didn't get the job, but it was a fun project.

One of the interesting things about this app, is that it uses Vega-Lite for its bar chart - a "high-level grammar of interactive graphics", in which you design your chart in JSON. Much less painful to use than D3.js, in my opinion.

See a live demo

I no longer use Cursor, but Devin was OK to write a short technical description of the app. Take it away, Devin!

Tech Stack

Frontend. The UI is a Vue 3 single-page app built with Vite and styled with Tailwind CSS, with Vuex for state management. The dashboard has a paginated log list with severity colour coding, free-text search across all fields (metadata included), and filters for severity, repository and source. A side panel shows the full details of the selected entry. A Vega-Lite chart component shows how the currently filtered logs split across severity levels.

Backend. The data comes from a PHP 8 REST API backed by MySQL. The schema uses two tables: a logs table for the fields every entry has (timestamp, severity, repository, source, message) and a separate metadata table for the fields that vary between log types. That keeps queries on common fields fast and indexable without forcing every event into one rigid shape. The API offers full CRUD on logs, server-side search, filtering and pagination, statistics endpoints, JSON/CSV import and export, and a health check. It uses prepared statements and input validation throughout.

Hosting. The whole stack runs on ordinary shared hosting (Apache, PHP and MySQL) with no containers or cloud services. The frontend is built with Vite and uploaded by an FTP deploy script. Apache rewrite rules handle routing for the single-page app.

Why build it. The project began as a frontend-only mock that read a static JSON file. It then grew into a full-stack app, which meant going through the practical details of API design, schema design and deploying to a real environment.