Skip to case study
Back to projects

// Evidence Dossier

Cabañas Las Palmas

Public showcase and reception panel for cabins, guests, bookings, deposits and reports. End-to-end development in active use by two administrators, with documented decisions and tests.

Next.js 16React 19TypeScriptSQLite WALVitestExcelJSPDFKit
Project video preview.

From a WhatsApp inquiry to a recorded booking

Visitors browse the cabins and ask about a stay via WhatsApp. Reception confirms the stay and records it in the private dashboard.

  • Check which cabins are occupied on the requested dates.
  • Link each booking to its guest, cabin and dates.
  • Record a deposit and review the outstanding balance.

A local check recorded a booking and a deposit using fictional data.

Who it serves

Two administrators register guests and manage the resort. Visitors view cabins and inquire via WhatsApp; they do not book or pay through the public site.

My responsibility

I designed and developed the site, dashboard, APIs, database, and deployment end to end as sole developer, with deployment in late June.

Current status

In active production with two administrators, confirmed by the author on November 1, 2026. Launch was in late June. This review checked a local copy with fictional data.

What it enables

Reception can connect each stay to its guest, cabin, deposits and reports in one panel. Use is author-confirmed; time savings do not yet have a verifiable measurement.

Context

Cabañas Las Palmas combines a public showcase with a private reception tool. Two administrators use it daily to record guests. The public page shows cabins, a gallery, and WhatsApp contact; it does not publish computed availability or offer booking checkout.

In plain terms: the website starts the conversation and the panel keeps what reception agrees and records.

Problem

With a small physical inventory, reception must connect each stay to a cabin, guest, dates, and payments. A visual list has limited value if creation, status changes, or payment handling can leave contradictory records. The system aims to centralize these tasks; complete elimination of overbooking or payment mistakes has not been proven.

My role

I took responsibility for end-to-end design and development: public experience, private panel, business logic, data and deployment preparation. That includes explaining decisions and separating implementation from runtime evidence. Authorship and launch are author-provided information; Git history traces technical changes.

Constraints

A single-server architecture with SQLite avoids operating a separate database, but requires durable storage for the database, images, and backups plus a tested restore policy. Stay dates are calendar days; checkout and check-in on the same date must be compatible. Guest and payment information stays out of this case study and its tests.

Solution

The public site presents active cabins, photos, amenities, and a WhatsApp inquiry link. In the panel, an authenticated staff member registers guests, creates stays for a cabin and date range, reviews occupancy in tables, records payments and extras, and obtains reports or exports. An email receipt after booking is optional: delivery failure does not undo a saved booking. There is no payment gateway or visitor self-booking flow.

Architecture & diagrams

A Next.js 16 application with React 19 separates public presentation from private views. Route Handlers validate inputs and permissions, while better-sqlite3 stores cabins, guests, bookings, and payments in SQLite with WAL and foreign keys. Booking creation and full edits use BEGIN IMMEDIATE to check overlap and insert within a serialized write. Public content reads visible cabins, not the occupancy calendar. ExcelJS creates authorized exports; PDFKit and Nodemailer serve receipt and notification flows when configured.

Public showcase, management and persistence flow
Public showcase, management and persistence flowVisitors browse cabins and contact reception through WhatsApp. The operator signs into the private panel to record stays and payments. Booking creation and payment entry use immediate transactions in SQLite with WAL. Photos and encrypted database backups are separate files. The panel exports Excel reports; PDF receipts belong to the optional email flow after a booking is saved.reception confirms availabilityJWT sessionRead / writeLocal diskPDFKitExcelJS · XLSXVisitorPublic showcaseNext.js · App RouterWhatsApp channelOperatorManagement panelNext.js · JWT HttpOnlyBusiness modulesStays · deposits · extrasVouchersPDFKit · NodemailerReportsExcelJS · XLSXSQLiteWAL · transactionsLocal diskSharp · backupsPublic showcase, management and persistence flowVisitors browse cabins and contact reception through WhatsApp. The operator signs into the private panel to record stays and payments. Booking creation and payment entry use immediate transactions in SQLite with WAL. Photos and encrypted database backups are separate files. The panel exports Excel reports; PDF receipts belong to the optional email flow after a booking is saved.reception confirms availabilityJWT sessionVisitorPublic showcaseNext.js · App RouterWhatsApp channelOperatorManagement panelNext.js · JWT HttpOnlyBusiness modulesStays · deposits · extrasSQLiteWALLocal filesSharp · backupsVouchersPDFKitReportsExcelJS
Read the diagram and its limits

