Skip to content

Kits: a booking business by kind ​

When the client names the kind of business — a car rental, a dental practice, a restaurant — start from its kit instead of working the booking out again. A kit is the part of a site every business of the kind has: the collections and the roles the diary is pointed at, the rates the trade is sold in, and the settings it starts from. Its kind is also what the booking is spoken of in — «оренда» and «авто», «запис» and «майстер» — so the words come with it.

A kit is taken whole. Bookings are not built from nothing and not made simpler: every collection and role (classes, places, seats), every rate with its fewest and most, every setting (breaks, gaps between lettings, hand-over hours, holds) — with the client's facts put into it. A salon is not «a service and a master». Taking something out — the classes of a rental with one of each car — is a decision: name it to the developer, say what the visitor loses, and write it in the brief.

A kit invents no fact about the business. Its rates are units — «Доба», «Ніч» — and carry no price; the settings carry no time zone, no opening hours and no days off. Each kit's page has two lists, and the brief gathers both before any building: Ask — the facts only the business has; never fill them in — and Taken by default — say it, get a yes: what the kit chose for the trade (confirmation, cancellation, payment, hand-over hours, what visitors see, where the business hears of a booking), each said back to the developer and confirmed or changed.

Beyond that a kit is not a lock. Rename a collection, add a field — from then on it is an ordinary schema and ordinary files, judged as any site's are.

The kits ​

kindthe businessread
apartmentsApartments by the night: check-in and check-out hours, the guests an apartment sleeps.kits/apartments.md
car_rentalA car rental: cars by the day, grouped in classes that carry the price of a day; a visitor takes a class or a named car.kits/car_rental.md
clinicA clinic or a dental practice: appointments by the hour with a doctor, confirmed by the practice.kits/clinic.md
coworkingA coworking space: desks and rooms by the hour inside opening hours, or by the day.kits/coworking.md
equipment_rentalEquipment for hire: items by the day, each told from its twins by a serial number.kits/equipment_rental.md
hotelA hotel: rooms by the night, grouped in room types that carry the price of a night.kits/hotel.md
photo_studioA photo studio: halls by the hour, with time to set the hall up again after each session.kits/photo_studio.md
restaurantA restaurant: a table for the length of a sitting; a visitor says how many they are, and the smallest table that seats them is theirs.kits/restaurant.md
salonA salon or a barbershop: services by the hour, masters who each keep their own hours and say what they do.kits/salon.md
sessionsA studio of classes: each class keeps its timetable in its own hours and has places; a visitor books a place.kits/sessions.md

Each page is also an MCP resource, jtakeit:///kits/<kind>.md.

Laying a kit out ​

A new site from the scaffold takes the kit by its kind: npx @jtakeit/astro create <slug> --locale de-CH --kit hotel asks the platform for it (GET /v1/kits/hotel, the kit whole with its version) and lays it out in contract 3's words:

  • the declaration — the kit's block types, its collections and modules.bookings pointed at them, into src/content/blocks.ts: each collection with the route its page's table below gives, every reference as {to}, a resource's does one reference to several services, the counts the diary reads integer; npx @jtakeit/astro schema writes jtk/schema.json from it;
  • the settings — jtk/modules/bookings.json, {"v": 1, "settings": {…}}: the kit's settings, page where the services are shown, and kit and kit_version — the kind and the version GET /v1/kits/<kind> answers with — so that when the kit is fixed later the judge says so to the site (JTK_W_KIT_BEHIND), with what changed;
  • the rates — one file per entry, jtk/entries/<collection>/<slug>.json, with its id, its words in the site's language and its values under fields; and the page the services are shown on.

Then come the brief's facts and the resources: the time zone and, for a business booked by the hour, the opening hours into the settings; each price from the brief as {"minor": …} in a rate's costs, or in the class's costs where the kit has classes; the cars, the masters, the tables — the business's, one entry each. Where the resource is a person — the salon's masters, the clinic's doctors — its title says "localized": false: a name is the same in every language and is not counted as words to translate; a contract-2 jtk/catalogue.json leaves the key out. Push and run validate_schema by site and ref: a kit laid out as it is passes it with nothing said, so whatever it says is about what was added.

«The kit, whole» on each page is in contract 2's words — a collection's prefix and pages: false, a ref by a collection's name, an option's words in option_labels, a resource's does as rows — because that is what GET /v1/kits/<kind> serves and jtk create --kit reads. On a contract-3 site never copy it into a file as it stands: jtk create --kit puts it in contract 3's words, and jtk lays no kit into a contract-3 tree that already exists. By hand, into such a site, write the kit in contract 3's words as the list above says — the collections' routes are in each page's table, every other word in the schema's table of the two contracts — and seed the files as the files under jtk/ shows them. A site already on that kit's collections or block types by name keeps its own: rename one of them; two declarations of one thing are yours to reconcile.

