Built a self-hosted web analytics platform from scratch — basically a lightweight alternative to Google Analytics. Any website can drop in a small JavaScript snippet and it starts sending visit data to a Laravel API endpoint: URL, referrer, user agent, screen size, IP, and country.
The dashboard shows total views, today vs yesterday comparison, top pages, traffic sources, screen sizes, and a 7-day chart. Visitors are tracked per website, so multiple sites can be managed under one account.
The interesting backend work was around Eloquent — I got hands-on with query scopes to filter visits by date ranges and per website, accessors to clean up raw data before it hits the view (like formatting the user agent into readable browser/device info), and groupBy queries to aggregate visit counts by page, source, and date. This project is where a lot of Eloquent finally clicked for me.
Stack: Laravel, Livewire, Alpine.js, Tailwind CSS, MySQL, vanilla JS SDK for tracking.