manishkumar8312 / manishkumar8312/QuickStay

Feat: Complete and Integrate the 'Register Your Hotel' Feature

Open
#17 4 comments 0 reactions 1 assignee View on GitHub

@Soumashree-Das is already working on this.

Since Jul 30, 2025.

gssoc 25 label 1
Dominant language
JavaScript
Stars
20
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Hey @manishkumar8312

### Description
The codebase contains an incomplete component, ``, which is currently unused and set to `{false && }` in `App.jsx`. This component provides the UI for a hotel owner to register a new hotel but lacks the necessary backend logic and integration.

This feature is a core part of the "Admin Functionality" mentioned in the `README` ("Add new hotel listings").

### Proposed Plan to Complete the Feature

1. **Create a Backend Endpoint:**
- Design a `Hotel` model in Mongoose.
- Create a new API endpoint on the server, e.g., `POST /api/hotels`.
- This endpoint must be a **protected route** that only users with the `'hotelOwner'` role can access. It will receive hotel data from the form and save it to the database.

2. **Activate the Frontend Component:**
- Wire up the `` form's `onSubmit` handler to make an authenticated `axios` POST request to the new `/api/hotels` endpoint.
- Implement state management for loading and error states during form submission.
- Provide user feedback upon success (e.g., "Hotel registered successfully!") or failure using a toast notification system.

3. **Integrate into the UI:**
- Add a "Register Hotel" button to the Owner Dashboard (`/owner`) that opens the `` component as a modal.

Completing this feature is a major step towards fulfilling the project's core promise for hotel owners. I am prepared to work on both the frontend and backend parts of this task.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.