16 · 2026

ระบบจองที่พักรีสอร์ทResort Booking System

ระบบจองห้องพักครบวงจร แยกพอร์ทัลลูกค้าและพนักงาน มี OTP login แจ้งเตือนทางอีเมล และอัปโหลดรูปห้องพักขึ้น cloudEnd-to-end room booking with separate guest and staff portals, OTP login, email notifications and cloud image uploads.

เซิร์ฟเวอร์ฟรีจะหลับเมื่อไม่มีคนใช้ — เปิดครั้งแรกอาจรอ 30–60 วินาทีFree hosting sleeps when idle — the first load can take 30–60 seconds

server/app.js
// หนึ่ง router ต่อหนึ่งฟีเจอร์app.use('/api/auth', authRoutes);    // JWT + OTPapp.use('/api/booking', bookingRoutes);app.use('/api/room', roomRoutes);app.use('/api/upload', uploadRoutes); // → GCS
16ROUTES10

ภาพรวม

ระบบจองที่พักรีสอร์ทที่แบ่งผู้ใช้เป็น 2 ฝั่ง

  • ลูกค้า — สมัครสมาชิก, เข้าสู่ระบบด้วย OTP, ค้นหาและจองห้องพัก, กรอกข้อมูลผู้เข้าพัก, ดูประวัติการจอง และจัดการบัญชี
  • พนักงาน / เจ้าของ — dashboard สำหรับพนักงาน, จัดการการจอง, จัดการห้องพักและรูปภาพ, จัดการสมาชิก และดูรายงาน

สถาปัตยกรรม

client/ (HTML + JS)  ─┐
employee/ (HTML + JS) ┴─▶  Express API  ─▶  PostgreSQL
                            │
                            ├─▶ Google Cloud Storage (รูปห้องพัก)
                            └─▶ Email (Nodemailer / Resend) + node-cron
  • แยก route ตามฟีเจอร์: auth, booking, room, staff, dashboard, report-owner ฯลฯ
  • ยืนยันตัวตนด้วย JWT และ OTP ทางอีเมล
  • งานตั้งเวลา (node-cron) สำหรับงานเบื้องหลังของระบบ
  • มี DDL ทั้ง PostgreSQL และ Oracle

Deploy

Deploy บน Render — หมายเหตุ: แผนฟรีจะหลับเมื่อไม่มีคนใช้ การเปิดครั้งแรกอาจใช้เวลาประมาณ 30–60 วินาที

Overview

A resort booking system with two sides:

  • Guests — sign up, log in with an email OTP, browse and book rooms, enter guest details, view booking history and manage their account.
  • Staff / owner — a staff dashboard, booking management, room and photo management, member management and reports.

Architecture

client/ (HTML + JS)  ─┐
employee/ (HTML + JS) ┴─▶  Express API  ─▶  PostgreSQL
                            │
                            ├─▶ Google Cloud Storage (room photos)
                            └─▶ Email (Nodemailer / Resend) + node-cron
  • Routes split by feature: auth, booking, room, staff, dashboard, report-owner, …
  • Authentication with JWT plus email OTP
  • Scheduled background jobs with node-cron
  • Schema scripts for both PostgreSQL and Oracle

Deployment

Hosted on Render. The free tier sleeps when idle, so the first request can take 30–60 seconds.