TaskFlow: Laravel API + React Kanban App

A complete full stack app in one repository: a tested Laravel 12 REST API and a React and TypeScript Kanban board that talks to it. The live demo runs the same front end against an in-browser mock of the API.

Open sourceLaravel
Illustration of the TaskFlow project
36
API feature tests
46
front-end tests
Laravel 12
Sanctum auth + Policies
React 19
TypeScript, strict

The challenge

A Kanban board looks simple until you make it correct: cards move between columns while positions stay contiguous, users can only touch their own data, and the UI feels instant even when the server is slow or fails.

I wanted one codebase that shows both halves done properly, and that a reviewer can run, test and read.

How I approached it

  1. 01

    A versioned API with a uniform error envelope

    Everything lives under /api/v1 with Form Request validation, API Resources and one JSON error shape. Auth routes are rate limited, and unauthenticated calls return a JSON 401 even without an Accept header (a bug the tests caught).

  2. 02

    Authorization in Policies, not controllers

    Projects and tasks are protected by ownership Policies, with tests that assert 403 for other users' records and 404 for missing ones.

  3. 03

    Reordering inside a transaction

    Moving a card within or across columns rewrites positions in a single database transaction, keeping them contiguous. A test proves the whole move rolls back if a write fails midway.

  4. 04

    Optimistic UI with rollback

    Board state is a pure reducer. Moves apply instantly, and if the request fails the board rolls back to a snapshot. The demo has a 'Simulate network failure' switch so you can watch it happen.

  5. 05

    One typed API interface, two adapters

    The front end depends on a single Api interface with an httpAdapter (real Laravel) and a mockAdapter (in-memory, localStorage). A shared contract test suite runs against the mock, and the unused adapter is tree-shaken out of each build.

  6. 06

    Drag and drop that works with a keyboard

    Cards use HTML5 drag and drop plus labelled move buttons and live-region announcements, and the task editor is a native accessible <dialog>.

Deliberate trade-offs

  • The hosted demo uses the mock adapter, because the portfolio is a static site. The real HTTP adapter is unit tested with a stubbed fetch and smoke-tested by hand against a local Laravel server, but it has no automated browser test against a live API.
  • Tokens are kept in localStorage for simplicity, and rollback uses a snapshot, so overlapping in-flight edits could interact badly. Both are documented in the README.

What I built

  • Designed the REST API, policies, validation and the transactional reorder endpoint.
  • Wrote 36 PHPUnit feature tests covering auth, token revocation, rate limiting, 422/403/404 cases and reorder rollback.
  • Built the Kanban board, task dialog, due-date highlighting, priority badges, light/dark mode and responsive layout.
  • Wrote 46 Vitest tests: adapter contract, board reducer, components and app-level flows including keyboard moves and rollback.
  • Added a CI workflow and a README with an API table, architecture notes and run instructions.
Personal showcase project with demo data, not client work. The live demo runs on an in-browser mock of the API; the full Laravel API is in the repository.

What this project demonstrates

  • Laravel and React built together, with one contract between them
  • Policies, validation and transactions on the back end
  • Optimistic UI, rollback and accessible drag and drop on the front end
  • 82 automated tests across both halves

Related case studies

Laravel 12 / MySQL 8 / Redis / REST APIOpen Source

FinCore: Wallet & Double-Entry Ledger API

A versioned REST API for digital wallets where every credit, debit, transfer and reversal produces balanced ledger entries and a full audit trail. Built to show how money-handling code should behave when requests are retried, concurrent or malicious.

Have a project like this in mind?

Tell me what you're building. I'll reply by email with questions or a suggested approach.