Case study · 2023
Newsify
A news site with a React front end and a Laravel API: accounts, a back office for the news, and news sorted into a category tree that expire on their own.
- 2023
- React
- Laravel
- Sanctum
- MySQL

- 100
- seeded news items
- 3
- levels of categories
- 7
- front-end routes
- 1
- day to build
The brief
A news app where signed-in users publish, edit and delete articles, and readers browse them by category. The design was kept deliberately plain: the work went into the back end, the data model and the routes.
Accounts
Signing up hashes the password; signing in returns a token (Laravel Sanctum) that the React app keeps and sends with every API call. The news routes only answer signed-in users.
News that expire
Every article has a start date and an expiry date. The API only returns news that has not expired yet, sorted by expiry, so the front page stays current on its own.
A category tree
Categories nest, each with a parent, up to three levels deep (Technology, then Computers, then Laptops). Opening a category shows its news and the news of all its subcategories.
Stack
React 18 with React Router, Axios and Bootstrap; Laravel 8 and MySQL; seeders that fill the site with 100 news items and the whole category tree.