OpenLake / OpenLake/Student_Database_COSA
[FOSSOVERFLOW-25] feat: Implement Room Dropdown Using Dedicated Rooms Table
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 58
- Avg merge
- 20h 27m
- Merged PRs (30d)
- 3
Description
Description
Currently, room names are entered manually while booking, which can lead to inconsistencies and errors.
We need to introduce a dedicated rooms table/collection and use it to populate a dropdown in the booking UI.
Proposed Database Schema
Create a new table/collection:
Room {
room_id: String,
location: String,
allowed_roles: [String]
}
Example
{
"room_id": "SCITECH_101",
"location": "SciTech Building, Floor 1",
"allowed_roles": [
"scitech_core",
"scitech_coordinator",
"gensec_scitech"
]
}
- By default,
allowed_roles = ["all"] - Restricted rooms (e.g., SciTech rooms) will have limited access
Backend Requirements
- Create Room model/schema
- CRUD APIs for rooms (admin only)
- API to fetch available rooms based on user role
- Validate room access during booking
Frontend Requirements
- Replace text input with dropdown
- Fetch rooms from backend
- Show only rooms user is allowed to book
- Disable/Hide unauthorized rooms
Authorization Rules
-
Backend must verify:
- User role ∈ room.allowed_roles
-
Prevent bypass via API calls
Acceptance Criteria
- Rooms stored in dedicated DB collection
- Dropdown replaces manual input
- Role-based filtering works
- Unauthorized bookings are blocked
- Admins can manage rooms
Contributor guide
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.
Research direction
No files, tests, or entry points are named. Start by tracing the existing booking UI, booking API, and data model, then map where room selection, persistence, and authorization currently occur; done means the dedicated room records, role-filtered dropdown, booking validation, and admin management satisfy every listed acceptance criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js, react
- Domain
- authorization, backend, databases, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100