An open API service indexing awesome lists of open source software.

https://github.com/khushal-ag/sealog

This Hotel Management Application provides a comprehensive set of features for hotel employees to efficiently manage cabins, bookings, and guest information.
https://github.com/khushal-ag/sealog

css full-stack hotel-management-system reactjs supabase

Last synced: 6 months ago
JSON representation

This Hotel Management Application provides a comprehensive set of features for hotel employees to efficiently manage cabins, bookings, and guest information.

Awesome Lists containing this project

README

          



![][views] ![][stars] ![][forks] ![][issues] ![][license] ![][repo-size]




sealog


### 🏨 Sealog is an internal hotel management website built with React18, Supabase, JavaScript, Styled-components and many other technologies. It allows employees to manage everything about hotel bookings, cabins, and guests

## βš™οΈDependencies Used

---

**[ 
**@supabase/supabase-js** ^2.32.0
 
][supabase]**Β Β 
**[ 
**@tanstack/react-query** ^4.33.0
 
][query]**Β Β 
**[ 
**react-hook-form:** ^7.45.4
 
][form]**Β Β 
**[ 
**styled-components** ^6.0.7
 
][styled]**Β Β 
**[ 
**recharts** ^2.8.0
 
][recharts]**Β Β 
**[ 
**react-router-dom:** ^6.15.0
 
][router]**Β Β 
**[ 
**vitejs:** ^4.4.5
 
][vite]**Β Β 
**[ 
**eslint:** ^8.45.0
 
][eslint]**Β Β 
**[ 
**prettier:** ^3.0.1
 
][prettier]**Β 

## πŸ“Έ Screen Shots


