NewsRoom API

A headless CMS REST API for a company newsroom, built with Laravel 12: writers publish articles, readers comment, and admins review content. Web clients use v1, mobile clients use v2.

Try the API in your browser → Source on GitHub

Try it in three steps

  1. Open the interactive docs and send POST /api/login; it is pre-filled with the writer account.
  2. Copy the access_token from the response.
  3. Open any protected endpoint, paste the token as the Bearer token, and press Send API Request.

Demo accounts

RoleEmailPasswordCan
Writerwriter@technova.compasswordcreate, edit, publish and delete own articles
Readerreader@technova.compasswordread and comment on articles
Adminadmin@technova.compasswordreview and manage all articles

Public endpoints (no token needed)

GET /api/v1/articlesPublished articles for web clients (paginated)
GET /api/v2/articlesThe same articles with reading time, tags and comment counts
GET /api/v2/articles/1One article with its comments
GET /api/v1/dashboardNewsroom statistics and top tags (cached)

What's inside

Versioned APIv1 and v2 share one codebase; v2 adds fields for mobile without breaking web clients.
Contextual bindingAdmin and writer controllers get different notification senders from the container.
No cache stampedeAn atomic lock lets one request rebuild the dashboard cache while the others wait.
Rate limiting60 requests per minute per user or IP address.
Events and jobsPublishing an article notifies employees through queued jobs; scheduled jobs archive old articles and build reports.
TestedPest feature tests run on every push with GitHub Actions.

Free hosting: the server sleeps when idle, so the first request can take up to a minute. The demo database is reset on every restart.