1. Workflow and actors: The visitor browses cabins and rates on the public showcase (Next.js App Router) and initiates booking inquiries via WhatsApp. The operator receives inquiries, manually verifies cabin availability, and enters the private management panel using a JWT HttpOnly cookie session.

2. Components and connections: Booking creation and payment entry use immediate transactions in SQLite with WAL. Photos are stored on disk and processed with Sharp. Encrypted database backups are separate files and do not include the photos.

3. Outputs: The panel exports reports with ExcelJS. PDFKit builds the reservation receipt for the optional email flow after the booking is saved. PDF generation was checked by the original suite; actual email delivery was not.

4. Verification: Active production with two administrators was author-confirmed on November 1, 2026. Local evidence includes 59 original tests and ten additional scenarios using fictional data: HTTP operations, downloaded Excel values and encrypted database recovery into a new file.

5. Limits: Three synthetic scenarios reproduced overlapping reactivation, a repeated partial deposit and a negative balance after reducing a paid stay. Twelve HTTP requests to one local process produced one creation and eleven conflicts. Production recovery, image backups and external email remain unverified.

Implementation map reviewed locally; active production use reported by the author. Bookings do not use automated payment gateways; availability coordination is handled manually via WhatsApp.

Critical booking flow

1. Reception signs in and opens reservations; the browser loads cabins, guests, and bookings from private handlers.

2. Staff select the guest, unit, and dates. The server validates identifiers, dates, and rate.

3. An immediate transaction checks for the guest and active cabin, searches for overlapping active stays, and inserts a booking with nights and total if none exists. An overlap returns a conflict.

4. The response appears in the list. Reception can record a deposit; its handler recalculates the balance in another transaction and stores the payment.

5. A booking notification is attempted after the transaction is confirmed and may be skipped or fail without deleting the booking. This journey has no external charge or automatic visitor acceptance.

Concurrency and data integrity

Creation and full edits check overlap inside an immediate transaction. Deposits recalculate the balance before writing. In the local check, twelve HTTP requests started together for the same dates produced one creation and eleven conflicts. This checked one process and local SQLite, without measuring multiple processes or sustained load.

Three limits were reproduced: a status-only update can reactivate a cancelled booking even when another occupies those dates; repeating a partial deposit records another entry if a balance remains, without distinguishing a retry from a new payment; reducing the total of an already paid stay can leave a negative balance. These are synthetic scenarios, not incidents attributed to the users. Two equal deposits may be legitimate; the limit is identifying a retry. A negative balance needs a defined credit or refund policy.

In plain terms: booking creation has checks, but later changes also need protection. The priority is to enforce the same rule on every transition, define payment corrections and identify retries. Validation does not establish globally conflict-free bookings or duplicate-free payments.

Engineering decisions

1. One application and SQLite with WAL. Gain: simpler operation for one instance and transactions close to the data. Cost: services are coupled and distributing writes across instances requires redesign. In plain terms: fewer moving parts, with clear growth limits.

2. Calendar dates and exclusive checkout. Gain: a departure and arrival on the same date are compatible. Cost: this rule does not model check-in and checkout hours. In plain terms: it reserves nights rather than hourly slots.

3. Availability check and insert in an immediate transaction. Gain: creation keeps the check and write together. Cost: writes are serialized and every status transition still needs protection. In plain terms: checking and saving form one operation; later edits need the same discipline.

4. Email after persistence. Gain: an email provider cannot block the booking record. Cost: a saved booking does not establish message delivery. In plain terms: recording confirmation does not prove that the guest received a receipt.

5. Encrypted database backups. Gain: confidentiality and a recovery procedure checked locally. Cost: key custody and separate image backups. In plain terms: recovering records and recovering photographs are different tasks.

Security and data protection

Private handlers verify JWTs, active sessions and roles on the server. Mutations check origin, size and inputs; business queries use parameters. Both roles share the same business records and only the administrator role can access audit logs. The local check exercised that permission difference.

Database backups support authenticated encryption; a local creation and restore cycle was checked. This does not establish key custody, server security, email delivery or regulatory compliance. Personal data, credentials and operational details are excluded from public material.

Testing and verification scope

On November 1, 2026, the original suite ran again in an isolated copy: 59/59 tests across 16 files, with unchanged assertions. ESLint, TypeScript and the Next.js 16.3.3 build also passed. The original PDF test generated a one-page document and checked its structure and expected content; email receipt was not verified.

Ten additional scenarios exercised the compiled server and a new SQLite database. Seven checked specific journeys or controls; three reproduced the documented integrity limits. The downloaded workbook was opened with ExcelJS to inspect data and types, and an encrypted backup was restored into a new file with integrity and row-count checks. No real guest records or external email were used.