| **Dashboard(Dark)** | **Dashboard(Light)** |
| ------------------------------------------------------------------- | -------------------------------------------------------------------- |
| ![Dark Dashboard](https://graph.org/file/f0fb9bda3028e123d7c2d.png) | ![Light Dashboard](https://graph.org/file/e5694c0ea9e32a24b3e4f.png) |

| **Booking List** | **Cabin List** |
| ----------------------------------------------------------------- | --------------------------------------------------------------- |
| ![Booking List](https://graph.org/file/ffc49b74b5e4aef2c4871.png) | ![Cabin List](https://graph.org/file/6ae0e599fcaed0ea35de5.png) |

| **New User** | **Edit Settings** |
| ------------------------------------------------------------- | ------------------------------------------------------------------ |
| ![New User](https://graph.org/file/4d733a4d98872bb046eff.png) | ![Edit Settings](https://graph.org/file/6983cd53a08be4188c3fb.png) |

| **Booking Detail** | **Check-in** |
| ------------------------------------------------------------------- | ------------------------------------------------------------- |
| ![Booking Detail](https://graph.org/file/915a4e255d0e4b28cf13a.png) | ![Check-in](https://graph.org/file/3cd24ed73666bb05245a5.png) |

| **Edit Account** | **Log in** |
| ----------------------------------------------------------------- | ----------------------------------------------------------- |
| ![Edit Account](https://graph.org/file/0302343b2c23b254bb79b.png) | ![Log in](https://graph.org/file/408a358f5c5aeeba9f914.png) |



## πŸ‘€ Overview

This Hotel Management Application provides a comprehensive set of features for hotel employees to efficiently manage cabins, bookings, and guest information. It ensures secure user authentication and profile management while offering an intuitive user interface. The app also includes a dashboard with key insights and customizable application-wide settings, including support for dark mode.

## πŸš€ Features

### πŸ”Ή User Authentication and Signup

- Hotel employees can log in to the application to perform tasks.
- New users can only be signed up within the application to ensure that only actual hotel employees can create accounts.

### πŸ”Ή User Profile Management

- Users can upload an avatar to personalize their profile.
- Users can change their name and password.

### πŸ”Ή Cabin Management

- The app provides a table view with all cabins.
- Displays cabin information, including cabin photo, name, capacity, price, and current discount.
- Users can update or delete existing cabins.
- Users can create new cabins, including the ability to upload a photo.

### πŸ”Ή Booking Management

- The app provides a table view with all bookings.
- Displays booking information, including arrival and departure dates, booking status, paid amount, cabin details, and guest data.
- Booking status can be "unconfirmed," "checked in," or "checked out."
- The table view is filterable by booking status.
- Additional booking data includes the number of guests, number of nights, guest observations, and whether breakfast was booked and its price.

### πŸ”Ή Booking Operations

- Users can delete, check in, or check out a booking as the guest arrives.
- On check-in, users can accept payment outside the app and then confirm the payment within the app.
- Guests can add breakfast for the entire stay during check-in if they haven't already.

### πŸ”Ή Guest Data Management

- Guest data contains full name, email, national ID, nationality, and a country flag for easy identification.

### πŸ”Ή Dashboard

- The initial app screen serves as a dashboard displaying important information for the last 7, 30, or 90 days.
- Shows a list of guests checking in and out on the current day, and users can perform tasks related to these activities from the dashboard.
- Provides statistics on recent bookings, sales, check-ins, and occupancy rates.
- Includes a chart showing all daily hotel sales, distinguishing between "total" sales and "extras" sales (only breakfast at present).
- Displays statistics on stay durations, an important metric for the hotel.

### πŸ”Ή Application-wide Settings

- Users can define application-wide settings such as breakfast price, minimum and maximum nights per booking, and maximum guests per booking.

### 🌚 Dark Mode

- The app includes a dark mode option for a different visual appearance and enhanced user experience in low-light conditions.

## πŸ“ Usage

To use this application, follow the installation instructions in the provided documentation. Make sure to set up user accounts and configure application-wide settings as needed.

## πŸ› οΈ Getting Started

⬇️ **Fetch latest source code from master branch.**

```bash
git clone https://github.com/Khushal-ag/sealog.git

cd sealog
```

🚧 **Create `.env.local` file & add your own `SUPABASE_CONFIGS` as mentioned in `.env.example` file.**

```bash
VITE_SUPABASE_KEY =

VITE_SUPABASE_URL =
```

πŸ’» **Run the Website with πŸ†šCode `or` Command Line: ( _pnpm_ must be installed )**

```bash
pnpm i

pnpm dev
```

πŸ§ͺ **Testing Credentials**

```bash
Email: test@test.com
Password: testtest
```

## πŸ“‚ Directory Structure

```bash
.
β”œβ”€β”€ .env.example
β”œβ”€β”€ .eslintrc.js
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .prettierrc.cjs
β”œβ”€β”€ index.html
β”œβ”€β”€ CODE_OF_CONDUCT.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json
β”œβ”€β”€ pnpm-lock.yaml
β”œβ”€β”€ prettier.config.cjs
β”œβ”€β”€ public
β”‚ β”œβ”€β”€ default-user.jpg
β”‚ β”œβ”€β”€ sealog-favicon.png
β”‚ β”œβ”€β”€ sealog-logo-dark.png
β”‚ └── sealog-logo-light.png
β”œβ”€β”€ README.md
β”œβ”€β”€ src
β”‚ β”œβ”€β”€ App.jsx
β”‚ β”œβ”€β”€ context
β”‚ β”‚ β”œβ”€β”€ DarkModeContext.jsx
β”‚ β”‚ └── useDarkMode.js
β”‚ β”œβ”€β”€ features
β”‚ β”‚ β”œβ”€β”€ authentication
β”‚ β”‚ β”‚ β”œβ”€β”€ LoginForm.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ Logout.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ SignupForm.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ UpdatePasswordForm.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ UpdateUserDataForm.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ useLogin.js
β”‚ β”‚ β”‚ β”œβ”€β”€ useLogout.js
β”‚ β”‚ β”‚ β”œβ”€β”€ UserAvatar.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ useSignup.js
β”‚ β”‚ β”‚ β”œβ”€β”€ useUpdateUser.js
β”‚ β”‚ β”‚ └── useUser.js
β”‚ β”‚ β”œβ”€β”€ bookings
β”‚ β”‚ β”‚ β”œβ”€β”€ BookingDataBox.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ BookingDetail.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ BookingRow.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ BookingTable.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ BookingTableOperations.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ useBooking.js
β”‚ β”‚ β”‚ β”œβ”€β”€ useBookings.js
β”‚ β”‚ β”‚ └── useDeleteBooking.js
β”‚ β”‚ β”œβ”€β”€ cabins
β”‚ β”‚ β”‚ β”œβ”€β”€ AddCabin.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ CabinRow.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ CabinTable.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ CabinTableOperations.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ CreateCabinForm.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ useCabins.js
β”‚ β”‚ β”‚ β”œβ”€β”€ useCreateCabin.js
β”‚ β”‚ β”‚ β”œβ”€β”€ useDeleteCabin.js
β”‚ β”‚ β”‚ └── useEditCabin.js
β”‚ β”‚ β”œβ”€β”€ check-in-out
β”‚ β”‚ β”‚ β”œβ”€β”€ CheckinBooking.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ CheckoutButton.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ TodayActivity.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ TodayItem.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ useCheckin.js
β”‚ β”‚ β”‚ β”œβ”€β”€ useCheckout.js
β”‚ β”‚ β”‚ └── useTodayActivity.js
β”‚ β”‚ β”œβ”€β”€ dashboard
β”‚ β”‚ β”‚ β”œβ”€β”€ DashboardBox.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ DashboardFilter.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ DashboardLayout.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ DurationChart.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ SalesChart.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ Stat.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ Stats.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ useRecentBookings.js
β”‚ β”‚ β”‚ └── useRecentStays.js
β”‚ β”‚ └── settings
β”‚ β”‚ β”œβ”€β”€ UpdateSettingsForm.jsx
β”‚ β”‚ β”œβ”€β”€ useSetting.js
β”‚ β”‚ └── useUpdateSetting.js
β”‚ β”œβ”€β”€ hooks
β”‚ β”‚ β”œβ”€β”€ useLocalStorageState.js
β”‚ β”‚ β”œβ”€β”€ useMoveBack.js
β”‚ β”‚ └── useOutsideClick.js
β”‚ β”œβ”€β”€ main.jsx
β”‚ β”œβ”€β”€ pages
β”‚ β”‚ β”œβ”€β”€ Account.jsx
β”‚ β”‚ β”œβ”€β”€ Booking.jsx
β”‚ β”‚ β”œβ”€β”€ Bookings.jsx
β”‚ β”‚ β”œβ”€β”€ Cabins.jsx
β”‚ β”‚ β”œβ”€β”€ Checkin.jsx
β”‚ β”‚ β”œβ”€β”€ Dashboard.jsx
β”‚ β”‚ β”œβ”€β”€ Login.jsx
β”‚ β”‚ β”œβ”€β”€ PageNotFound.jsx
β”‚ β”‚ β”œβ”€β”€ Settings.jsx
β”‚ β”‚ └── Users.jsx
β”‚ β”œβ”€β”€ services
β”‚ β”‚ β”œβ”€β”€ apiAuth.js
β”‚ β”‚ β”œβ”€β”€ apiBookings.js
β”‚ β”‚ β”œβ”€β”€ apiCabins.js
β”‚ β”‚ β”œβ”€β”€ apiSettings.js
β”‚ β”‚ └── supabase.js
β”‚ β”œβ”€β”€ styles
β”‚ β”‚ └── GlobalStyles.js
β”‚ β”œβ”€β”€ ui
β”‚ β”‚ β”œβ”€β”€ AppLayout.jsx
β”‚ β”‚ β”œβ”€β”€ ButtonGroup.jsx
β”‚ β”‚ β”œβ”€β”€ ButtonIcon.jsx
β”‚ β”‚ β”œβ”€β”€ Button.jsx
β”‚ β”‚ β”œβ”€β”€ ButtonText.jsx
β”‚ β”‚ β”œβ”€β”€ Checkbox.jsx
β”‚ β”‚ β”œβ”€β”€ ConfirmDelete.jsx
β”‚ β”‚ β”œβ”€β”€ DarkModeToggle.jsx
β”‚ β”‚ β”œβ”€β”€ DataItem.jsx
β”‚ β”‚ β”œβ”€β”€ Empty.jsx
β”‚ β”‚ β”œβ”€β”€ ErrorFallback.jsx
β”‚ β”‚ β”œβ”€β”€ FileInput.jsx
β”‚ β”‚ β”œβ”€β”€ Filter.jsx
β”‚ β”‚ β”œβ”€β”€ Flag.jsx
β”‚ β”‚ β”œβ”€β”€ Form.jsx
β”‚ β”‚ β”œβ”€β”€ FormRow.jsx
β”‚ β”‚ β”œβ”€β”€ FormRowVertical.jsx
β”‚ β”‚ β”œβ”€β”€ Header.jsx
β”‚ β”‚ β”œβ”€β”€ HeaderMenu.jsx
β”‚ β”‚ β”œβ”€β”€ Heading.jsx
β”‚ β”‚ β”œβ”€β”€ Input.jsx
β”‚ β”‚ β”œβ”€β”€ Logo.jsx
β”‚ β”‚ β”œβ”€β”€ MainNav.jsx
β”‚ β”‚ β”œβ”€β”€ Menus.jsx
β”‚ β”‚ β”œβ”€β”€ Modal.jsx
β”‚ β”‚ β”œβ”€β”€ Pagination.jsx
β”‚ β”‚ β”œβ”€β”€ ProtectedRoute.jsx
β”‚ β”‚ β”œβ”€β”€ Row.jsx
β”‚ β”‚ β”œβ”€β”€ Select.jsx
β”‚ β”‚ β”œβ”€β”€ Sidebar.jsx
β”‚ β”‚ β”œβ”€β”€ SortBy.jsx
β”‚ β”‚ β”œβ”€β”€ Spinner.jsx
β”‚ β”‚ β”œβ”€β”€ SpinnerMini.jsx
β”‚ β”‚ β”œβ”€β”€ Table.jsx
β”‚ β”‚ β”œβ”€β”€ TableOperations.jsx
β”‚ β”‚ β”œβ”€β”€ Tag.jsx
β”‚ β”‚ └── Textarea.jsx
β”‚ └── utils
β”‚ β”œβ”€β”€ constants.js
β”‚ └── helpers.js
└── vite.config.js

```

## πŸƒ Supabase Table Schemas

Here are the schemas for the tables used in sealog, as stored in Supabase:

### πŸ“Š Cabins Table

The `cabins` table stores information about the cabins available in the hotel.

| Field Name | Data Type | Description |
| ------------ | ----------------------- | ------------------------- |
| id | Bigint (Generated) | Unique identifier |
| created_at | Timestamp with Timezone | Timestamp of creation |
| name | Text (Nullable) | Cabin name |
| maxCapacity | Smallint (Nullable) | Maximum guest capacity |
| regularPrice | Smallint (Nullable) | Regular price per night |
| discount | Smallint (Nullable) | Current discount (if any) |
| description | Text (Nullable) | Description of the cabin |
| image | Text (Nullable) | URL of cabin photo |

The `cabins` table is used to store information about the cabins available within the Sealog.

### πŸ“Š Bookings Table

The `bookings` table records information about guest bookings.

| Field Name | Data Type | Description |
| ------------ | -------------------------- | -------------------------------------------------------------------------- |
| id | Bigint (Generated) | Unique identifier |
| created_at | Timestamp with Timezone | Timestamp of creation |
| startDate | Timestamp without Timezone | Start date of the booking |
| endDate | Timestamp without Timezone | End date of the booking |
| numNights | Smallint (Nullable) | Number of nights for the booking |
| numGuests | Smallint (Nullable) | Number of guests in the booking |
| cabinPrice | Real (Nullable) | Price of the cabin |
| extrasPrice | Real (Nullable) | Price of additional extras (if any) |
| totalPrice | Real (Nullable) | Total price of the booking |
| status | Text (Nullable) | Booking status (e.g., unconfirmed, checked in, checked out) |
| hasBreakfast | Boolean (Nullable) | Indicates if breakfast is included |
| isPaid | Boolean (Nullable) | Indicates if the booking is paid |
| observations | Text (Nullable) | Additional observations or notes |
| cabinId | Bigint (Nullable) | ID of the booked cabin (foreign key reference to cabins table) |
| guestId | Bigint (Nullable) | ID of the guest making the booking (foreign key reference to guests table) |

The `bookings` table is used to manage guest bookings within the Sealog.

### πŸ“Š Guests Table

The `guests` table stores information about hotel guests.

| Field Name | Data Type | Description |
| ----------- | ----------------------- | ------------------------ |
| id | Bigint (Generated) | Unique identifier |
| created_at | Timestamp with Timezone | Timestamp of creation |
| fullName | Text (Nullable) | Full name of the guest |
| email | Text (Nullable) | Guest's email address |
| nationalID | Text (Nullable) | National ID of the guest |
| nationality | Text (Nullable) | Nationality of the guest |
| countryFlag | Text (Nullable) | URL of the country flag |

The `guests` table is used to store guest information within the Sealog.

### πŸ“Š Settings Table

The `settings` table stores application-wide settings for the Sealog.

| Field Name | Data Type | Description |
| ------------------ | ----------------------- | -------------------------------------------- |
| id | Bigint (Generated) | Unique identifier |
| created_at | Timestamp with Timezone | Timestamp of creation |
| minBookingLength | Smallint (Nullable) | Minimum length of a booking in nights |
| maxBookingLength | Smallint (Nullable) | Maximum length of a booking in nights |
| maxGuestPerBooking | Smallint (Nullable) | Maximum number of guests allowed per booking |
| breakfastPrice | Real (Nullable) | Price of breakfast per guest (if applicable) |

The `settings` table is used to configure application-wide settings within the Sealog.

These tables are used to manage cabins, bookings, user accounts and hotel settings within the Sealog.

## πŸ“œ License

This Hotel Management Application is available under the [GNU General Public License (GPL)](LICENSE).

## πŸ‘€ Author

This application was developed by [Khushal-ag](https://github.com/Khushal-ag).

## πŸ“¬ Feedback and Support

- For feedback or support, please contact [starkhush5@gmail.com](starkhush5@gmail.com).
- Remember to **⭐️ Star this project on GitHub** to show your support.

## ☒️ Contributors

[![][contributors]][contributors-graph]

_Note: It may take up to 24h for the [contrib.rocks][contrib-rocks] plugin to update because it's refreshed once a day._



[views]: https://komarev.com/ghpvc/?username=sealog&label=view%20counter&color=red&style=flat
[repo-size]: https://img.shields.io/github/repo-size/Khushal-ag/sealog
[issues]: https://img.shields.io/github/issues-raw/Khushal-ag/sealog
[license]: https://img.shields.io/github/license/Khushal-ag/sealog
[forks]: https://img.shields.io/github/forks/Khushal-ag/sealog?style=flat
[stars]: https://img.shields.io/github/stars/Khushal-ag/sealog
[contributors]: https://contrib.rocks/image?repo=Khushal-ag/sealog&max=500
[contributors-graph]: https://github.com/Khushal-ag/sealog/graphs/contributors
[contrib-rocks]: https://contrib.rocks/preview?repo=Khushal-ag%2Fsealog

[supabase]: https://supabase.com/docs
[query]: https://tanstack.com/query/latest/
[form]: https://react-hook-form.com/
[styled]: https://styled-components.com/
[recharts]: https://recharts.org/en-US/
[router]: https://reactrouter.com/en/main/start/overview
[eslint]: https://eslint.org/
[prettier]: https://prettier.io/
[vite]: https://vitejs.dev/