Start from the starter
What you get
Section titled “What you get”An Astro site that takes its content from Rivil, Site module, and an npm package that does the hard part. You (or your AI assistant) only change how it looks.
- The starter (rivil-site-template): home page, pages and posts following the URL pattern set in Site, menus, contact form, 404 page, sitemap, robots, a second language on
/en, rules for Claude Code and Cursor. - The package (
@rivil-solutions/site-kit): the API client with its cache, the webhook that clears it, Gallery images, languages, SEO, cart and customer account. It updates withnpm update, so a fix reaches every site.
- Start a new site: Use this template on GitHub or
npx degit iorpaul3/rivil-site-template my-site. - In the ERP, under Site: create the site, then on its page a site key and, so it updates by itself, a webhook to
<site address>/api/hooks/rivilwith thecontent.*events. - Copy
.env.exampleto.envand fill inERP_URLandERP_SITE_KEY. npm install, thennpm run dev: the site shows the company’s real data on http://localhost:4321.- Work locally until it looks right, then deploy once (
Dockerfileincluded).
Modules with one command
Section titled “Modules with one command”npx rivil listnpx rivil add bookingnpx rivil theme cabana| Module | What it adds |
|---|---|
booking |
online booking: services, specialist, time, confirmation |
stay |
stays: free rooms by night, reservation |
careers |
open jobs, job page, application with CV |
reviews |
published reviews and the review form |
events |
events, paid tickets, the order |
newsletter |
newsletter signup, with email confirmation |
The command copies the pages and components into the project: from then on they are yours to change. The logic (free slots, holding the slot, validation, submitting) stays in the package and updates with it. The command also prints the scopes the site key needs and the English URLs to add to the config.
The starting themes (aer, cabana, curte, lumen, miez, solvar) come from the demo sites and only change colors and fonts.
The shop is not a module to copy: start from Casa Lumen, which uses the same package.
What not to touch
Section titled “What not to touch”- the site key: server only, never in the browser or in
PUBLIC_*; - the webhook route and the
/api/rivilroute, through which the browser talks to the ERP; - data that exists in the ERP (texts, prices, opening hours, phone numbers): it does not go into code.
For AI assistants
For a new site on Rivil, start from the starter and use @rivil-solutions/site-kit instead of writing another fetch client for the ERP.
For booking, stays, careers, reviews, events or newsletter, run npx rivil add <module> and only change the copied components.
Read the project’s AGENTS.md before any change.