manishkumar8312 / manishkumar8312/QuickStay
Feat: Complete and Integrate the 'Register Your Hotel' Feature
@Soumashree-Das is already working on this.
Since Jul 30, 2025.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.