Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/actions/controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createController } from 'remix/router'
import { assetServer } from '../assets.ts'
import { buildLlmsFullTxt, buildLlmsTxt, pathForMarkdownMirror } from '../lib/llms.ts'
import { contentFileForPath, rawPageSource, renderPageFile } from '../lib/markdoc.ts'
import { movedPages } from '../lib/redirects.ts'
import { routes } from '../routes.ts'
import { DocsLayout } from '../ui/docs-layout.tsx'
import { Document } from '../ui/document.tsx'
Expand Down Expand Up @@ -56,6 +57,13 @@ export default createController(routes, {
return new Response(null, { status: 301, headers: { Location: target } })
}

// Pages merged into another page keep their old URL as a 301.
let moved = movedPages[pathname] ?? movedPages[pathname.replace(/\.md$/, '')]
if (moved) {
let target = pathname.endsWith('.md') ? `${moved}.md` : moved
return new Response(null, { status: 301, headers: { Location: target } })
}

// `.md` mirror: /introduction.md serves the raw Markdoc source.
let mirrorTarget = pathForMarkdownMirror(pathname)
if (mirrorTarget !== null) {
Expand Down
1 change: 1 addition & 0 deletions app/lib/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const v7Navigation: NavSection[] = [
{
title: 'UI components',
links: [
{ title: 'Overview', href: '/ui-components' },
{ title: 'Buttons', href: '/ui-components/buttons' },
{ title: 'Cards', href: '/ui-components/cards' },
{ title: 'Modals', href: '/ui-components/modals' },
Expand Down
19 changes: 19 additions & 0 deletions app/lib/redirects.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Pages that moved. Each old URL answers 301 to its new home, both from the
* dev server and from the static `_redirects` file written by the prerender.
* The `.md` mirror of each old URL follows the same move.
*/
export const movedPages: Record<string, string> = {
// Merged into the getting-started guide (Docker section) on 2026-11-23.
'/installation': '/getting-started/installation',
// Merged into the admin-workflows page (stubs and namespace) on 2026-11-23.
'/thunderclap': '/admin-workflows/thunderclap',
}

/** `_redirects` lines for every moved page and its `.md` mirror. */
export function movedPageRedirects(): string[] {
return Object.entries(movedPages).flatMap(([from, to]) => [
`${from} ${to} 301`,
`${from}.md ${to}.md 301`,
])
}
12 changes: 12 additions & 0 deletions app/ui/docs-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ function DocsHeader(handle: Handle<{ pathname: string; title?: string }>) {

return (
<header className="mb-9 space-y-1">
{activeVersion.id === 'v6' ? (
<p
role="note"
className="mb-6 rounded-lg bg-brand-50 px-4 py-3 text-sm text-brand-900 ring-1 ring-brand-200 ring-inset dark:bg-slate-800 dark:text-slate-200 dark:ring-slate-700"
>
You are reading the Laravolt v6 documentation. Laravolt v8 is the current version:{' '}
<a href="/introduction" className="font-semibold underline underline-offset-2">
read the v8 docs
</a>
.
</p>
) : null}
{section ? (
<p className="font-display text-sm font-medium text-brand-600 dark:text-brand-400">{section.title}</p>
) : null}
Expand Down
29 changes: 29 additions & 0 deletions content/v7/admin-workflows/thunderclap/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,35 @@ Before keeping a Thunderclap scaffold, check:

Thunderclap is most useful when it removes repetitive typing without hiding responsibility. The final module should still read like ordinary Laravel and Laravolt code.

## Register the module namespace

Generated modules live under the `Modules` namespace. Add it to PSR-4 autoloading in `composer.json`:

```json
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "modules/"
}
}
```

Then run `composer dump-autoload`.

## Customize the stub templates

Publish the stubs when your project has its own conventions:

```bash
php artisan vendor:publish --tag=thunderclap-stubs
```

Point `--template` at the customized set. Generated code follows your stubs and keeps the Laravolt conventions (FormRequest, permission gate) unless you remove them from the stubs.

{% callout type="note" title="Bringing modules from a v6 application?" %}
Modular Thunderclap modules can be moved into a fresh v8 base application one by one. After moving a module, align it with Laravolt conventions: add `Requests/Store.php` and `Requests/Update.php`, update its views to Preline/Tailwind, and grant the `modules.<module-name>.view` permission.
{% /callout %}

## What to read next

- [Admin workflows](/admin-workflows/overview) — structure generated resources into business operations.
Expand Down
45 changes: 45 additions & 0 deletions content/v7/getting-started/installation/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,51 @@ pnpm run build

Use the same manager consistently across development and CI. The current skeleton uses Tailwind v4 syntax in `resources/css/app.css`; align the package manager with your application starter kit.

## Local development with Docker

[Laravel Herd](https://herd.laravel.com/) on macOS and Windows needs no extra setup: add the project directory to Herd and open `http://example-app.test/auth/login`.

For a container setup with Redis and mail testing, use [`laravoltdev/image:php8.5-dev`](https://github.com/laravolt/image): PHP 8.5 with Laravolt's extensions, FrankenPHP, Bun and Xdebug (off by default). The image is pulled, not built, and runs natively on Apple Silicon. Create `docker-compose.yml` in the project root:

```yaml
services:
php:
image: laravoltdev/image:php8.5-dev
restart: always
ports:
- 8080:8080 # app
- 5173:5173 # Vite: run `bun run dev` inside the container
volumes:
- .:/var/www/html

redis:
image: valkey/valkey:9.0-alpine
restart: always
ports:
- 6379:6379
volumes:
- ./storage/redis-data:/data

mailserver:
image: axllent/mailpit
restart: always
ports:
- 8025:8025
```

Start it and install the dependencies inside the container:

```bash
docker compose up -d
docker compose exec php composer install
docker compose exec php bun install
docker compose exec php bun run dev
```

The app answers on http://localhost:8080 and Mailpit on http://localhost:8025.

For production, build on `laravoltdev/image:php8.5-prod-v2.1.0` and pin the versioned tag. The [starter kit](https://github.com/laravolt/laravel-starter-kit/blob/main/docker/frankenphp/prod.Dockerfile) includes a production Dockerfile.

## Project structure

A Laravolt project keeps the business application understandable by following Laravel conventions. A typical layout:
Expand Down
122 changes: 0 additions & 122 deletions content/v7/installation/page.md

This file was deleted.

112 changes: 0 additions & 112 deletions content/v7/thunderclap/page.md

This file was deleted.

4 changes: 2 additions & 2 deletions public/styles.css

Large diffs are not rendered by default.

Loading