How rajpatel676/bookify works
Project type and purpose
• Bookify is a full-stack web application for online booking (hotels, restaurants, guest houses).
• It uses static HTML/CSS/JS for the UI, a Node.js backend (server.js), and a MySQL database for persistence.
File structure
• Top-level “Table_Booking” folder:
• public/ – all static HTML pages (index.html, booking.html, login.html, etc.)
• css/ – global style.css
• img/ – static images
• lib/ – third-party JS/CSS libraries (owlcarousel, animate.css, tempusdominus, etc.)
• js/ – contains both client code (main.js) and the Node.js backend (server.js, package.json, node_modules)
• vercel.json – optional deployment settings for Vercel
• Configuration: package.json for npm, .gitignore, README.md
README
• Confirms HTML/CSS frontend, Node.js backend, and MySQL database named “usersystem” with tables “users” (id, name, email, password) and likely a “bookings” table.
• Mentions real-time data sync and email notifications (contact page SMTP).
Main components
a. Frontend (Client Browser)
• Static assets:
• HTML pages (public/)
• CSS (css/)
• JS/CSS libraries (lib/)
• Client-side logic (js/main.js)
b. Backend (Node.js server)
• server.js (Express or HTTP server)
• API endpoints:
• Authentication (signup, login, reset password)
• Booking operations (search availability, book, cancel)
• Contact/email service
• Business logic (in server.js)
• Environment config (e.g., SMTP credentials, DB connection)
c. Database (MySQL)
• usersystem database
• users table
• bookings (or reservations) table
d. External services
• SMTP/email provider for contact form
• (Optional) Vercel/serverless functions if used for deployment
Relationships and data flows
• User’s Browser → HTTP(S) GET/POST → Node.js Server
• Node.js Server → SQL queries → MySQL Database
• Node.js Server → SMTP commands → Email Service
• Static assets served by the same Node.js server (or via CDN/Vercel)
Architectural patterns & principles
• Layered architecture: Presentation (HTML/CSS/JS) → API layer (Express routes) → Data layer (MySQL)
• Single-page navigation via static HTML pages + client JS for dynamic interactions
• Separation of concerns: static file hosting vs API endpoints vs data persistence
• Use of third-party libraries for UI enhancements (animate.css, owlcarousel, tempusdominus)
Final checklist
• Annotations for key technologies (Node.js, MySQL, HTML/CSS, lib folder components, SMTP)
• Deployment node (localhost:3000 or Vercel)