A full-stack blog application: a Laravel 12 REST API (auth, posts, comments, likes) consumed by a React 19 + TypeScript frontend built with Inertia and shadcn/ui.
This project combines a modern Laravel backend with a React/TypeScript SPA frontend served through Inertia:
- API — Laravel 12 with Sanctum token authentication, resource controllers and Gate policies.
- Frontend — React 19 + TypeScript + Vite + Tailwind CSS, with shadcn/ui components.
- Quality — Pest feature/unit tests and GitHub Actions CI (Pint, Prettier, ESLint).
- Authentication: register, login, logout (Sanctum), email verification, password reset.
- Blog API: posts CRUD (
index/showpublic, create/update/delete authenticated), comments, likes. - Authorization:
PostPolicygates update/delete to the post owner. - Data model:
users,posts,comments,likeswith migrations, factories and seeders. - User settings UI: profile, password and appearance pages.
- CI:
tests.yml(Pest) andlint.yml(Pint + Prettier + ESLint) on push/PR todevelop/main.
- Backend: Laravel 12, Sanctum, Pest, Laravel Pint
- Frontend: React 19, TypeScript, Inertia.js, Vite, Tailwind CSS 4, shadcn/ui (Radix UI)
- Tooling: ESLint, Prettier, TypeScript (
tsc --noEmit) - CI: GitHub Actions
| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST |
/api/register |
— | Create an account |
POST |
/api/login |
— | Login, returns Sanctum token |
POST |
/api/logout |
✔ | Revoke current token |
GET |
/api/user |
✔ | Current user |
GET |
/api/posts |
— | List posts (with author, comments, likes count) |
POST |
/api/posts |
✔ | Create a post |
GET |
/api/posts/{post} |
— | Show a post |
PUT/PATCH |
/api/posts/{post} |
✔ (owner) | Update a post |
DELETE |
/api/posts/{post} |
✔ (owner) | Delete a post |
GET |
/api/posts/{post}/comments |
— | List a post's comments |
POST |
/api/posts/{post}/comments |
✔ | Comment on a post |
GET |
/api/posts/{post}/likes |
— | Like count for a post |
POST |
/api/posts/{post}/like |
✔ | Toggle like on a post |
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
# Run the Pest test suite
composer test
# or
php artisan test# Backend
composer install
php artisan serve
# Frontend (Vite dev server)
npm install
npm run devvendor/bin/pint # PHP code style
npm run format:check # Prettier
npm run lint # ESLint
npm run types # tsc --noEmitThe backend API and authentication flow are complete. The frontend currently ships the starter-kit pages (auth, settings, dashboard); the blog browsing/posting UI is the natural next step (the API endpoints it needs already exist).
MIT