Skip to content

Commit

Permalink
Merge pull request #39 from WailanTirajoh/laravel-11-upgrade
Browse files Browse the repository at this point in the history
feat(upgrade): laravel 11 & fix websockets
  • Loading branch information
WailanTirajoh authored Mar 29, 2024
2 parents 986cc21 + 3715c5d commit afccf8f
Show file tree
Hide file tree
Showing 11 changed files with 1,269 additions and 1,443 deletions.
18 changes: 11 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=12345
PUSHER_APP_KEY=ABCDE
PUSHER_APP_SECRET=FGHIJK
PUSHER_APP_CLUSTER=ap1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
REVERB_APP_ID=647499
REVERB_APP_KEY=odlepyurovw4fqojsy1f
REVERB_APP_SECRET=jba1sltzdyih5oehlwmc
REVERB_HOST="localhost"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
259 changes: 139 additions & 120 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,118 @@
# Laravel Hotel

Laravel Hotel is an open-source web application built with laravel 8.0, enchanced with laravel websockets features to have realtime notification experience.

Its now compatible with laravel 10
Its now compatible with laravel 11

## Examples
- Reservation
![alt text](https://github.com/WailanTirajoh/laravel_hotel/blob/main/example-b.png?raw=true)

- Dashboard
![alt text](https://github.com/WailanTirajoh/laravel_hotel/blob/main/example.png?raw=true)
- And more ...
- Reservation
![alt text](https://github.com/WailanTirajoh/laravel_hotel/blob/main/example-b.png?raw=true)

- Dashboard
![alt text](https://github.com/WailanTirajoh/laravel_hotel/blob/main/example.png?raw=true)
- And more ...

## Instalation
## Instalation

### Init DB
- Create DB Name: hotel_app
or via terminal

- Create DB Name: hotel_app
or via terminal

```
mysql -u root -p
```

enter your db credential

```
create database hotel_app;
exit;
```

### Init Commands:

```
cp .env.example .env // after that start filling credential at .env
composer install
npm install
npm install
npm run dev
php artisan migrate:fresh --seed
php artisan serv => Terminal 1
php artisan websockets:serv => Terminal 2 //run the websocket server for realtime notification
php artisan reverb:start => Terminal 2 //run the websocket server for realtime notification
```

### Development build

```
npm run dev
```

### Production Build

```
// run this on your terminal to generate production build
npm run build
```

### Login:
- Email: [email protected]
- Password: wailan

- Email: [email protected]
- Password: wailan

## TODO:
- Customer's Room:
- Asks for room to be cleaned
- Update room status
- Auth id must be == room->customer->id
- Send realtime notification to Admin
- Order meals
- Send realtime notification to Admin, and food

- Room Facility:
- Create
- Read
- Pagination
- Search
- Update
- Delete

- User Profile
- View
- User Activity Log
- View:
- Paginate
- see all
- User Settings
- Edit Profile
- Edit Password

- Dashboard
- Guests Chart
- Get total customer / month
- Income Chart for Super only
- Get total income / month

- Customer's Room:

- Asks for room to be cleaned
- Update room status
- Auth id must be == room->customer->id
- Send realtime notification to Admin
- Order meals
- Send realtime notification to Admin, and food

- Room Facility:

- Create
- Read
- Pagination
- Search
- Update
- Delete

- User Profile

- View
- User Activity Log
- View:
- Paginate
- see all
- User Settings
- Edit Profile
- Edit Password

- Dashboard
- Guests Chart
- Get total customer / month
- Income Chart for Super only
- Get total income / month

## Modul
- Dashboard
- Guests Chart
- Guests on this day

- Transaction
- Payment
- Create & Store Payment
- Payment History
- Room Reservation
- Step:

- Dashboard

- Guests Chart
- Guests on this day

- Transaction

- Payment
- Create & Store Payment
- Payment History
- Room Reservation
- Step:
1. Choose Customer:
- Create New Customer / Pick from existing Customer
2. Input Form:
Expand All @@ -111,78 +130,78 @@ npm run build
- Send push notification to Super Role.
- Update all dashboard view

- CUSTOMER Management
- Create Customer
- Read Customer
- Paginate
- Search
- Update Customer
- Delete Customer
- Cannot be deleted if the customer has transaction
- Customer Detail

- USER Management
- Create User
- Read User (Super, Admin)
- Paginate
- Search
- Read User (Customer)
- Paginate
- Search
- Update User
- Delete User
- Cannot be deleted if the User has transaction
- User Detail

- ROOM Management
- Create Room
- Read Room
- Paginate
- Search
- Update Room
- Delete Room
- Cannot be deleted if the Room already connected in transaction
- Room Detail

- CRUD ROOM TYPE
- Create Room Type
- Read Room Type
- Paginate
- Search
- Update Room Type
- Delete Room Type

- CRUD ROOM STATUS
- Create Room Status
- Read Room Status
- Paginate
- Search
- Update Room Status
- Delete Room Status




- CUSTOMER Management

- Create Customer
- Read Customer
- Paginate
- Search
- Update Customer
- Delete Customer
- Cannot be deleted if the customer has transaction
- Customer Detail

- USER Management

- Create User
- Read User (Super, Admin)
- Paginate
- Search
- Read User (Customer)
- Paginate
- Search
- Update User
- Delete User
- Cannot be deleted if the User has transaction
- User Detail

- ROOM Management

- Create Room
- Read Room
- Paginate
- Search
- Update Room
- Delete Room
- Cannot be deleted if the Room already connected in transaction
- Room Detail

- CRUD ROOM TYPE

- Create Room Type
- Read Room Type
- Paginate
- Search
- Update Room Type
- Delete Room Type

- CRUD ROOM STATUS
- Create Room Status
- Read Room Status
- Paginate
- Search
- Update Room Status
- Delete Room Status

## ERD

![alt text](https://github.com/WailanTirajoh/laravel_hotel/blob/main/erd.PNG?raw=true)

## Reservation Plot

- Customer Register to Admin
- Fill in customer's identity (based on KTP)
- Fill in by the Admin
- Book a room (how much people? and when?)
- Fill in by the Admin based on customers order
- rooms are recommended by the system based on the input value.
- Choose the room
- Fill in by the Admin based on customers order
- Choose based on room type, price, and facility.
- Make a down payment
- Fill in by the Admin based on minimum down payment (15% of total price)
- Stay
- Finish (Check Out) and pay the insufficient payment

- Customer Register to Admin
- Fill in customer's identity (based on KTP)
- Fill in by the Admin
- Book a room (how much people? and when?)
- Fill in by the Admin based on customers order
- rooms are recommended by the system based on the input value.
- Choose the room
- Fill in by the Admin based on customers order
- Choose based on room type, price, and facility.
- Make a down payment
- Fill in by the Admin based on minimum down payment (15% of total price)
- Stay
- Finish (Check Out) and pay the insufficient payment

## Laravel License

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
],
"license": "MIT",
"require": {
"php": "^8.1",
"beyondcode/laravel-websockets": "^1.13.1",
"php": "^8.2",
"guzzlehttp/guzzle": "^7.4.5",
"intervention/image": "^2.5",
"laravel/framework": "^10.0",
"laravel/framework": "^11.0",
"laravel/reverb": "@beta",
"laravel/tinker": "^2.5",
"pusher/pusher-php-server": "~5.0"
"pusher/pusher-php-server": "^7.2"
},
"require-dev": {
"spatie/laravel-ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3.3"
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit afccf8f

Please sign in to comment.