Skip to content

A web app for hotels reservations using Vue.js Framework and Vite as a build tool.

Notifications You must be signed in to change notification settings

tarekelkanaria/hotels-booking

Repository files navigation

Hotels Booking

A Front End web app for hotels reservations using Vue.js Framework and Vite as a build tool.

Demo Preview

Link to the demo

project setup

  • You can run npm install to setup the project
  • npm start to open the project in the development server on your default browser automatically just if you prefer
  • npm run build to build the project for production
  • npm run preview to view the project in the production environment after build script.

Requirements

  • The web page displays a list of hotels and each one has a name, an address, a rating, and a button to book it.
  • when the user clicks the Book button, a form will display so the user can enter his name, email, and phone number.
  • when the user submits the form, a thanks message will display for the user saying

    Thank you for booking with us.

  • if the user wants to book another hotel a welcome message will display to confirm the booking and then a thanks message will display again.
  • the web provides cart functionality so the user can see all his bookings and cancel the booking he wants.
  • the app saves the user name and booking list in the browser so it wouldn't be lost when refreshing the page.

Used languages and tools

  • Vue.js Framework with Vite as build tool
  • Typescript
  • Pinia
  • Vue Router
  • Sass
  • Vue Material Design Icons
  • Autoprefixer

This template should help get you started developing with Vue 3 in Vite.

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Lint with ESLint

npm run lint

About

A web app for hotels reservations using Vue.js Framework and Vite as a build tool.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published