# Ritorno docs > Loyalty and guest relationships for hotels in Tunisia # Introduction URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/index.md > What Ritorno is, who it is for, and where to find things. Ritorno is a loyalty and guest relationship tool for hotels in Tunisia. A guest scans a QR code in the room or at the restaurant table, leaves a real contact and a clear consent, and the hotel can then talk to that guest on WhatsApp and email in French, Arabic and English: welcome, birthday, offers, and a short survey after the stay. The hotel owns the relationship with the guest, not the booking site or the tour operator. This site is the single source of truth. Everything we decided, and why, lives here. > **Warning: Read this first** > > > Facts marked (vendor claim) or (to verify) are not confirmed. All prices are our own untested guesses. See [what we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md). ## The product in one flow 1. A guest scans the hotel's QR code. 2. They enter name, phone, language and tick consent separately for WhatsApp and for email. The consent is logged. 3. The hotel now owns a real contact. 4. Messages go out on their own: welcome, birthday, holidays, offers. 5. 24 hours after checkout a short survey runs. A low score alerts the manager, who fixes it the same day. Every guest gets the Google review invite. 6. The guest books direct again. ## Where to go next - [Hotel staff guide](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide.md): How to run a hotel in Ritorno, with screenshots. - [Vision](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/vision.md): Principles, segments and why a hotel says yes. - [Market and research](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/market.md): Tunisia, channels and the rules that apply. - [Decisions](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions.md): Every choice with its why and why not. - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md): What we collect, what we never collect. - [Pitch playbook](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pitch.md): Discovery questions, objections, demo and pilot. - [How we work](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/how-we-work.md): Agents loop, labels, PR and merge rules. - [Engineering guide](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/engineering.md): Stack, packages and commands. - [What we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md): Open questions we are still chasing. ## What is in the repo - `apps/web`: the landing page and the public guest pages. It only talks to the api - `apps/dashboard`: login and the hotel and admin app. It only talks to the api - `apps/api`: orpc on bun. The only app that touches the database, auth, storage and providers - `apps/docs`: this site - `packages/*`: shared code, see [structure](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/structure.md) - `docs/plan`: the original planning board, see [the plan](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/plan.md) --- # Hotel staff guide URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide.md > How to run your hotel in Ritorno, task by task, for the front desk, the manager and the owner. Ritorno keeps your hotel's own list of guests: who agreed to hear from you, what you offered them and what they thought of their stay. This guide is for the people who use it every day. It is written in English only. The app itself is in English, French and Arabic, and the button names below are the English ones. - [First day](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/first-day.md): Create your account, sign in and find your way around. - [Front desk](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/front-desk.md): Add guests, redeem offers and follow up an unhappy guest. - [Manager](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/manager.md): QR codes, import, offers, campaigns and results. - [Owner](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/owner.md): Set up the hotel, run the team and look after guest data. ## The idea in one minute 1. A guest scans a QR code in the room, on a table or at the desk, or you add them yourself. 2. They give their name and phone number and say yes or no to WhatsApp and to email, each on its own. 3. Ritorno sends the welcome, birthday and holiday messages, and asks how the stay went. 4. A low score reaches you the same day, so you can put it right. 5. At the desk, the guest shows an offer code and you mark it used. ## Three rules for everyone - Only tick a consent the guest really gave. Guests can say stop at any time and that always wins. - Never write down passport or ID numbers or payment cards, not even in a note. - Guest details stay in Ritorno. Do not copy them to a personal phone list or a chat group. ## Who can do what Your account has one role per hotel. A menu entry you cannot see is not part of your role. | Task | Staff | Manager | Owner | | --- | --- | --- | --- | | Add and edit guests, record a visit | yes | yes | yes | | Give, send and redeem offers | yes | yes | yes | | Follow up unhappy guests, see messages and metrics | yes | yes | yes | | Create offers and campaigns, holiday greetings | no | yes | yes | | Import a guest file | no | yes | yes | | Hotel settings, activity log, WhatsApp balance | no | yes | yes | | Invite and remove colleagues | no | yes | yes | | Export or delete guest data | no | yes | yes | Owners also receive the weekly summary, and cannot be removed from the team page. ## About the screenshots They show a practice hotel with invented guests, where nothing is really sent. Numbered red marks on a screenshot match the numbered list next to it. Your names, numbers and colors will differ. --- # First day URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/first-day Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/first-day.md > Create your account, sign in, find your way around and set your language. ## Create your account Someone from your hotel sends you an invitation by email. Open its link, create an account with **the same email address**, and choose a password of at least 10 characters. The invitation stops working after the date shown in the team list, so ask for a new one if yours has expired. ![The create account page opened from an invitation]() ## Sign in ![The sign in page]() 1. Your email address. 2. Your password. The eye shows what you typed. 3. **Sign in**. 4. **Forgot password?** emails you a link to choose a new one. It works once, for one hour. 5. **Create an account** is only for people with an invitation. On a shared computer, sign out when you leave: open your name at the bottom of the menu and choose **Sign out**. ## Find your way around ![The home page with the menu]() 1. The hotel you are working in. If you belong to several hotels, switch here. 2. The menu. **Today** is daily work, **Guests** is your list, **Grow** is offers and messages, **Insights** is results. 3. **Search**: a guest by name or phone, or any page. 4. Notifications: notes and alerts about your hotel. 5. **Add a guest**. 6. **Needs you now**: guests who left a low score. Start your shift here. 7. Your account: language and sign out. Home also shows the last 7 days (new guests, returning guests, survey score, offers redeemed), the latest guests, and the link to your guest sign-up page. ## Search from anywhere Press `Ctrl K` (`⌘K` on a Mac) or select **Search**. ![The search window]() 1. Type part of a name, a phone number or a page name. The shortcuts under **Actions** open the common tasks. Pressing `G` then a letter also jumps to a page, for example `G` then `R` for Redeem. ## On a phone or tablet Everything works on a phone. The bar at the bottom holds the daily tasks and the menu button at the top opens the rest. ![The home page and the menu on a phone]() 1. **Add a guest**. 2. **Redeem** an offer. ## Your language and password Open your name at the bottom of the menu, then **Account**. ![The account page]() 1. **Profile**: your name and picture, as your team sees them. 2. **Preferences**: the language of the app for you only. It does not change what guests receive. 3. **Password**: change it, and sign out your other devices at the same time. Further down the page you can see where you are signed in, download your own data or delete your account. ## If something is wrong Use **Feedback** at the bottom of the menu to tell the Ritorno team. What you send is posted publicly, so never put a guest's name or number in it. Next: [the front desk](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/front-desk.md). --- # Front desk URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/front-desk Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/front-desk.md > Add guests, find them, give and redeem offers, and follow up an unhappy guest. ## What the guest does with a QR code The guest scans the code with their phone camera. There is no app to install. They pick a language, type their name and phone number, and switch on WhatsApp or email only if they want to. Then they see their welcome offer as a code to show you. ![The guest sign up page and the thank you page]() If they cannot or will not scan, add them yourself. ## Add a guest Select **Add a guest** on Home or in Guests. ![The add a guest form]() 1. Phone number. Pick the country first if it is not Tunisia. 2. Name. 3. The language the guest wants to be written in. 4. Consent. Ask the question out loud, for example "may we send you offers on WhatsApp?". Tick only on a yes. Email consent needs an email address. 5. **Add guest**. Arrival and departure dates are optional. They are only saved when the guest agrees you keep them, and the departure date decides when the stay survey goes out. The form is then empty again, ready for the next person. ### The guest is already known As soon as you type a known number, Ritorno tells you whose it is. ![A known phone number]() 1. The guest is already on your list. Open their name to see their history, or select **Mark visit** to record that they are here today. Saving the form again never creates a second copy. It only fills gaps and adds consent, and it never gives back a consent the guest withdrew. ## Find a guest Open **Guests**. ![The guest list]() 1. Search by name or phone number. 2. Filters: returning guests, what they agreed to, their language and how they joined. 3. **Add guest**. 4. A row opens the guest's profile. ## The guest profile ![The top of a guest profile]() 1. **Call** the guest. 2. Open a **WhatsApp** chat with them. 3. Write an **Email**. 4. **Edit** their details, for example a new number or the departure date. 5. **Mark visit**, once a day at most. 6. **Give offer**. **Call**, **WhatsApp** and **Email** open your own phone or mail app. Only use them to help the guest. Offers and news go through Ritorno, which respects what they agreed to. Lower on the page are their stays, the offers they used, their survey answers and the messages they received. ### When a guest says stop ![The consent section]() 1. **Withdraw** next to the channel the guest no longer wants. Every change is kept in the consent log. Guests can also reply STOP on WhatsApp or use the unsubscribe link in an email. ## Give an offer On the profile, select **Give offer** and pick one. ![Picking an offer and the code to show]() Let the guest scan or photograph the code, or send it by WhatsApp or email if they agreed to that channel. If no offer appears, ask your manager to create one. ## Redeem an offer Open **Redeem** when a guest shows a code. ![The redeem page]() 1. **Scan QR code** with the camera of your phone or tablet. Allow the camera when asked. 2. Or type the code. 3. **Check**. 4. What was redeemed lately. ![A valid code]() 1. Read the result first. Only a green **Valid. Ready to redeem.** may be honoured. 2. Serve the guest, then **Mark as redeemed**. Tapped by mistake? Use **Undo**. | The screen says | What to tell the guest | | --- | --- | | Already redeemed | It was used before. The screen shows when and by whom. | | Expired | The offer has ended. | | Not valid yet | Ask them to come back from the start date. | | This offer is paused, or no redemptions left | Nothing can be redeemed. Tell your manager. | | This code belongs to another hotel | Ask for the code your hotel sent. | | Code not found | Check the letters and try again. | ## Unhappy guests A guest who gives a low score in the stay survey appears in **Unhappy guests** and under **Needs you now** on Home. Try to contact them the same day. ![The list of unhappy guests]() 1. **New** shows the guests nobody has contacted. 2. Open a row to see the whole answer. ![One case]() 1. **Call** or write to the guest. 2. Their score and comment. Read it before you call. 3. **Give offer** if you want to make it up to them. 4. Move the case to **Contacted**, then **Resolved**. 5. **Staff notes**: what you agreed. Only your team sees them. Select **Save**. ## WhatsApp scans and notifications - **WhatsApp** lists guests who scanned a code and chose to continue on WhatsApp. You see their number and the spot, not what they wrote. Offer help only: it is not a consent to marketing. Entries are removed after 30 days. The list stays empty when your hotel does not use this option. - **Inbox** holds notes from the Ritorno team and alerts about your hotel. ## On the desk phone ![Guests, redeem and add a guest on a phone]() --- # Manager URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/manager Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/manager.md > QR codes, guest import, offers, campaigns, holiday greetings, emails and results. Everything in the [front desk](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/front-desk.md) page is yours too. ## Print your QR codes Open **QR codes**. Each room or table can have its own code, so you see which spots bring guests in. ![The QR studio]() 1. **What to print**: room card, table tent, desk sign or stickers. 2. **Which spots**: all of them, a range or a hand pick. Add rooms or tables here. Ranges like 101-120 work. 3. **Wording**: the language on the print (or all three), the headline and whether to show the welcome gift. 4. The preview. Read the **Before you print** warnings above it, for example a missing logo. 5. **Print or save PDF**. On your own printer use A4 at 100% scale with no margins and cut along the marks. For a printing company choose **Print shop** and send them the PDF. 6. **Open guest page** or **Test on my phone** before you print. A test creates no guest. Removing a saved spot does not break codes already printed. PNG and SVG images are there for a designer, and **Guests by spot** at the bottom counts what each code brought. ## Import a guest list Use **Import** to bring in a list from your reservation system or a spreadsheet, as CSV (commas or semicolons) or Excel (.xlsx), up to 1000 rows and 1 MB at a time. ![Choosing a file]() 1. Choose or drop your file. A title or banner above the column names is skipped. Old .xls files must be saved as .xlsx or CSV first. 2. Or download the sample file and fill it in. ![Matching the columns]() 1. Check that each column was matched correctly (name and phone are required), then **Continue**. ![The review step]() Check how many are new, already there or skipped. Each skipped row shows its line, the reason and the value that failed, and the error report lists them all. 1. Consent is only recorded for cells that say yes, oui, true or 1, and only if you confirm that your hotel really holds that consent. 2. **Import**. Guests who had opted out before stay opted out. No welcome message goes to an imported list, but a departure date in the last 14 days can send that guest the stay survey. ## Offers An offer is a perk such as a welcome drink. Each guest gets their own code. ![The offers page]() 1. How many were redeemed this week. 2. **New offer**. 3. **Edit** an offer, for example to pause it. Deleting an offer takes the code away from guests who hold it, so prefer pausing. ![The new offer form]() 1. Give it a title and a **promo code** that no other offer of yours uses. 2. **Other languages**: write the title and details in English, French and Arabic. A language you leave empty shows the main text. 3. **Who gets it**: hand it out yourself, or give it automatically to new guests (sent with the welcome) or for birthdays. 4. **When it is valid**: start, end and an optional maximum number of redemptions. Switch **Active** off to pause. 5. The preview shows what the guest will see. ## Campaigns A campaign is one message sent to many guests. Only guests who agreed to that channel receive it. ![The campaign list]() 1. The status: draft, scheduled, sent or cancelled. 2. **New campaign**. 3. A row opens the campaign and its results. Writing one takes four steps. **1. Audience.** Narrow by language, how they joined, country or last stay, or leave all empty to reach everyone. ![Campaign audience]() 1. How many guests can be reached. 2. **Next**. **2. Channel.** Email, WhatsApp or both. Email is free, WhatsApp is paid from your balance. ![Campaign channel]() **3. Message.** A name for your team, then the text in each language you want. Attach an offer if you like. ![Campaign message]() 1. The subject. 2. The preview of what the guest receives. **4. Send.** Keep it as a draft, send now or schedule it. ![Campaign send step]() 1. **Send now** starts right away. Campaigns only go out between 9:00 and 20:00 hotel time. Before you send, open the draft and use **Send a test to me**. ![A scheduled campaign]() 1. **Send a test to me**. 2. **Duplicate** to reuse it as a new draft. 3. **Back to draft** to change the text or the time before anything has gone out. 4. **Cancel campaign** stops the messages not sent yet. ## Messages that go out on their own | Message | When | | --- | --- | | Welcome | Right after a guest signs up or you add them. Not for imports. | | Birthday | On the day, from 9:00, if you have an active birthday offer. | | Stay survey | About 24 hours after check-out, or 8 days after sign-up when there is no date. Table sign-ups and imports need a departure date. | | Holiday greeting | At 09:00 on each holiday you switched on. | Each only goes to channels the guest agreed to, and never at night (21:00 to 08:00 hotel time). ### Holiday greetings ![The holidays page]() 1. Switch a holiday on. They are all off until you do. 2. Choose email, WhatsApp or both. Islamic dates follow the astronomical calendar and can move by a day. ### See your emails as a guest does ![The emails page]() 1. Pick the email, its language and light or dark. 2. **Send test to me**. ## Results **Metrics** shows new guests by how they joined, consent rates, delivered messages, offers used, the survey score and Google review clicks, over 7, 30 or 90 days. ![The metrics page]() **Messages** lists every message and what happened to it. Open the guest to check their number or address when one failed. ![The messages page]() 1. Filter by channel and period. 2. Filter by status, for example failed. Next: [the owner](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/owner.md). --- # Owner URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/owner Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/owner.md > Set up the hotel, invite the team, pay for WhatsApp and look after guest data. Managers can do these tasks too. Everything in the [manager](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/manager.md) and [front desk](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide/front-desk.md) pages is yours. ## Set up a new hotel On a new hotel, Home shows a short checklist. Each step ticks itself when it is done. ![The first steps checklist]() 1. Select a step to go straight to the right page. Do them before guests start scanning. ## Hotel settings Open **Settings**, then **Hotel**. Each part saves on its own. ![The hotel settings]() 1. **Logo**: PNG, JPEG or WebP, 1 MB at most. 2. Name, colors and the guest language used when we do not know the guest's own. The preview updates as you type. 3. **Reply-to email**: answers from guests arrive here. Also set your address and time zone. 4. **Send a test alert** to check that low score alerts reach you. They go to the reply-to address, or to an owner when none is set. 5. **Low score alert**: the score out of 10 at or below which you are warned. It starts at 6. 6. **Google review link**: after the survey, every guest is invited to share their review there, whatever their score. The **weekly summary** switch emails owners the counts of the week every Monday, without guest details. ## Your team Open **Settings**, then **Team**. Give each person their own account, never a shared one. ![The team page]() 1. The email of the new colleague, with a role below it. See [who can do what](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guide.md#who-can-do-what). 2. **Send invitation**. 3. **Copy link** if the email did not arrive, and pass the link to that person only. 4. **Send again**. **Revoke** cancels an invitation. 5. What each role can do. Change a role with the list next to a name. When someone leaves, select **Remove** the same day: they lose access at once. ## WhatsApp balance Email is free. WhatsApp messages are paid in advance. Open **Settings**, then **Usage**. ![The usage page]() 1. What is left. At zero, WhatsApp messages stop and email keeps going. Ask the Ritorno team to top up. 2. Every top-up, message and refund. A message that could not be delivered is refunded. ## Guest data requests Your guests may ask for a copy of what you hold about them, or ask you to delete it. Open **Settings**, then **Guest data**. ![The guest data page]() 1. **Export** every guest with their consent history, as CSV or JSON. The file holds personal data: store it safely and delete it when you are done. 2. **One guest**: search for the person to export or delete their data. 3. **Delete all guests** removes everyone for good and asks you to type the hotel name. There is no undo. Export first. ## Who did what **Settings**, then **Activity log**, lists what your team and the Ritorno team did, newest first. ![The activity log]() 1. Filter by action, person or dates, then **Apply**. --- # Vision and principles URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/vision Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/vision.md > What we are building, the principles behind it, who we sell to first, and why a hotel says yes. A loyalty and guest relationship tool for hotels in Tunisia. The hotel owns the relationship with the guest, not the booking site or the tour operator. ## Principles 1. **Own the relationship, not the booking.** The hotel keeps the contact, whoever sold the room. 2. **Capture first.** No contact means nothing to automate. See [capture first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first.md). 3. **Local channels.** WhatsApp and email first, SMS later, in French, Arabic and English. 4. **Configuration, not customization.** Branding is config, never code per client. See [branding is config](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/branding-is-config.md). 5. **Feedback leads to action leads to revenue.** A survey that nobody reads is noise. 6. **Recognition over points.** See [recognition over points](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/recognition-over-points.md). 7. **Long term: a destination network** across hotels, restaurants and spas. ## Segments The buyer is the owner or the general manager. | Order | Segment | Note | |---|---|---| | 1 | Guesthouses and boutique hotels up to 30 rooms | First. The owner decides fast. | | 2 | Hotels with a large Tunisian clientele | Locals are reachable and rebook. | | 3 | Spa and restaurant hotels | Offers have a clear place to land. | | 4 | Tour operator all-inclusive resorts | Later. They do not own their guests. | | 5 | Groups and chains | Later. | Which segment the first three pilots come from is still an [open decision](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions.md#open-decisions). ## Why a hotel says yes, in order of speed | When | What the hotel gets | |---|---| | Week 1 | Unhappy guest alerts. The manager fixes it the same day. | | Month 1 | More Google reviews, because every guest gets the invite. | | Months 2 to 3 | A contact list the hotel owns, and offers to fill low season, the spa and the restaurant. | | Month 6 plus | Direct rebooking saves the tour operator or booking site commission. | The biggest gain is the slowest to show, so the pitch opens with the fastest one. See the [pitch playbook](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pitch.md). ## Why a guest scans A small perk for scanning, recognition on the next visit and on their birthday, a real person who reads the feedback, and offers that fit instead of spam. > **Warning: Our biggest risk** > > > Without a perk the QR code gets ignored. See [risks](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md). --- # Market and research URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/market Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/market.md > The Tunisian hotel market, the channels we use, and the rules that apply. Research from November 2026. > **Warning: Confidence** > > > Facts marked (vendor claim) or (to verify) are not confirmed. Where we could not find an answer, it is listed in [what we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md). We are not lawyers. ## Tunisia market - Over 11 million visitors in 2025. 2026 is slightly down, about minus 0.5 percent from January to August. - Occupancy was 35.3 percent in H1 2025 on 173,970 beds. 164 to 177 hotels are closed. - Tour operators squeeze prices and margins. Tunisians are over 45 percent of Hammamet reservations in one report. - Guest reviews complain about dated rooms, bland all-inclusive food, extras charged, and managers dismissing complaints. - Xlia (Arabsoft) is a PMS that runs in 400 plus hotels. Its API is unknown (to verify). What this means for us: most hotels live on tour operator packages and probably never see the guest contact, so capture comes first. Low occupancy makes offers to fill low season a real need. Reviews that mention ignored complaints make the unhappy guest alert a strong opener. ## Channels and rules | Channel | What we know | |---|---| | SMS | One way only. Three operators. A sender ID must be registered. An operator API needs a direct contract. | | WhatsApp | Billed per delivered template since July 2025. The Tunisia rate is unknown (to verify). Template approval takes time, so we submit templates in week 1. | | Email | Booking sites mask guest emails, so we capture the real one directly. | | Social | Facebook has about 9.2 million users in Tunisia and Instagram about 4.3 million. | ### Law and data - Law 2004-63 and the INPDP apply. - A draft law mentions fines up to 200,000 dinars. Its status is unknown. - Hosting guest data abroad may need a legal check. A lawyer checks consent wording and hosting before the first pilot. - This is our reading of the law, not legal advice. The rules we apply are in [data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md). ### Payments Local payments include D17 and e-DINAR. Stripe may not work for Tunisia (to verify). Billing is manual at first, see [pricing](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pricing.md). ## How the research connects to decisions | Finding | Decision | |---|---| | Hotels may hold no contacts and the Xlia API is unknown | [Capture first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first.md), no PMS connector in v1 | | SMS is one way and sender ID is slow | [Email and WhatsApp first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/email-and-whatsapp-first.md) | | Tour operators own their guests | [Small local hotels first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/small-local-hotels-first.md) | | Guests say programs lost value | [Recognition over points](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/recognition-over-points.md) | | Prices are untested | [Free pilot then paid](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/free-pilot-then-paid.md) | See also [competitors](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/competitors.md) and [guest insights](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guests.md). --- # Competitors URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/competitors Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/competitors.md > Who else sells guest CRM and loyalty to hotels, what they charge, and where they fall short. > **Warning: Confidence** > > > Figures marked (vendor claim) come from the vendor and are not independently confirmed. Prices are for orientation only. ## Hotel guest CRM vendors | Vendor | What we know | |---|---| | Revinate | 12,500 plus hotels and about 900 million guest profiles (vendor claim) | | Cendyn | Guest marketing and CRM | | Cloudbeds Guest Marketing | About 300 to 1,800 USD a month for 24 to 100 rooms | | SendSquared | Claims 1,000 to 5,000 USD a month for small hotels (vendor claim) | | GuestMaker | Guest marketing | | D-EDGE CRM | Hotel CRM | | Directful | Guest marketing | | Hapi Guest | About 5 USD per room per year | The typical range is 5 to 15 USD per room per month. ## Common complaints - PMS integration breaks - Slow support - Opaque pricing - Extra fees for reports These are why we start with capture, publish clear plans, and do not depend on a PMS connector in v1. See [capture first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first.md). ## Open source CRMs Twenty, EspoCRM, Mautic and Listmonk. None of them is hotel specific. ## White label and local - No white label hotel CRM exists. Agencies resell GoHighLevel instead. - No Tunisian loyalty competitor found. An adjacent tool is RevWay (to verify). ## Where we can win - Price: local plans in TND, not USD per room. - Local channels: WhatsApp and email in French, Arabic and English. - No PMS needed to start. - Recognition and simple perks instead of a points scheme. Whether a local competitor exists is still open, see [what we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md). --- # Hotel systems and integrations URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/integrations Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/integrations.md > Which PMS and CRM systems hotels run, how guest data comes out of each, what it costs, and what we build first. Research from December 2026. > **Warning: Confidence** > > > Field names below come from vendor documentation or help centres read in December 2026. Anything marked (not verified) could not be read from a public page. Which systems Tunisian hotels really run is largely **unconfirmed**: only Xlia has a source, and that source is the vendor. We never invented a column or an endpoint. The rule is to confirm on a real export from a pilot hotel before we build. ## What this means in short - Almost every system can give us a file. Only some give an API, and several of those gate it behind a partner deal. - One importer with auto-mapped columns covers all of them. Build that first, see [#434](https://github.com/FindMalek/ritorno/issues/434). - Booking sites hide guest email and phone. A booking export alone does not give us a contactable guest. - Consent is never in the file by default. We import contact data only with explicit consent, see [data rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md). ## Effort score 1 is a file the hotel already has and our importer reads. 3 is a documented API with self-serve keys. 5 is a partner contract or an unknown interface. ## Tunisia and North Africa | System | Who uses it | Way out | Cost | Effort | |---|---|---|---|---| | Xlia (Arabsoft) | Vendor says 400 plus hotels in Tunisia, Algeria and Morocco (vendor claim). Modules: Front Office, Back Office, Mobile Housekeeping, Tablet Ordering | Unknown. No public export guide or API found. A two-way channel manager link to eRevMax exists, which is a connection for rates and bookings, not guest data | Not public | 3 to 5 (not verified) | | Local PMS and others | Not verified. No source names other Tunisian PMS in use | Ask each hotel | Unknown | Unknown | | Excel and paper | Our assumption for small hotels and tour operator rooming lists, not sourced | Excel or CSV upload, photo of a register is out of scope | None | 1 | | Booking.com extranet | Every hotel that sells online | XLS download from the bookings area. Email is a masked alias ending in `@guest.booking.com` or `@partner.booking.com`. Phone numbers are hidden by default | Free | 1, but little usable contact | | Expedia Partner Central | Same | The public docs describe an API to retrieve reservations, not a file export. Guest names, email and phone exist in the model but email can be missing. Column names of a download: not verified | Free | 2 to 5 | Xlia is the system to understand first because of its reach. Existing issues: [#93](https://github.com/FindMalek/ritorno/issues/93) (Xlia CSV mapping) and [#97](https://github.com/FindMalek/ritorno/issues/97) (PMS connector, Xlia first). The first step for both is a conversation with Arabsoft (+216 71 95 12 48, arabsoft@arabsoft.com.tn per their site) and with two hotels that run it, to see what Xlia prints or exports for a guest list. ## International systems | System | Way out | Fields we read | Auth | Cost | Effort | |---|---|---|---|---|---| | Little Hotelier | Reservations CSV: My Apps, Front Desk, Reservations, Search, Download CSV. Trusted device needed. Max 365 days per export | `Guest first name`, `Guest last name`, `Guest e-mail`, address columns, `Check-in date`, `Check-out date`, `Requested newsletter` (no phone, removed for security) | Hotel login | Not public | 1 | | Mews | Reservation report: Reservations, Reservation report, Export to Excel. API: Connector API `customers/getAll` | Excel: `First name`, `Last name`, `Email`, `Telephone`, `Customer Nationality`, `Send marketing emails`. API: `FirstName`, `LastName`, `Email`, `HasOtaEmail`, `Phone`, `LanguageCode`, `NationalityCode`, `BirthDate`, and consent in `Options` such as `SendMarketingEmails` | API: `ClientToken` (partner) plus hotel `AccessToken` | Not public | 1 by Excel, 3 by API | | Cloudbeds | API `getGuestList` (v1.3). A report export also exists in Insights | `guestFirstName`, `guestLastName`, `guestEmail`, `guestPhone`, `guestCellPhone`, `guestCountry`, `guestNationality`, `guestOptIn`, `isAnonymized`, `isMerged` | `x-api-key` or OAuth2, scope `read:guest`. 10 requests per second | Not public | 3 | | RoomRaccoon | Excel export of booker and guest lists in the app. API is partner only: apply by email to connectivity@roomraccoon.com, key plus hotel id after approval | Excel columns not verified. API fields not verified | Partner key | Not public | 1 by Excel, 5 by API | | HotelRunner | REST API v2 for partner apps (`GET /reservations`) and a push webhook. Pages say names, email, phone and country are in the response | Exact names not verified | Token plus `hr_id`, access conditions not verified | Not public | 3 to 4 | | Oracle OPERA Cloud | Profile exports run by the hotel or its IT from the Miscellaneous, Export menu. Oracle Hospitality Integration Platform (OHIP) has a profile API behind a GraphQL endpoint and REST `getProfiles` | Not verified. Export columns are configured per hotel | OHIP needs an Oracle partner agreement | Not public, chain scale | 1 by hotel export, 5 by API | | Protel | Protel I/O is an open API platform following HTNG and OTA, with a partner marketplace | Not verified | Partner agreement | Not public | 5 | | Odoo | Contacts export to CSV or Excel. External API only on Custom plans, with an API key (Odoo 14 and later) | Model `res.partner`. Fields not verified from the page we read | API key or login | Plan dependent | 1 by file, 3 by API | | HubSpot | Contacts export. API v3 `POST /crm/v3/objects/contacts/batch/upsert`, 100 per batch | `email`, `firstname`, `lastname`, `phone`, `country` | Private app token or OAuth | Free tier exists | 1 by file, 2 by API | | Zoho CRM | API with 200 records per page, up to 100,000 with a page token | Module `Contacts`. Field names to fetch with the Fields Metadata API, not verified here | OAuth2, header `Authorization: Zoho-oauthtoken`, scope `ZohoCRM.modules.contacts.READ` | Plan dependent | 1 by file, 3 by API | | Google Sheets | Hotel keeps a sheet. API quota 300 reads per minute per project, 60 per user. Also reachable through Zapier, Make or Apps Script | Any columns the hotel chose | Google OAuth | Free | 1 as CSV download, 2 as webhook push | ### Booking.com and Expedia in practice Booking.com gives out its guests only through a masked alias. A downloaded XLS has the booking, not a reachable guest, so the right flow is to capture the real email and phone at the front desk with the QR page. A Booking.com export is useful to build a list of guests to ask, never as a mailing list. Column headers of the extranet XLS: not verified (a third party importer expects `Book_nr, Book_date, Booker_name, Guest_names, Arrival, Departure, Status, Total, Commission` but that is their own format, not Booking.com's). ## Fixtures Real headers read from vendor help pages are saved as test fixtures in `packages/orpc/src/tests/fixtures/pms-exports`: - `little-hotelier-reservations.csv` from the Little Hotelier help centre - `mews-reservation-report.csv`, the Reservations tab of the Mews Excel export (a subset of columns) No other fixture is saved because no public source lists the columns. Add one as soon as a pilot hotel gives us a real file with the guests removed. ## Ranked build list | Rank | What | Issue | Why | |---|---|---|---| | 1 | Universal CSV and Excel importer with auto-mapped columns | [#434](https://github.com/FindMalek/ritorno/issues/434) | Works for every system above, including Excel and paper turned into a sheet. No vendor needed | | 2 | Known header presets | [#439](https://github.com/FindMalek/ritorno/issues/439) | Little Hotelier, Mews, Odoo, HubSpot and Zoho files map with no clicks | | 3 | Inbound webhook for Sheets, Zapier, Make | [#435](https://github.com/FindMalek/ritorno/issues/435) | One endpoint covers any tool that can send JSON | | 4 | Xlia: ask Arabsoft, then CSV mapping | [#93](https://github.com/FindMalek/ritorno/issues/93) | Biggest local reach, blocked by unknowns | | 5 | Cloudbeds guest sync | [#436](https://github.com/FindMalek/ritorno/issues/436) | Documented, self-serve key, but not confirmed in Tunisia | | 6 | Mews guest sync | [#437](https://github.com/FindMalek/ritorno/issues/437) | Good API, needs a partner token | | 7 | HotelRunner reservation pull | [#438](https://github.com/FindMalek/ritorno/issues/438) | Research first | | 8 | Xlia API connector | [#97](https://github.com/FindMalek/ritorno/issues/97) | Only if Arabsoft has an interface | OPERA, Protel and RoomRaccoon API work is not filed. Each needs a partner agreement and none of them is confirmed in our market. Their file exports go through the importer. Not planned: a Booking.com or Expedia connector. Guest contact is masked, so it brings little value, and the [capture first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first.md) decision stands. ## What we can promise on the first call 1. **Bring any list.** If you can open your guests in Excel or save them as CSV, from any system, we load them in the first meeting. We map the columns for you and show which rows we could not use and why. 2. **No system needed.** A hotel with no PMS, or one we cannot connect to, starts the same day with the QR page and the importer. We do not wait for a vendor. 3. **Only guests who said yes.** We never message a guest without recorded consent, and we will not use the masked Booking.com or Expedia emails. You see how many of your guests we can actually reach before we send anything. Do not promise: a live link to Xlia, Opera or Protel, a Booking.com or Expedia guest sync, or a date for any of them. ## Open questions Added to [what we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md): - What does Xlia export for a guest list, and does it have an API - Which PMS do the first pilot hotels really run - Exact columns of the Booking.com extranet XLS and of the Expedia Partner Central download - HotelRunner access conditions and field names --- # Guest webhook URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guest-webhook Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guest-webhook.md > Push guests from Google Sheets, Zapier or Make to a hotel with one secret key. Fields, answers, and copy-paste recipes. One endpoint takes guests as JSON from any tool that can send a web request. It uses the same checks as the [file importer](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/integrations.md): the phone is normalised (a local 8 digit number is read as +216), a guest already in the hotel is merged by phone and never duplicated, and the same row sent twice is safe. ## The key The hotel owner makes the key in the dashboard, on **Guests, Import**, under "Send guests from a sheet or Zapier". - It is shown once and stored only as a hash. Lost it? Make a new one. - Making a new key replaces the old one at once. Revoke stops all sending. - One key belongs to one hotel. Nothing in the body can name another hotel. - Limits: 120 calls per minute per hotel, and a body of at most 256 KB. Send lists of up to 100 guests per call instead of one call per row. - A call with a wrong or missing key counts against the sender's address: after 30 in a minute it gets a 429 even with the right key. Good calls never count against the address, so tools that share an address (Zapier, Make, Google) do not slow each other down. - On a 429, wait the seconds in the `retry-after` header and send the same call again. It is safe: a guest already saved is merged, not duplicated. ## The request ``` POST https:///import/guests Authorization: Bearer rit_... (or the header x-api-key) Content-Type: application/json ``` The address is shown next to the key in the dashboard. The body is one guest, or a list of up to 100 guests. ```json { "name": "Amel Ben Salah", "phone": "20 123 456", "language": "fr", "email": "amel@example.com", "birthday": "1990-12-31", "consent": { "email": true, "whatsapp": true } } ``` | Field | Needed | Notes | |---|---|---| | `name` | yes | | | `phone` | yes | Local Tunisian numbers, `+216...`, `00216...` or any international number | | `language` | no | `en`, `fr` or `ar`. The hotel default when missing | | `email`, `birthday` | no | Birthday as `YYYY-MM-DD` | | `consent.email`, `consent.whatsapp` | at least one | `true` or `false` (also `"yes"` and `"no"`). **Never assumed**: a body without them is rejected | | `consent.profile`, `country`, `city` | no | Country and city are kept only with `consent.profile: true` | A guest gets a consent only for a channel you send as `true`. A `false` is recorded as a no. A guest who unsubscribed is not opted in again by a push. ## Answers | Status | Meaning | |---|---| | 200 | `ok: true` when everything was saved. With a list, `ok: false` and `errors` when some rows failed and others were saved | | 400 | The body is not JSON, or the list is empty or longer than 100 | | 401 | The key is missing, wrong, replaced or revoked | | 403 | The hotel is suspended | | 422 | Nothing was saved. `errors` lists `index` and `message` for each guest | | 413 | The body is over 256 KB. Send fewer guests per call | | 429 | Too many calls. Wait the seconds in `retry-after`, then retry | Every answer has a readable `message` and the counts `created`, `merged`, `consentKept` and `errors`. Error messages name the field, never the value. `consentKept` counts guests who had withdrawn a channel and were sent as `true` again. The withdrawal stays: only the guest can opt in again. The `message` says so, so a sheet owner knows why a guest did not get the consent. Guests from the webhook are stored with the source `csv`, like an import. That is on purpose: an import sends no welcome message and counts no visit, which is right for a list pushed from another system. Use the QR page for a guest who is at the desk now. ## Phone numbers Spreadsheets treat a phone as a number and drop a leading `+` or `0`: `+216 20 123 456` becomes `216 20 123 456` and `020 123 456` becomes `20123456`. A number without `+` is read as Tunisian (+216), so an international guest written that way is rejected or saved on the wrong number. Keep the column as text (Format, Number, Plain text) and write foreign numbers with their `+`. ## Google Sheets (Apps Script) In the sheet: Extensions, Apps Script. Put the key in Project Settings, Script properties as `RITORNO_KEY`, and the address as `RITORNO_URL`. Columns: A name, B phone, C email, D accepts WhatsApp (a checkbox), E sent. Set column B to plain text (`sheet.getRange("B:B").setNumberFormat("@")`, or Format, Number, Plain text) before you paste numbers, so `+` and a leading `0` are kept. The script sends up to 100 rows per call and retries once when the answer is a 429. ```js function sendNewGuests() { const props = PropertiesService.getScriptProperties() const sheet = SpreadsheetApp.getActiveSheet() const last = sheet.getLastRow() if (last < 2) return const rows = sheet.getRange(2, 1, last - 1, 5).getDisplayValues() const todo = rows.map((row, i) => ({ row, line: i + 2 })).filter(({ row }) => row[1] && !row[4]) for (let from = 0; from < todo.length; from += 100) { const batch = todo.slice(from, from + 100) const payload = JSON.stringify( batch.map(({ row: [name, phone, email, whatsapp] }) => ({ name, phone, email, consent: { whatsapp: whatsapp === "TRUE" }, })), ) const send = () => UrlFetchApp.fetch(props.getProperty("RITORNO_URL"), { method: "post", contentType: "application/json", headers: { Authorization: "Bearer " + props.getProperty("RITORNO_KEY") }, payload, muteHttpExceptions: true, }) let response = send() if (response.getResponseCode() === 429) { Utilities.sleep(Number(response.getHeaders()["retry-after"] || 30) * 1000) response = send() } const answer = JSON.parse(response.getContentText()) const failed = new Map((answer.errors || []).map((e) => [e.index, e.message])) batch.forEach(({ line }, i) => { const note = response.getResponseCode() >= 400 && !answer.errors ? answer.message : failed.get(i) sheet.getRange(line, 5).setValue(note || "ok") }) } } ``` Run it by hand or add a time driven trigger. The fifth column keeps the answer per row: a failed row shows its reason and a row marked `ok` is not sent again (clear the cell to send it again, it is merged, not duplicated). The sheet has no email consent column, so no email consent is sent: add a column and send `email: true` only for guests who agreed. ## Zapier Needs a paid Zapier plan for webhooks. 1. Pick your trigger (a new row in Google Sheets, a form answer, a PMS event). 2. Add the action **Webhooks by Zapier, POST**. 3. URL: the address. Payload type: **Json**. 4. Data: `name`, `phone`, `language`, `email`, `consent__whatsapp` and `consent__email` (Zapier turns a double underscore into the nested `consent` object). Map the consent fields to a column holding `true` or `false`, never a fixed `true` unless your form asked the guest. 5. Headers: `Authorization` with `Bearer `. 6. Test the step. A rejected guest shows the `message` in the step result. ## Make Free tier available. 1. Add the module **HTTP, Make a request** after your trigger. 2. URL: the address. Method: POST. Body type: Raw, content type JSON. 3. Header: `Authorization` = `Bearer `. Parse response: yes. 4. Request content: ```json { "name": "{{1.name}}", "phone": "{{1.phone}}", "email": "{{1.email}}", "consent": { "whatsapp": {{1.whatsappConsent}}, "email": {{1.emailConsent}} } } ``` Use a filter on the route when `ok` is false to log or email the `message`. --- # Guest insights URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guests Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guests.md > What guests say about loyalty programs, surveys and messages, and what that means for the product. > **Warning: Confidence** > > > Several figures come from a single vendor or an older survey. Take them as direction, not as proof. ## What guests think - About half of loyalty members say hotel programs lost value (Accenture 2025). - 89 percent want to choose their rewards. - Spam is the top complaint, at 44 percent (older survey). - Upgrades are the top perk, at 47 percent. - Independent, simple programs are gaining. ## Booking sites and direct guests - Booking sites mask emails, and the masked address expires after the stay. - Direct guests returned at 5.1 percent versus 1.3 percent for booking site guests (one vendor, take with salt). ## Surveys Best practice we follow: - NPS style, six questions at most - Sent within 24 hours of checkout - SMS lifts replies 30 to 50 percent (vendor claim), which is one reason SMS comes in a later version - Never gate reviews by score: everyone gets the Google review invite ## What this means for the product | Insight | Product choice | |---|---| | Programs lost value | Recognition and simple perks, no points. See [recognition over points](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/recognition-over-points.md). | | Guests want to choose | Offers that fit, a few perks guests can pick | | Spam is the top complaint | Send less, segment, unsubscribe or STOP on every message. A CSV import never re-subscribes a guest who opted out | | Booking sites hide emails | Capture the real contact on site with the QR page | | Replies need low effort | Short survey, mobile first | --- # Pricing hypothesis URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pricing Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pricing.md > Plans and prices we want to test with hotels. All prices are untested guesses. > **Warning: Untested** > > > Every number on this page is our own guess. Nothing comes from a Tunisian source yet. The pilots and the price talks decide the real plans. ## Plans (TND per hotel per month) | Plan | Price | For | |---|---|---| | Starter | 99 | Up to 15 rooms, 1,000 guests, email and WhatsApp, welcome, birthday, survey | | Growth | 249 | 16 to 60 rooms, 5,000 guests, campaigns, offers with redemption QR, low score alerts | | Pro | 549 | 60 plus rooms or spa and restaurant, unlimited guests, custom sender domain, SMS later, priority support | ## Around the plans - Setup fee: 300 to 600 TND, free for the first three pilots. - WhatsApp and SMS: cost plus 20 to 30 percent, drawn from a prepaid balance, so there are no surprise bills. - Pilots are free for 60 to 90 days, then paid. - Annual prepay gets two months free. ## Anchor Western hotel CRMs ask about 5 to 15 USD per room per month. At about 3 TND per USD (assumption) that is 15 to 45 TND per room, so 249 TND for 40 rooms (about 6 TND per room) sits well below it. See [competitors](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/competitors.md). ## How we test it Ryan tests the plans in 5 to 10 hotel talks and asks: - Per room or flat price - Bank transfer, cash or D17 - Which plan the hotel would pick, and what would make them pick the next one Use the [price-test sheet](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pitch.md#price-test-sheet) to record the answers. ## Billing - Billing is manual at first: the app admin sets the plan names and prices, records invoices and exports them, see [hotels](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/hotels.md#billing). - We must pick the legal entity that invoices hotels before the first paid month. This is an [open decision](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions.md#open-decisions). - Stripe may not work for Tunisia (to verify). Local options are D17 and e-DINAR. See also [free pilot then paid](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/free-pilot-then-paid.md). ## On the landing page The landing page (`apps/web`, `/`, `/fr`, `/ar`) shows these three plans marked "pilot pricing" next to "free for 60 to 90 days". The numbers live in `landing.pricing` in `packages/i18n/src/messages`; change them there when this page changes. Its demo request form writes a row to the `leads` table through `leads.request` (name, hotel, phone, city, language; no hotel scoping, because a lead is not a hotel yet). The api rate limits it (5 per ip per 10 minutes), ignores a filled honeypot, and emails `LEADS_NOTIFY_EMAIL` (default `ADMIN_EMAIL`) through the notification package, which only logs outside production. The WhatsApp button appears when `WHATSAPP_CONTACT_NUMBER` is set on the web app. --- # Roadmap and milestones URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/roadmap Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/roadmap.md > Versions V1 to V4, the gate between them, and how they map to the eight GitHub milestones. Each version starts when the gate before it is met, not on a date. The numbers on the GitHub milestones are the priority order. ## Versions and gates | Version | Theme | Gate to the next | |---|---|---| | V1 | Capture, message and listen | Two paying hotels and capture proven | | V2 | Reach and trust | About 15 paying hotels and enough data | | V3 | Connect and learn | 50 plus hotels, several in one destination | | V4 | Destination network | | ## Milestones | Milestone | Name | Scope | Version | |---|---|---|---| | 1 | Foundation | Scaffold and rename, design system, i18n pipeline, CI and CD, staging, production and PR preview environments, seed data, docs, observability, agent setup | V1 | | 2 | Hotel core | Hotels as organizations, branding config, admin panel, guest and consent tables, QR capture page, CSV import and staff add, unsubscribe, privacy pages, export and delete | V1 | | 3 | Messaging | react-email templates with per hotel branding, email preview, Resend, WhatsApp via Kapso, jobs for welcome, birthday, holidays, campaigns, and offers with redemption QR | V1 | | 4 | Feedback and dashboard | Survey, low score alerts, Google review invite, hotel dashboard, feedback widget, E2E hardening, SEO and Open Graph | V1 | | 5 | Pilot launch | Production deploy, onboarding checklist, QR kit, three pilot hotels, manual billing, legal review of consent wording, support playbook | V1 | | 6 | Reach and trust | SMS with sender ID, custom sender domains, segment builder, WhatsApp team inbox, review flow, Xlia CSV mapping, multi-property | V2 | | 7 | Connect and learn | PMS connectors (Xlia first), CRM sync and module takeover, stay-based journeys, AI summaries and campaign drafts, recognition wallet, guest web app | V3 | | 8 | Destination network | Shared destination loyalty, guest app, AI concierge, direct booking requests, open API, Maghreb expansion, the opt-in location idea | V4 | ## V1 in detail V1 is what we build now. In order: 1. Hotels as organizations with branding config and a super admin panel. One bucket with a prefix per hotel. 2. Guest, consent and consent log tables, scoped by hotel. 3. Public QR capture page, mobile first, branded, in French, Arabic and English, with separate consent checkboxes. Staff add and CSV import. 4. Unsubscribe, privacy pages, guest export and delete. 5. Email with Resend and react-email. Jobs: welcome, birthday, holiday calendar, one-off campaigns to simple segments. 6. WhatsApp via Kapso template messages. Approval takes time, so templates are prepared in week 1. 7. Offers with title, text, validity, promo code and a redemption QR. 8. Post-stay survey 24 hours after checkout, six questions at most, low score alert, Google review invite for everyone. 9. Hotel dashboard and the feedback widget. 10. Production deploy and pilot onboarding. **Not in V1:** SMS, PMS integration, points or tiers, AI features, guest app, custom domains, WhatsApp inbox, multi-property, online payments, booking engine. **Success for V1:** three pilot hotels, 200 consented guests each in month one, at least one hotel still using it, two paying by the end of month three. ## V2: reach and trust SMS with a registered sender ID, custom sender domains, segment builder with saved segments, WhatsApp team inbox for reception, guest profiles, Google and Tripadvisor review flow, Xlia CSV mapping, multi-property accounts, Arabic dashboard and printable QR kit, local billing. ## V3: connect and learn PMS connectors (Xlia first), stay-based journeys, online pre check-in that captures real emails of booking site guests, AI summaries and campaign drafts in French and Arabic (a human approves), offer suggestions, recognition wallet, guest web app, anonymous benchmarks. ## V4: destination network Shared loyalty across hotels, restaurants and spas in a destination, guest app, AI concierge, direct booking requests with local payments, group analytics, open API, Maghreb expansion after a data law check. ## The long game 1. Start with capture and messages. No integration needed. 2. Connect their CRM or PMS and sync guests into ours. 3. Take over one module at a time: guests, then campaigns, then surveys. 4. Add what they cannot get elsewhere: AI, offers, recognition. 5. Their old system is no longer needed. Replacing a PMS is huge, because hotels run rooms and billing on it. Each step must be useful alone. Do not build any of this early, but keep the data model open for it. ## Exit plan (our reading) A buyer pays for recurring revenue, low churn, hotels clustered in one destination, integrations like Xlia, clean data agreements and anonymous benchmarks. A raw guest database is a liability, not an asset. --- # Risks URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md > What can go wrong and how we reduce each risk. | Risk | Fix | |---|---| | Guests and staff ignore the QR | Pilot in 3 hotels, QR in rooms and on tables, small perk | | No PMS integration, staff type twice | CSV import now, connector later | | WhatsApp cost and template approval | Prepaid balance, submit templates in week 1 | | SMS rules and sender ID | Do the paperwork during V1, ship SMS later | | Data law and hosting abroad | Lawyer checks consent wording and hosting before the first pilot | | Hotels will not pay | Free pilot and price talks, adjust plans | | Custom work per hotel | Branding config only, everything else on the roadmap | | Tour operator hotels do not care | Not our first segment | ## The big one: capture If guests get nothing for their phone number, the QR gets ignored. Everything else depends on capture, so the pilot measures it first: 200 consented guests per hotel in month one. ## Related - [Free pilot then paid](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/free-pilot-then-paid.md) - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) - [What we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md) --- # Decisions URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions.md > Short decision records with the why and the why not, plus the decisions still open. Every important choice gets a short record: context, decision, why, why not, consequences, and when to revisit it. Add a new file in `apps/docs/content/docs/decisions` and list it in `meta.json` when a PR changes a decision. ## The table | We do | We skip | Why | Record | |---|---|---|---| | Capture first (QR page, CSV import) | PMS connector in V1 | Hotels may hold no contacts, the Xlia API is unknown, integration is the top competitor complaint | [Capture first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first.md) | | Recognition and simple perks | Points and tiers | Guests think programs lost value, less to build | [Recognition over points](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/recognition-over-points.md) | | Branding is config | Custom code per client | Custom work turns a SaaS into an agency | [Branding is config](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/branding-is-config.md) | | One bucket, prefix per hotel | Bucket per client | Less ops, separate later if a hotel asks | [One bucket, prefix per hotel](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/one-bucket-prefix-per-hotel.md) | | Email and WhatsApp first | SMS on day one | SMS is one way, sender ID is slow, WhatsApp is where Tunisians talk | [Email and WhatsApp first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/email-and-whatsapp-first.md) | | Small local hotels first | Tour operator resorts first | The owner decides fast, locals are reachable | [Small local hotels first](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/small-local-hotels-first.md) | | Free pilot then paid | Building for months before selling | Prices are untested | [Free pilot then paid](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/free-pilot-then-paid.md) | ## Architecture decisions | We do | We skip | Record | |---|---|---| | A hotel is an organization | A custom tenant model | [Hotel is an organization](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/hotel-is-organization.md) | | Guests are hotel-scoped rows | Guests as auth users | [Guests are not auth users](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/guests-are-not-auth-users.md) | | Append-only consent log | A consent flag on the guest | [Consent log is append only](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/consent-log-append-only.md) | | Deleting a guest removes everything, the audit keeps a hash | Keeping consent events as proof | [Guest delete is a hard delete](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/guest-delete-is-a-hard-delete.md) | | Signed unsubscribe link per guest, hotel and channel | A token table, or a login to unsubscribe | [Unsubscribe links are signed tokens](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/unsubscribe-links-are-signed-tokens.md) | | A short code and QR per guest and offer | One shared promo code, or a long token as the QR | [Offer codes are per guest](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/offer-codes-are-per-guest.md) | | Machine translate fr and ar once per release | A translation pull request per merged PR | [Languine per release](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/languine-per-release.md) | | A self hosted Turborepo cache on The Keep, GitHub cache as fallback | Vercel remote cache only, no cache | [Turbo remote cache](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/turbo-remote-cache.md) | ## Open decisions 1. Which segment for the first three pilots. 2. Is the first release scope right. 3. Plan table and price points, see [pricing](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pricing.md). 4. Which legal entity invoices hotels. 5. Product name and domain (tn or global). 6. Does SMS have to be in the first release. 7. The self-hosted server or a small VPS for the pilot, see [infrastructure](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/infrastructure.md). Things we could not confirm, which feed these decisions, are in [what we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md). --- # Capture first, no PMS connector in V1 URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/capture-first.md > Start with a QR page and CSV import. Skip a PMS connector in V1. **Status:** accepted, November 2026 ## Context Hotels are the source of every guest contact, but many hold none. Tour operator and booking site guests arrive with masked or missing contacts. A PMS connector looks attractive because it would sync guests automatically. ## Decision V1 captures guests with a public QR page, staff add and CSV import. There is no PMS connector. ## Why - Hotels may hold no contacts at all, so there would be nothing to sync. - The Xlia API is unknown (to verify), and Xlia runs in 400 plus hotels. - PMS integration is the top competitor complaint: it breaks and support is slow. - No contact means nothing to automate, so capture has to come first. ## Why not - PMS connector in V1: slow to build, depends on vendors we cannot reach yet, and does not fix hotels with no contacts. ## Consequences - Staff may type twice if the hotel also uses a PMS. CSV import covers the gap for now. - The data model stays open so a connector can sync guests in V3. ## Revisit when Xlia confirms an API, or pilots show capture works and staff double entry is the main blocker. ## Related - [Market and research](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/market.md) - [Risks](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md) - [Roadmap](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/roadmap.md) --- # Recognition and simple perks, no points or tiers URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/recognition-over-points Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/recognition-over-points.md > Recognise guests and give simple perks through offers. No points, tiers or currency. **Status:** accepted, November 2026 ## Context Loyalty programs are the default idea of what a hotel should run. ## Decision We build recognition on the next visit and on the birthday, plus simple perks delivered as offers with a redemption QR. No points, tiers or currency. ## Why - About half of loyalty members say hotel programs lost value (Accenture 2025). - 89 percent want to choose their rewards. - Independent, simple programs are gaining. - It is much less to build and to explain at reception. ## Why not - Points and tiers: heavy to build, hard to explain, and guests already distrust them. ## Consequences - A recognition wallet is possible later (V3), still without points. - Perks must be real, otherwise the QR gets ignored. ## Revisit when Pilot hotels ask for points, or guests stop responding to perks. ## Related - [Guest insights](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/guests.md) - [Vision](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/vision.md) --- # Branding is config, never code per client URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/branding-is-config Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/branding-is-config.md > Per hotel branding (logo, two colors, display name, reply-to, language) is stored as data. There is no custom code per hotel. **Status:** accepted, November 2026 ## Context Every hotel will want its own look, and the easy way to win a hotel is to customize. ## Decision Branding lives in configuration per hotel and templates read it. Anything beyond branding goes on the roadmap instead of into a custom build. ## Why - Custom work turns a SaaS into an agency and kills the margin. - One code path is easier to test, secure and ship. ## Why not - Custom code per client: fast for one hotel, a maintenance trap at ten. ## Consequences - Some hotels may want more than we allow. We say no and add it to the roadmap if several ask. ## Revisit when Several hotels ask for the same missing thing, which then becomes a product feature. ## Related - [Vision](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/vision.md) - [Risks](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md) --- # One bucket with a prefix per hotel URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/one-bucket-prefix-per-hotel Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/one-bucket-prefix-per-hotel.md > All hotels share one S3 compatible bucket. Each hotel's files live under its own prefix. **Status:** accepted, November 2026 ## Context Hotels have logos, QR posters and exports that need storage. ## Decision One bucket, a folder prefix per hotel, and access always resolved from the hotel id. ## How it works - Every hotel key starts with `hotels//` (after the preview prefix `pr-/` on previews). Keys are built only by `hotelPrefix` and `hotelPublicPrefix` in `@ritorno/storage`, from the hotel id of the session, never from input. - Public files (logos) live in `hotels//public/`. Everything else under a hotel is private. - Logo upload is three calls: `hotel.logo.uploadUrl` (type and size checked, returns a 5 minute presigned PUT), the browser PUTs the file straight to the bucket (the bucket needs a CORS rule allowing PUT from the dashboard origin), then `hotel.logo.set` checks the key is in that hotel's public folder, reads the stored type and size (PNG, JPEG or WebP, 1 MB at most, anything else is deleted) and saves `hotel_settings.logo_key`. `logoKey` can't be set through `hotel.update`. - `/files/` is unauthenticated and only redirects for avatars and `hotels//public/` keys. Another hotel's private prefix is a 404. ## Why - Less operations work: one bucket to back up, monitor and secure. - A bucket per client adds cost and setup for no gain unless a hotel asks for data separation. ## Why not - A bucket per client: stronger separation, more to run. ## Consequences - Every storage call must be scoped by hotel id. Isolation is enforced in code, not by the bucket. - We can move one hotel into its own bucket later if it asks. ## Revisit when A hotel requires physical data separation. ## Related - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) - [Infrastructure](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/infrastructure.md) --- # Email and WhatsApp first, SMS later URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/email-and-whatsapp-first Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/email-and-whatsapp-first.md > V1 sends email and WhatsApp. SMS comes in V2. **Status:** accepted, November 2026 ## Context Hotels in Tunisia reach guests through several channels, and SMS is the obvious one. ## Decision V1 ships email and WhatsApp template messages. SMS comes in V2, and the sender ID paperwork starts during V1. ## Why - SMS is one way only, there are three operators, and the sender ID registration is slow. - An operator API needs a direct contract. - WhatsApp is where Tunisians already talk. - SMS lifts survey replies 30 to 50 percent (vendor claim), so it stays on the roadmap. ## Why not - SMS on day one: slow paperwork would delay the first pilot. ## Consequences - WhatsApp is billed per delivered template since July 2025 and the Tunisia rate is unknown (to verify). We use a prepaid balance. - WhatsApp template approval takes time, so templates are submitted in week 1. ## Revisit when The SMS paperwork completes early, or pilots show guests do not answer on WhatsApp or email. ## Related - [Market and research](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/market.md) - [Risks](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md) - [What we could not confirm](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/not-confirmed.md) --- # Small local hotels first URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/small-local-hotels-first Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/small-local-hotels-first.md > The first pilots are guesthouses, boutique hotels and hotels with a large Tunisian clientele. Tour operator resorts come later. **Status:** accepted, November 2026 ## Context The market has everything from guesthouses to all-inclusive resorts with very different buyers. ## Decision We start with hotels up to 30 rooms and hotels with many local guests. Which segment the first three pilots come from is still an open decision. ## Why - The owner decides fast. - Local guests are reachable and rebook. - Tour operator resorts do not own their guests, so loyalty matters less to them. ## Why not - Tour operator resorts first: a long sales cycle and they do not own the guest relationship. ## Consequences - The first wins are smaller in revenue per hotel. Groups and chains stay for later. ## Revisit when Pilots in small hotels succeed and a destination cluster appears. ## Related - [Vision](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/vision.md) - [Market and research](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/market.md) - [Risks](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md) --- # Free pilot, then paid URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/free-pilot-then-paid Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/free-pilot-then-paid.md > The first three hotels pilot free for 60 to 90 days. After that they pay if they see results. **Status:** accepted, November 2026 ## Context Our prices are untested guesses, and we have no proof yet. ## Decision Ryan runs a free pilot in three hotels and price talks with 5 to 10 hotels at the same time. Plans are adjusted from what we learn. ## Why - Prices are untested, so we learn from real hotels. - Ryan can sell with proof. - Building for months before selling risks building the wrong thing. ## Why not - Building for months before selling. ## Consequences - Pilot hotels get a free service, so success measures must be agreed up front. - Billing is manual at first and the invoicing entity is still open. ## Revisit when Two paying hotels, or hotels refusing to pay after a successful pilot. ## Related - [Pricing hypothesis](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pricing.md) - [Pitch playbook](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/pitch.md) - [Risks](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/risks.md) --- # Hotel equals organization URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/hotel-is-organization Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/hotel-is-organization.md > Each hotel is one better-auth organization. Staff are members with roles. Every query is scoped by that organization's id. **Status:** accepted, November 2026 ## Context We need multi-tenancy, roles for staff, and strict separation between hotels. ## Decision A hotel is a better-auth organization with owner, manager and staff roles ([Hotels](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/hotels.md)). Hotels are created by the app admin only, who can act on any hotel through the `x-hotel-id` header. Every guest row and every query carries the hotel id. ## Why - The template already provides organizations, members and roles. - One tenant concept for auth, data and storage is simple to reason about. - One hotel must never see another hotel's guests, which is a rule we test. ## Why not - A custom tenant model: more code and more places to leak data. ## Consequences - Multi-property groups (V2) need a parent concept on top of organizations. - Super admin tooling creates hotels, so it needs extra care. ## Revisit when Multi-property or chain accounts need a different model. ## Related - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) - [Engineering guide](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/engineering.md) --- # Guests are not auth users URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/guests-are-not-auth-users Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/guests-are-not-auth-users.md > Guests are rows owned by a hotel. They do not sign up and they do not have a login. **Status:** accepted, November 2026 ## Context Guests give a contact and a consent in under a minute. A login would stop most of them. ## Decision A guest is a hotel-scoped record with consent entries. Guest actions such as unsubscribe, export and delete work without a login. ## Why - Any extra step lowers capture, which is our biggest risk. - Guests belong to a hotel, not to our platform: the same person at two hotels is two relationships. - Auth users are for staff and admins only, which keeps the auth surface small. ## Why not - Guests as better-auth users: friction, and it mixes staff and guest identities. ## Consequences - Guest actions (unsubscribe, export, delete) need a link or request flow that does not depend on a session. - A guest web app in V3 will need its own identity design. ## Revisit when V3 guest web app or the destination network needs a guest account. ## Related - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) - [Roadmap](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/roadmap.md) --- # The consent log is append only URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/consent-log-append-only Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/consent-log-append-only.md > Consent is recorded as events in an append-only log per channel. We never edit or delete an entry, a change is a new entry. **Status:** accepted, November 2026 ## Context We must be able to show, per guest and per channel, when and how consent was given or withdrawn. ## Decision Each entry stores the guest, hotel, channel (email, WhatsApp, later SMS), the action, a timestamp, the source and the wording version. The current state is derived from the latest entry. ## Why - Law 2004-63 and the INPDP require clear consent, and proof is what protects the hotel. - An editable record is not proof. - Wording changes after legal review, so the version of the wording must be stored. ## Why not - A boolean on the guest row: no history and no proof. ## Consequences - Deleting a guest at their request removes the guest, their current consents and their log entries (hard delete), and the audit log keeps a row without personal data. Legal review can still change what is kept. - Reads need the latest entry per channel, so we keep a derived state or a query for it. ## Revisit when Legal review changes what has to be kept or erased. ## Related - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) --- # Guest delete is a hard delete URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/guest-delete-is-a-hard-delete Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/guest-delete-is-a-hard-delete.md > Deleting a guest removes the row, consents and consent events. The audit log keeps one row with a hash of the guest id and nothing else. **Status:** accepted, November 2026 ## Context A guest, or the hotel for them, can ask for deletion, and a hotel can leave and ask for all its guests to go. The consent log is append only, and it holds proof of consent, which we also want to keep. These pull in opposite directions. ## Decision Delete is a hard delete. In one statement the guest row goes and the foreign keys cascade to `guest_consents` and `consent_events`, so no table keeps a name, phone, email, birthday or any detail. We do not keep consent events with only a guest id hash. The audit log gets one row: `guest.delete` (or `guest.delete-all` with a count), the actor, the hotel id and, for one guest, the SHA-256 of the guest id. A person who still holds the old id can check it matches, nobody can go from the hash back to a person. Audit rows written before the delete (an export, a consent change) keep the plain guest id. It is a random uuid, it names nobody once the row is gone, and the audit log is append only. Who: owners and managers (and the app admin acting on a hotel). Staff cannot export or delete. Delete all also needs the exact guest count, and the dashboard asks the user to type the hotel name. ## Why - A request to erase has to leave nothing about the person. Consent events carry the channel, time and source of that person, so they are personal data too. - The proof we need is that we deleted on request, and the audit row is that proof. - Nothing to join on later: no table can be linked back to a deleted guest. ## Why not - Keeping consent events with a hash of the guest id: it would still tie a phone number's consent history to one record, and a hash of a short value is guessable. The proof of consent is only useful while the guest exists. - Soft delete (a `deleted_at` flag): the data would still be there. ## Consequences - If the same person is captured again, they are a new guest with a new consent log. - Legal review may require keeping proof of consent for a period. If so we revisit this and keep a minimal, separate record. ## Revisit when Legal review changes what has to be kept after a deletion request. ## Related - [The consent log is append only](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/consent-log-append-only.md) - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) --- # Unsubscribe links are signed tokens URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/unsubscribe-links-are-signed-tokens Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/unsubscribe-links-are-signed-tokens.md > Every message links to a public preference page through an HMAC signed token for the guest, hotel and channel. No login, no token table. **Status:** accepted, November 2026 ## Context Every message must be easy to stop. Guests are not users, so there is no login, and a hotel must never see or reach another hotel's guests. ## Decision The link carries a token: hotel id, guest id and the channel of the message, signed with HMAC SHA 256 under a key derived from `BETTER_AUTH_SECRET`. The page `/u/` shows the hotel's branding and one switch per channel, plus a one tap "unsubscribe from everything". It never shows the guest's name, phone or email. A change writes `guest_consents` and a `consent_events` row with source `unsubscribe_link`. A guest can switch a channel back on, the page then shows the consent wording next to the switch. Email also carries `List-Unsubscribe` and `List-Unsubscribe-Post` headers pointing at `POST /unsubscribe/` on the api. WhatsApp messages end with "Reply STOP", and a STOP reply withdraws WhatsApp consent (source `stop_reply`) for that number. ## Why - A forged or edited token fails the signature, so it cannot reach another guest or hotel. - Stateless: no table to leak, no expiry that leaves a guest unable to stop messages from an old email. - A deleted guest's link stops working because the guest row is gone. ## Why not - A random token in a table: one more table of guest links to protect and clean. - Asking for the phone or email on the page: friction, and a way to probe who is a guest. ## Consequences - Rotating `BETTER_AUTH_SECRET` breaks every link already sent. Rotate it only with a plan to resend footers, and keep STOP as the fallback. - A STOP from a number that is a guest of several hotels withdraws WhatsApp consent at all of them unless the webhook knows the receiving hotel. ## Revisit when Messaging uses a per hotel WhatsApp number, or legal review wants links to expire. ## Related - [Data and consent rules](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md) - [The consent log is append only](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/consent-log-append-only.md) --- # Offer codes are per guest URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/offer-codes-are-per-guest Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/offer-codes-are-per-guest.md > Each guest gets their own short code and QR for an offer, so a redemption is once per guest and a code cannot be passed around. **Status:** accepted, November 2026 ## Context A hotel wants to measure offers: how many guests used the welcome drink, and no double use. A shared promo code cannot do that, and a code that only the staff can read (a long signed token) cannot be typed when a phone camera fails. ## Decision An offer has a promo code (unique per hotel, for the hotel's own use and for unbound redemptions) and every guest who opens their offer link gets their own short code, stored in `offer_codes` and shown as a QR. A redemption is one row, unique per offer and guest. ## Why - The unique constraint is the only thing that stops two staff members redeeming the same guest at once, no locking needed. - A short code of 8 characters (31 letters and digits that cannot be confused) can be typed at the desk and is unique across hotels, so a code from another hotel is reported as "wrong hotel" and not as unknown. - The link to the offer page is a signed token, the QR holds only the short code. ## Why not - One signed token as the QR content: long, dense QR, impossible to type. - Deriving the short code from the guest id: it cannot be looked up without the id, and a table is simple. ## Consequences - A code row exists for every guest who opened an offer link. Deleting a guest deletes their codes. - Offer text is one language per offer for now. ## Revisit when A hotel needs offers in several languages, or codes that expire per guest. --- # Languine per release URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/languine-per-release Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/languine-per-release.md > Why French and Arabic are machine translated once per release and not on every merged pull request. **Status:** accepted, November 2026 ## Context English is the source language. `fr` and `ar` are generated by a self hosted [Languine](https://languine.ai/docs) from `packages/i18n/src/messages/en.json`. The model output is a first draft: hotel guests read it, and the consent and unsubscribe wording is legal text, so a human has to read every change before it ships. Until a missing key is translated the apps show the English text (see [Languages and RTL](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/i18n.md)), so lag is visible but never broken. Two triggers were possible: 1. translate on every merged pull request 2. translate when a release is published ## Comparison | | Per merged pull request | Per release (chosen) | | --- | --- | --- | | Model cost | small per run, many runs. Strings that change before release are paid for each time | one run per release, only the final wording is translated. Languine tracks what changed in `languine.lock`, so unchanged keys are free | | Review load | a new fr/ar pull request after nearly every merge, mostly one or two strings each | one batch with a checklist, read in one sitting | | Review quality | the reviewer sees a string without its neighbours and the final English | the reviewer sees the whole release, can compare tone across screens and fix repeated terms once | | Merge conflicts | parallel branches all touch `fr.json` and `ar.json` | translation files change in one place, once | | Time to French and Arabic | minutes after the feature merges | after the release and its review. In between the English fallback shows | | Noise | long history of tiny `chore(i18n)` pull requests, bot pull requests do not trigger CI by default | one pull request per release | The honest cost of the release model is the gap: if production deploys from `main` on every merge, a hotel can see English strings for a few days. The honest cost of the per pull request model is that nobody reviews tiny translation pull requests carefully, which is how bad Arabic reaches guests. The money is not the deciding factor. Our message files are small, so model cost is cents either way. Human review time, especially Arabic, is the scarce resource, and batching it is the real saving. ## Decision Translate once per release, with a manual run for urgent changes. - the `languine` workflow is called by `release.yml` after a release and runs on `workflow_dispatch` - it translates `en` into `fr` and `ar`, runs `pnpm i18n:check` and opens one pull request on a `i18n/` branch with the review checklist in `.github/translation-pr-body.md` - if a translation pull request is already open it does nothing, so there is never more than one - reviewers come from `.github/translation-reviewers` (one GitHub login per line, `yasin` is a placeholder to replace) - with no `LANGUINE_API_KEY` or `LANGUINE_BASE_URL` secret the workflow ends with a notice and no failure Use the manual run when a feature must reach French or Arabic hotels before the next release: Actions, `languine`, Run workflow. ## Why - human review of Arabic is the scarce resource, one batch with a checklist gets read, many small pull requests do not - only the final English wording is paid for and translated - reviewers see tone across a whole release and fix repeated terms once ## Why not - per merged pull request: faster, but many tiny review pull requests, repeated cost for strings that change again, and merge conflicts on `fr.json` and `ar.json` between parallel branches ## Consequences - cut releases often, and before a feature that matters to French or Arabic guests goes to hotels - a change that cannot wait for a release, such as consent or unsubscribe wording, gets a manual run and a reviewed pull request the same day - a pull request opened with the default `GITHUB_TOKEN` does not start CI. The workflow runs `pnpm i18n:check` itself. To get full CI on it, close and reopen the pull request, or set up a token for the workflow later - the files translated are listed in `languine.json`. Docs pages and email templates join it when they move to translatable files ## Revisit when A release train slower than a week leaves hotels on English too long, or the English wording changes so little that per merge pull requests would be cheap to review. ## To enable Add these in repository settings, Secrets and variables, Actions: | Name | Kind | Value | | --- | --- | --- | | `LANGUINE_API_KEY` | secret | the key set on the self hosted deployment | | `LANGUINE_BASE_URL` | secret | the deployment url, like `https://languine.your-team.example` | | `LANGUINE_PROJECT_ID` | secret, optional | the project id printed by `languine init` | Then replace the placeholder in `.github/translation-reviewers`. --- # Self hosted Turborepo remote cache URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/turbo-remote-cache Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/turbo-remote-cache.md > CI shares build artifacts through a cache server on The Keep, with the GitHub Actions cache as fallback. **Status:** accepted, November 2026 ## Context Every CI run and Dokploy build starts cold. Turborepo can share task outputs through a remote cache. The hosted option is Vercel, a self hosted server keeps artifacts on our own disk. ## Decision Run `ducktors/turborepo-remote-cache` as a Dokploy application on The Keep at `turbo-ritorno.findmalek.engineer`, storing artifacts on a local volume. CI uses it when `TURBO_TOKEN` is set and falls back to the GitHub Actions cache when it is not. ## Why - Free, 155 GB of free disk, no vendor account. - One shared cache for CI, previews and developers. - Fork pull requests have no secrets, the fallback keeps them working. ## Why not - Vercel remote cache: another account and a paid tier for a team. - Only the GitHub Actions cache: per branch scoping, 10 GB cap, and it is not shared with Dokploy or laptops. ## Consequences - One more service to keep up. If it is down, turbo warns and builds locally, CI does not fail. - The CI build `.env` uses fixed build only values, because `.env` is a turbo global dependency and a random secret would change every hash. ## Revisit when The disk fills up, or the cache server causes more flakiness than it saves. ## Related - [Turbo cache](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/turbo-cache.md) --- # Data and consent rules URL: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules Markdown: https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/data-rules.md > What guest data we collect, what we never collect, how consent is logged, and who owns the data. > **Warning: Not legal advice** > > > Law 2004-63 and the INPDP apply. We are not lawyers. A lawyer checks the consent wording and hosting before the first pilot. ## Ownership - The hotel owns the guest data. We only process it, and the contract says so. - Data is stored in our database, per hotel, so our AI can learn from it later. - We never sell or reuse a raw guest list. - Anonymous combined stats are ours to use. - The hotel can export and delete at any time, per guest and per hotel. ## Data tiers | Tier | Fields | |---|---| | Must have | Name, phone, language, consent | | Optional | Birthday, email | | Optional with consent | Origin (country, city), stay dates, length of stay, where they go next, survey answers | | Never | Continuous phone location, passport or ID numbers, payment cards | Every extra question lowers the number of guests who finish the form, and every field is something we must protect. Do not add a field the hotel would never use. ## Consent - Consent is logged per channel: email, WhatsApp, and later SMS. - Each entry records the timestamp, the source, and the wording version. - When signed-in staff make the change (adding a guest, a CSV import, a consent switch), the entry also keeps their user id (`consent_events.staff_user_id`). It stays empty for the guest's own answers (QR, unsubscribe, STOP) and is cleared if the staff account is deleted. It is not part of the guest export. - The log is append only. A change of mind is a new entry, never an edit. See [consent log is append only](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/consent-log-append-only.md). - WhatsApp and email have separate toggles on the capture page, both off by default, each with the exact logged wording under it. - Every message carries an unsubscribe link or STOP. Messaging builds them with `packages/common/src/unsubscribe.ts`: `signUnsubscribeToken`, `unsubscribePageUrl`, `listUnsubscribeHeaders` (RFC 8058 one tap, for email) and `unsubscribeFooter` (the line every message ends with). The link opens `/u/` on the web app (en, fr, ar, the hotel's branding): one switch per channel and one tap to stop everything. Each change is a consent event with source `unsubscribe_link`. Email clients that show their own button POST to `/unsubscribe/` on the api. - An inbound WhatsApp message is checked with `isStopKeyword` (the whole message must be STOP, arrêt, توقف and the like). The webhook then calls `applyStopReply`, which withdraws WhatsApp consent with source `stop_reply`. See [unsubscribe links are signed tokens](https://pr-472-docs.preview-ritorno.findmalek.engineer/docs/decisions/unsubscribe-links-are-signed-tokens.md). - The consent text lives in one place so it can change after legal review: `packages/common/src/consent.ts` (`CONSENT_WORDING` in en, fr and ar, and `CONSENT_WORDING_VERSION`, bumped on every change). - `/privacy` and `/terms` (en, fr, ar) are short plain-language drafts in `apps/web`, not yet reviewed by a lawyer; the privacy page prints the live `CONSENT_WORDING`, so it can never drift from what the capture page shows. ### Changing the wording - Edit `CONSENT_WORDING` in `packages/common/src/consent.ts` only. Never copy the text into a component or a translation file. - Bump `CONSENT_WORDING_VERSION` (`YYYY-MM-