A modular Laravel 12 + Vue 3 (Inertia.js) application scaffold for content‑centric platforms (CMS / knowledge base / publishing) with opinionated domain separation, rich publishing models, and advanced security (WebAuthn security keys + TOTP two‑factor, recovery codes, roles & permissions).
- Documentation Index
- Setup & Local Development
- Features Overview
- Backend Guide (Laravel)
- Frontend Guide (Vue + Inertia)
- Security Overview
- WebAuthn Implementation
- Two-Factor Implementation
- API Tokens
- Avatar Upload
- User Manual
- Releases & Forking
- Contributing Guide
- Legal & Risk Notice
- Laravel 12 (PHP 8.4) with Inertia.js (Vue 3 + TypeScript)
- WebAuthn (security keys) and TOTP + recovery codes for multi-factor auth
- Domain oriented organization under
app/Domains/* - Auth/session management via Laravel Fortify
- Roles & permissions (spatie/laravel-permission)
- Media handling (spatie/laravel-medialibrary)
- Activity logging (spatie/laravel-activitylog)
- Rich Post & Page models (taxonomy: Categories, Tags)
- Horizon-ready for queued jobs
- Tailwind CSS v4 + Vite + TypeScript + ESLint + Prettier
- Pest (unit/feature) + Playwright (E2E)
- WebAuthn security keys (platform & roaming authenticators)
- TOTP 2FA with recovery codes lifecycle
- CSRF protection on all state-changing requests
- Server-side validation for authentication factors & credential attestation
- Role & permission enforcement (foundation for granular policy layer)
- Unique per-credential identification and last-used tracking
- Details:
contenta/documentation/SECURITY.mdandcontenta/documentation/WEBAUTHN_IMPLEMENTATION.md
- Details:
| Layer | Tools / Packages |
|---|---|
| Backend | Laravel Framework 12, Fortify, Horizon |
| Security | WebAuthn, Google2FA (pragmarx/google2fa-laravel + spomky-labs/otphp) |
| Auth UX | Inertia + Vue forms (Fortify endpoints) |
| Permissions | spatie/laravel-permission |
| Media | spatie/laravel-medialibrary |
| Logging & Auditing | spatie/laravel-activitylog |
| Frontend | Vue 3, Inertia, Tailwind 4, Reka UI, lucide (→ Iconify planned) |
| Tooling | Vite 7, TypeScript, ESLint, Prettier, Pint |
| Tests | Pest (backend) + Playwright (E2E) |
| Queues / Jobs | Database queue (default), Horizon available |
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
composer dev # launches PHP server + queue + logs + ViteVisit: http://localhost:8000 (or configured host). Full setup: contenta/documentation/SETUP.md.
Prerequisites: PHP 8.4+, Composer, Node 20+, SQLite/MySQL, Redis (optional), npm/pnpm.
# 1. Backend deps
composer install
# 2. Environment
cp .env.example .env
php artisan key:generate
# 3. Database (adjust .env for MySQL/Postgres if needed)
php artisan migrate
# 4. Frontend deps
npm install
# 5. Run dev stack
composer devOptional: php artisan db:seed for sample data (when seeders available). See contenta/documentation/SETUP.md.
app/
Domains/
ContentManagement/
Posts/
Pages/
Categories/
Tags/
Security/
... (TwoFactor, Roles, etc.)
Settings/
Http/Controllers/Settings
Http/
Controllers/
Middleware/
Requests/
Models/
Providers/
config/
routes/
resources/
public/
tests/
Each bounded context encapsulates controllers, services, models, (future: policies, jobs, events, value objects) reducing coupling and easing growth.
App\Providers\AppServiceProvider binds:
TwoFactorAuthenticationServiceInterface→TwoFactorAuthenticationServicePagesServiceContract→PagesService(2FA service implementation currently a placeholder.)
| Domain | Highlights |
|---|---|
| Content Management | Posts (media, taxonomy), Pages (CRUD via service), Categories (hierarchy), Tags (labeling) |
| Security | Two-factor flows, roles & permissions endpoints |
| Settings | User profile/password/2FA screens, site settings placeholder |
Public/Auth:
GET /→ Welcome (Inertia)GET /dashboard(auth+verified) → Dashboard- Registration, login, password reset, verification via Fortify
- AJAX:
GET /check-email,GET /check-usernameTwo-Factor (auth): status/setup/enable/disable, recovery codes lifecycle. Admin (/admin): dashboard + Posts/Categories/Tags/Pages CRUD, settings include. Settings (/settings): site, user management (profile/password/2FA), permissions (roles).
- Metadata (SEO/OpenGraph/Twitter), versioning fields, taxonomy relations, media collections:
featured_images,gallery,attachments. - Activity logging (dirty-only) and domain methods bridging to
PostAggregate.
- Hierarchical parent/children, full path & depth accessors, featured ordering scopes.
- Minimal static content:
title,slug,content,published.
- Lightweight labeling (posts relation).
Singleton implementing PagesServiceContract for CRUD, enabling future caching/events.
Needs implementation: secret generation, provisioning URI/QR, enable/disable, recovery codes lifecycle, token validation.
- Inertia pages in
resources/js/Pages/* - Tailwind 4 + PostCSS; utility composition via class variance libraries.
- Icon migration planned (lucide → Iconify + Material Light set).
- Vite handles dev & SSR builds (
npm run build:ssr).
Composer:
composer dev(PHP server + queue listener + pail log + Vite)composer dev:ssrcomposer testNPM:npm run dev/build/build:ssrnpm run lint/format/format:checknpm run test:e2e
Original list:
- Replace residual API calls with pure Inertia flows.
- Update state stores to use Inertia endpoints.
- Replace lucide icons with Iconify.
- Sidebar expansion logic. Additional suggestions:
- Implement full TwoFactorAuthenticationService + tests.
- Add Tags/Categories persistence endpoints if missing.
- Introduce Policies/Gates for admin & content.
- DTO/Resource transformers for Post/Category.
- Missing migrations for pivot tables (taxonomy) if absent.
- Seeders for sample content & roles.
- Caching (tagged caches for category tree/navigation).
- Refine activity log scope & redact sensitive fields.
- Bounded contexts reduce coupling.
- Services introduced only where abstraction adds near-term value.
- Interfaces allow future enhancements (caching, event sourcing) without controller rewrites.
app/Domains/YourDomaindirectory.- Subfolders:
Models,Http/Controllers,Services,Policies. - Service contracts + provider binding.
- Migrations & factories.
- Route file included from
web.php/admin.php. - Inertia pages under
resources/js/Pages/YourDomain.
- Password confirmation recommended for 2FA state changes.
- Rate-limit sensitive endpoints (2FA, password, recovery codes).
- Add Policies for Posts/Pages/Taxonomy prior to multi-role rollout.
- Strengthen slug uniqueness (consider DB constraints + validation rules).
- Enforce HTTPS & secure cookies; rotate secrets.
Backend (Pest):
php artisan test
# or
./vendor/bin/pestE2E (Playwright):
npx playwright install --with-deps
npm run test:e2eSeed test user & storage state for auth flows.
- PHP: Pint (
./vendor/bin/pint) - JS/TS: ESLint + Prettier (
npm run lint,npm run format) - Type checking: consider adding
vue-tsc --noEmitin CI.
Key .env:
SESSION_DRIVER=databaseQUEUE_CONNECTION=database(Redis + Horizon for prod recommended)LOG_CHANNEL=stackBCRYPT_ROUNDS(lower locally for speed)
npm run build # Frontend assets
npm run build:ssr # (Optional) SSR build
php artisan config:cache route:cache view:cache
php artisan queue:work # or Horizon
php artisan storage:linkConfigure FILESYSTEM_DISK (e.g., s3) and queue backend; use supervisors for workers.
| Term | Description |
|---|---|
| Inertia Response | Controller returns Vue component name + props, bypassing separate JSON API layer. |
| Aggregate | Cohesive domain state snapshot (e.g., PostAggregate). |
| Recovery Codes | One-time backup codes for 2FA if primary factor unavailable. |
| Area | Status |
|---|---|
| Pages CRUD | Implemented (service-backed) |
| Posts Admin | List/create/edit views; persistence logic partially shown |
| Taxonomy | Skeleton CRUD; verify store/update/delete completeness |
| Two-Factor | Routes + controller; service logic pending |
| Roles/Permissions | Basic CRUD present |
| Tests | Framework present; coverage TBD |
| E2E | Playwright configured; tests not enumerated |
- License:
MIT - Disclaimer (with contribution expectation):
DISCLAIMER.md - Extended legal summary:
contenta/documentation/LEGAL.md - Sponsor the project: https://buymeacoffee.com/jkavuncuoglu
See disclaimer for community expectation of reciprocal contribution (issue, docs, code, security report, sponsorship). Formal guidelines: contenta/documentation/CONTRIBUTING.md.
Instructions & placeholder release link: contenta/documentation/RELEASES.md.
For deeper dives (backend internals, WebAuthn flows, security posture, setup), consult the documentation folder referenced in the Quick Links above.
This README merges original high-level architecture and separate documentation index/security highlights into a single comprehensive entry point.