Giter Site home page Giter Site logo

htoann / hotel-booking Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 10.0 3.75 MB

Hotel booking website using NextJS and NodeJS

Home Page: https://bookingroom.tech

License: MIT License

JavaScript 15.32% TypeScript 83.97% CSS 0.71%
booking booking-hotel nextjs nodejs hotel-booking react

hotel-booking's Introduction

โœˆ Hotel Booking ๐Ÿจ

Find your next stay

Search deals on hotels, homes, and much more...

Clone or download

$ git clone https://github.com/htoann/Booking-Hotel.git
$ yarn # or npm i

Project structure

LICENSE
package.json
server/
   package.json
   .env (to create .env, check [prepare your secret session])
client/
   package.json
...

Usage

Notice, you need client and server runs concurrently in different terminal session, in order to make them talk to each other

Client side usage (PORT: 3000)

$ cd client
$ yarn # or npm i
$ npm run dev
// deployment for client app
$ npm run build
$ npm run start

Server side usage (PORT: 8000)

Prepare your secret

(You need to add a JWT_SECRET in .env to connect to MongoDB)

Start

$ cd server
$ npm i
$ npm run dev
$ npm run build

Deploy Server to Railway

Environment variables

# Client .env.local file
NEXT_PUBLIC_API_URL=http://localhost:8000/api
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=

# Server .env file
JWT_SECRET = 
MONGODB_URI = 
CLOUD_NAME = 
CLOUD_API_KEY = 
CLOUD_API_SECRET = 

Standard

JavaScript Style Guide

BUGs or comments

Create new Issues (preferred)

Author

Le Cong Ly

Tran Huu Toan

hotel-booking's People

Contributors

amazingandyyy avatar amjasser avatar equimper avatar farhan787 avatar htoann avatar jsoref avatar lecongly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hotel-booking's Issues

request new routes api for userAPI

Is your feature request related to a problem? Please describe.
Client need server have api for update infomation for user.
Users can update their self information like name, email, ... see the picture below
Screen Shot 2022-11-21 at 2 57 56 PM

And users can delete their accounts
Screen Shot 2022-11-21 at 3 16 36 PM
-Change password need check old password and update oldpassword to new password

Describe the solution you'd like
Update database user more field, some field don't important default is null, user use token to call api update infomation and call api delete account

Just call api for udate or delete self

User don't can update role

Must F5 to show newest wishlist

Describe the error/difficulties:

  • Must F5 to show newest wishlist

What have you done:

  • Add setWishList

What it supports to do?

Request permission for hotel API

Is your feature request related to a problem? Please describe.
Accept role user user CREATE, DELETE Hotels API

Describe the solution you'd like
User can create and delete hotel they create

Request new route api for upload image

Is your feature request related to a problem? Please describe.
I want route api to upload image, and return link to image (https://res.cloudinary.com/)
Call API with authorization Bearer Token, body have a file image ( png, jpg, ...) like that
Screen Shot 2022-11-21 at 6 17 05 PM

Describe the solution you'd like
Need to limit logged in users who can call API to limit time to call API

Describe alternatives you've considered
You can refer my old project have api upload avatar image here
You need change some config to match we project

Don't need store reviews

We just fetch api get hotel in a hotel detail page to have reviews and view in this page
We need change to Refetch api get hotel detais after create new, edit, delete review

Use RTK Query refetch to perform feature
You can refer roomAPi to change your code (keyword: tagTypes, providesTags, invalidatesTags)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.