# le-hoetel docs > Loyalty and guest relationships for hotels in Tunisia # Introduction URL: https://docs-staging-lehoetel.findmalek.engineer/docs Markdown: https://docs-staging-lehoetel.findmalek.engineer/docs/index.md > What Le Hoetel is, who it is for, and where to find things. Le Hoetel 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://docs-staging-lehoetel.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 - [Vision](https://docs-staging-lehoetel.findmalek.engineer/docs/vision.md): Principles, segments and why a hotel says yes. - [Market and research](https://docs-staging-lehoetel.findmalek.engineer/docs/market.md): Tunisia, channels and the rules that apply. - [Decisions](https://docs-staging-lehoetel.findmalek.engineer/docs/decisions.md): Every choice with its why and why not. - [Data and consent rules](https://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md): What we collect, what we never collect. - [Pitch playbook](https://docs-staging-lehoetel.findmalek.engineer/docs/pitch.md): Discovery questions, objections, demo and pilot. - [How we work](https://docs-staging-lehoetel.findmalek.engineer/docs/how-we-work.md): Agents loop, labels, PR and merge rules. - [Engineering guide](https://docs-staging-lehoetel.findmalek.engineer/docs/engineering.md): Stack, packages and commands. - [What we could not confirm](https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/structure.md) - `docs/plan`: the original planning board, see [the plan](https://docs-staging-lehoetel.findmalek.engineer/docs/plan.md) --- # Vision and principles URL: https://docs-staging-lehoetel.findmalek.engineer/docs/vision Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/risks.md). --- # Market and research URL: https://docs-staging-lehoetel.findmalek.engineer/docs/market Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/decisions/email-and-whatsapp-first.md) | | Tour operators own their guests | [Small local hotels first](https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/small-local-hotels-first.md) | | Guests say programs lost value | [Recognition over points](https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/recognition-over-points.md) | | Prices are untested | [Free pilot then paid](https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/free-pilot-then-paid.md) | See also [competitors](https://docs-staging-lehoetel.findmalek.engineer/docs/competitors.md) and [guest insights](https://docs-staging-lehoetel.findmalek.engineer/docs/guests.md). --- # Competitors URL: https://docs-staging-lehoetel.findmalek.engineer/docs/competitors Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/not-confirmed.md). --- # Guest insights URL: https://docs-staging-lehoetel.findmalek.engineer/docs/guests Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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 | | 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://docs-staging-lehoetel.findmalek.engineer/docs/pricing Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/pitch.md#price-test-sheet) to record the answers. ## Billing - Billing is manual at first. - We must pick the legal entity that invoices hotels before the first paid month. This is an [open decision](https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/roadmap Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/risks Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/decisions/free-pilot-then-paid.md) - [Data and consent rules](https://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) - [What we could not confirm](https://docs-staging-lehoetel.findmalek.engineer/docs/not-confirmed.md) --- # Decisions URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/decisions/hotel-is-organization.md) | | Guests are hotel-scoped rows | Guests as auth users | [Guests are not auth users](https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/infrastructure.md). Things we could not confirm, which feed these decisions, are in [what we could not confirm](https://docs-staging-lehoetel.findmalek.engineer/docs/not-confirmed.md). --- # Capture first, no PMS connector in V1 URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/capture-first Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/market.md) - [Risks](https://docs-staging-lehoetel.findmalek.engineer/docs/risks.md) - [Roadmap](https://docs-staging-lehoetel.findmalek.engineer/docs/roadmap.md) --- # Recognition and simple perks, no points or tiers URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/recognition-over-points Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/guests.md) - [Vision](https://docs-staging-lehoetel.findmalek.engineer/docs/vision.md) --- # Branding is config, never code per client URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/branding-is-config Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/vision.md) - [Risks](https://docs-staging-lehoetel.findmalek.engineer/docs/risks.md) --- # One bucket with a prefix per hotel URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/one-bucket-prefix-per-hotel Markdown: https://docs-staging-lehoetel.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 `@le-hoetel/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://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) - [Infrastructure](https://docs-staging-lehoetel.findmalek.engineer/docs/infrastructure.md) --- # Email and WhatsApp first, SMS later URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/email-and-whatsapp-first Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/market.md) - [Risks](https://docs-staging-lehoetel.findmalek.engineer/docs/risks.md) - [What we could not confirm](https://docs-staging-lehoetel.findmalek.engineer/docs/not-confirmed.md) --- # Small local hotels first URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/small-local-hotels-first Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/vision.md) - [Market and research](https://docs-staging-lehoetel.findmalek.engineer/docs/market.md) - [Risks](https://docs-staging-lehoetel.findmalek.engineer/docs/risks.md) --- # Free pilot, then paid URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/free-pilot-then-paid Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/pricing.md) - [Pitch playbook](https://docs-staging-lehoetel.findmalek.engineer/docs/pitch.md) - [Risks](https://docs-staging-lehoetel.findmalek.engineer/docs/risks.md) --- # Hotel equals organization URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/hotel-is-organization Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) - [Engineering guide](https://docs-staging-lehoetel.findmalek.engineer/docs/engineering.md) --- # Guests are not auth users URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/guests-are-not-auth-users Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) - [Roadmap](https://docs-staging-lehoetel.findmalek.engineer/docs/roadmap.md) --- # The consent log is append only URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/consent-log-append-only Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) --- # Guest delete is a hard delete URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/guest-delete-is-a-hard-delete Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/decisions/consent-log-append-only.md) - [Data and consent rules](https://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) --- # Unsubscribe links are signed tokens URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/unsubscribe-links-are-signed-tokens Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/data-rules.md) - [The consent log is append only](https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/consent-log-append-only.md) --- # Offer codes are per guest URL: https://docs-staging-lehoetel.findmalek.engineer/docs/decisions/offer-codes-are-per-guest Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/decisions/languine-per-release Markdown: https://docs-staging-lehoetel.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://docs-staging-lehoetel.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 runs on `release: published` and 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://docs-staging-lehoetel.findmalek.engineer/docs/decisions/turbo-remote-cache Markdown: https://docs-staging-lehoetel.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-lehoetel.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://docs-staging-lehoetel.findmalek.engineer/docs/turbo-cache.md) --- # Data and consent rules URL: https://docs-staging-lehoetel.findmalek.engineer/docs/data-rules Markdown: https://docs-staging-lehoetel.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. - The log is append only. A change of mind is a new entry, never an edit. See [consent log is append only](https://docs-staging-lehoetel.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://docs-staging-lehoetel.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-