On a site still on contract 2, the older contract, jtk lays a kit out in that contract's files — jtk/catalogue.json, jtk/bookings.json and entries under jtk/content/<prefix>/ — as it always has.

The form every kit draws ​

Whatever the kind, the booking form is the kit's (@jtakeit/kit), and it arrives with its defaults on: two steps, the week of days that never offers yesterday, the times by the part of the day, a master's services greyed by who is chosen, the time kept across changes, the end of the visit, a 24-hour clock, the success with the link kept. The rules, and why each one, are in bookings on the site; restyle the drawing, keep the rules.

The shop's kit ​

A shop is not a kind of business, so its kit is not in the table above and GET /v1/kits does not list it. It is the shop module's: the products collection bound to the module's products role, the product type with its options, variants and customizations, and the shipping settings it starts from — one zone and two methods with no price. It is laid over a contract-3 site, beside a booking kit or without one, by npx @jtakeit/astro add shop, never by jtk create --kit; and GET /v1/kits/shop serves it whole, with its version, in contract 3's words — a SKU, a picks and a route have none in contract 2, which is why it is not in the list the booking kits are.

It is taken whole and invents no fact about the business, as a booking kit is, and says what it asks and what it chose: kits/shop.md. Its settings, jtk/modules/shop.json, say kit and kit_version beside the zone and the methods, so that when the kit is fixed later the judge says so to the shop as it does to a booking site (JTK_W_KIT_BEHIND — the shop's settings are judged for it as the bookings' are, though the contract card's line names the bookings alone). The shop on the site says what it lays, the storefront it brings to copy, and how a catalogue comes in with jtk import products.

A business not among the kits ​

There is a kit for every kind the platform has words for, and only for those. kind in the bookings settings decides the words, by one rule:

  • no kind — the salon's words, «запис», «майстер»: every site before kinds existed spoke them, and nothing changes; the judge and preflight say so softly (JTK_W_KIND_MISSING);
  • a kind the platform does not know — neutral words, «бронювання», «Будь-який вільний», never refused, said as advice (JTK_W_KIND_UNKNOWN);
  • to speak a kit's words — name an existing kind, the nearest one, lay its kit out, and write over the words that do not fit in words beside kind (jtk/modules/bookings.json, modules): rows of lang, key, text under the keys of the words a booking may say.

words holds at most 200 rows. Renaming whom or what is booked — «майстер» to «тренер» — is a dozen to a few dozen keys in each language the site speaks (schedule.role.resources, letter.with, page.with, form.resource, form.any, diary.gone, collection.role.resources.*); renaming the booking itself — «запис» to «урок» — is most of letter.* and page.*, which 200 rows hold in two or three languages, not in eight. Write over what the business's own customers read, in the site's languages, and nothing more.

The booking form asks for a name, a telephone, an email and a note — and, where the business takes a party, how many. There is no other field: an address to come to, a car's number plate, a pupil's level are written in the note, or asked by the business afterwards. Say so in the brief rather than promise it.

businessnearest kitwords to write overwhat no kit has
barbershopsalonnone — «майстер» fits—
nail or beauty studiosalonnone—
yoga or dance studiosessionsnone — classes with places—
personal trainer, one to onesalonthe resource: «майстер» → «тренер»—
group trainersessionsnone, or the class's name—
photographer in a studiophoto_studionone—
photographer who comes to yousalonthe resource: «майстер» → «фотограф»the customer's address: in the note
excursions and tourssessionsthe booking: «заняття» → «екскурсія», in letter.*, page.*, diary.*a meeting point per tour: the kit's entries have no field for it — a field added to the schema, or the page's own text
tutorsalon (one to one) or sessions (a group)both the resource and the booking: no kit says «урок» or «учень»—
master who comes to the customer — a plumber, a massage at homesalonthe resource, and the booking where «запис» does not fitthe customer's address: there is no field for it, only the note
karaoke room, billiard table, a court by the hourphoto_studiothe resource: «зал» → «кімната», «стіл»—
parkingcoworking by the hour, equipment_rental by the daythe resource: «місце» → «паркомісце»; the bookingthe car's plate: only the note
guest houseapartments, or hotel where rooms are of typesnone—
hovercraft or boat hireequipment_rentalthe resource—