Configured coverage covers two helper modules, not the entire product. The historical twenty-task simulator remains background evidence only: current concurrency figures come from HTTP requests to the real handler.

Results and scope of the checks
CheckResultScope
Original suite59/59 tests · 16 filesUnchanged assertions; includes local PDF generation.
Static checks and buildLint, TypeScript and build passedNext.js 16.3.3 in an isolated copy; resolution roots adjusted only for the lab.
Additional scenarios10/10 observations verifiedSeven journeys or controls and three reproduced limits. Fictional accounts, records and database; email disabled.
Concurrent requests1 creation · 11 conflicts12 HTTP requests to one process with local SQLite; no multiple-process or sustained-load test.
Later changes and integrityThree limits reproducedOverlapping reactivation, repeated partial deposit and reducing the total below the amount paid.
Export and recoveryXLSX read · database restoredWorkbook values and types checked; encrypted backup restored into a new file with integrity and row counts. Images excluded.
Coverage and productionDefined scopeCoverage of two helper modules. Active production author-confirmed; server and real email not inspected.

Deployment and operation

Next.js prepares a standalone artifact for one Node process. Database, images and backups need durable locations separate from release replacement. The author confirmed active production use with two administrators on November 1, 2026.

Validation started the compiled local server directly. Resolution and tracing roots were pinned only in the copy to isolate it from the enclosing portfolio. The deployment launcher was not executed and the original product was not modified. Synthetic database recovery was checked; image backups, scheduled jobs and actual server restoration were not. Email, proxy, permissions and production availability require their own operational evidence.

Outcome and operational impact

Reception has one panel connecting guests, dates, units, deposits, extras, expenses and reports. The showcase opens contact and the administrator retains control over confirmation. Continued use by two administrators was author-confirmed in this review.

The demonstrated result is the capability implemented and checked in the stated scenarios. Quantifying savings or fewer errors requires a baseline, period and measurement method. Before expanding booking automation, the priority is closing the three reproduced integrity gaps.

Evidence and limits

Implemented: WhatsApp showcase, panel, bookings, payments, reports, exports and optional notification. Locally checked: 59 original tests and ten additional fictional-data scenarios, including three reproduced limits. Simulated: lab records and accounts; external email remained disabled. Live operational status: author confirmation on November 1, 2026 of active use by two administrators, not an independent server inspection. Pending: integrity fixes, full recovery and production jobs, actual email delivery and business metrics. Technical records remain internal.

Concurrency & overbooking evidence

Twelve HTTP requests started together against the real handler and local SQLite produced one creation and eleven conflicts. One process was used, without a sustained load test. A status-only update permitted an overlapping reactivation. The historical in-memory simulator is not used as server evidence.

Operational observations & live deployment

End-to-end solo development and active use by two administrators, author-confirmed on November 1, 2026. Local tests did not access the server, real guest records or user testimonials.

Software quality and UX

The showcase presents cabins and supports WhatsApp inquiries; the panel groups reception tables and forms. The header preview shows the public presentation of the project. This dossier has Spanish and English copy, a summary, chapter navigation and a responsive diagram. Local review of this case study is not an accessibility evaluation of the entire product.

Code sample and engineering test

A small public illustration of the overlap predicate used on creation: it compares two calendar-day intervals for the same cabin and excludes canceled bookings. It does not implement transactions, payments, or the API.

JavaScript / Node.js
// Isolated illustration of the reservation overlap predicate.
// Inputs are validated YYYY-MM-DD calendar dates before this check.
export function overlaps(existing, candidate) {
return existing.cabinId === candidate.cabinId
&& existing.status !== 'Cancelada'
&& existing.checkIn < candidate.checkOut
&& existing.checkOut > candidate.checkIn;
}

Isolated sample test

JavaScript / Node.js
import assert from 'node:assert/strict';
const stay = { cabinId: 1, status: 'Reservada', checkIn: '2026-04-10', checkOut: '2026-04-14' };
assert.equal(overlaps(stay, { cabinId: 1, checkIn: '2026-04-12', checkOut: '2026-04-15' }), true);
assert.equal(overlaps(stay, { cabinId: 1, checkIn: '2026-04-14', checkOut: '2026-04-17' }), false);
assert.equal(overlaps(stay, { cabinId: 2, checkIn: '2026-04-12', checkOut: '2026-04-15' }), false);
assert.equal(overlaps({ ...stay, status: 'Cancelada' }, { cabinId: 1, checkIn: '2026-04-12', checkOut: '2026-04-15' }), false);

The sample and these four assertions were executed exactly as displayed as an isolated Node.js module. This proves the predicate for those cases; date validation and atomicity were examined separately in the real system.