Skip to content

Build a client site

This guide takes a new project from laravel new to a branded site with a custom page type, ready to deploy. Steps 1 to 4 were run on a clean starter-kit project.

You need PHP 8.4+, Composer, SQLite and the Laravel installer.

Terminal window
laravel new my-studio --using=capell-app/starter-kit
cd my-studio
php artisan serve

Open http://localhost:8000 for the site and http://localhost:8000/admin for Admin. Sign in as [email protected] with the password in storage/app/private/starter-admin-password, then store it securely and delete that file. Keep port 8000 free, because the site is bound to APP_URL.

laravel new also suggests npm install, npm run build and composer run dev. On a new project, do not run npm run build first: it stops until Capell has generated the stylesheet inputs. Run these instead:

Terminal window
npm install
php artisan capell:frontend-after-install --apply

The second command generates the Capell frontend stylesheet inputs and builds the stylesheet with Vite. After that, run npm run build again whenever you change theme templates. composer run dev runs php artisan serve.

In Admin, open the dashboard and change the Studio settings name and Enquiry recipient.

Colours are authored directly in public/css/starter.css. Change the variables at the top of the file and reload the page. No build runs:

:root {
--paper: #f3f0e8;
--ink: #183c35;
--accent: #ffb4a2;
}

Follow Build your first page type. It explains the existing case-study example and links to the complete custom-field workflow.

  1. In Admin, open Pages, edit a page and save it.
  2. Open its address in a private browser window, or request it with no session:
Terminal window
curl -s http://localhost:8000/work/field-notes

The anonymous response is the proof. Admin showing the change only proves the save.

The default mail driver is log, so contact messages appear in storage/logs/laravel.log. Configure a real mail transport before launch. The contact form is ordinary Laravel code: ContactRequest, ContactData and SendContactMessageAction. Use it as the example for other forms.

The starter kit includes scripts/deploy.sh. Before you run it, read the starter-kit deployment notes, then follow Deploy recipes for the routine order on your host.