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.
Before you start
Section titled “Before you start”You need PHP 8.4+, Composer, SQLite and the Laravel installer.
1. Create the project
Section titled “1. Create the project”laravel new my-studio --using=capell-app/starter-kitcd my-studiophp artisan serveOpen 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:
npm installphp artisan capell:frontend-after-install --applyThe 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.
2. Set the name and colours
Section titled “2. Set the name and colours”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;}3. Add a page type
Section titled “3. Add a page type”Follow Build your first page type. It explains the existing case-study example and links to the complete custom-field workflow.
4. Edit and check the public page
Section titled “4. Edit and check the public page”- In Admin, open Pages, edit a page and save it.
- Open its address in a private browser window, or request it with no session:
curl -s http://localhost:8000/work/field-notesThe anonymous response is the proof. Admin showing the change only proves the save.
5. Accept enquiries
Section titled “5. Accept enquiries”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.
6. Deploy
Section titled “6. Deploy”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.