Class Finder is a simple and interactive web application designed to help users find available classrooms based on the day and time. By leveraging a predefined JSON file with class schedules, the app ensures accurate and quick results.
- Easy to Use: Select a day and time to instantly check room availability.
- Dynamic Updates: Fetches schedules from a JSON file for real-time checks.
- Predefined Room List: Compares schedules against a list of all rooms.
- Error Handling: Provides clear feedback when rooms are unavailable or if an error occurs.
- Responsive Design: Ensures compatibility with various devices and screen sizes.
(Add a live link if hosted, e.g., GitHub Pages or Vercel.)
Live Demo
Follow these steps to run the project locally:
-
Clone the Repository:
git clone https://github.com/Hasanul-Banna-Himel/class-finder.git cd class-finder
-
Prepare the JSON File:
- Ensure you have a
output.json
file containing the schedule in the following format:[ { "classDay1": "Sunday", "classDay2": "Tuesday", "classTime": "09:30 AM-10:50 AM", "roomNumber": "08F-20C" }, { "classDay1": "Monday", "classDay2": "Wednesday", "classTime": "11:00 AM-12:20 PM", "roomNumber": "07A-07C" } ]
- Place the
output.json
file in the root directory.
- Ensure you have a
-
Run Locally:
- Open the
index.html
file in your browser. - To handle fetch requests locally, serve the project using a local server:
Open
# Using Python (Python 3.x required) python -m http.server
http://localhost:8000
in your browser.
- Open the
- Select a Day and Time from the dropdown menus.
- Click the Check Available Rooms button.
- View the results:
- If rooms are available, they will be listed.
- If no rooms are available, an appropriate message will be displayed.
class-finder/ │ ├── index.html # Main HTML file ├── styles.css # Styling for the app ├── script.js # Core JavaScript functionality ├── output.json # Sample schedule data ├── README.md # Project documentation
- HTML5: For structuring the web application.
- CSS3: For styling and layout design.
- JavaScript (ES6): For dynamic functionality and interaction.
- JSON: To store and fetch the class schedule data.
- Search Feature: Allow users to search for specific rooms.
- Room Booking: Add functionality to reserve available rooms.
- Real-Time Backend: Integrate a backend to manage real-time room availability.
- Enhanced Mobile Compatibility: Further optimize the interface for mobile devices.
The output.json
file should follow this structure:
[
{
"classDay1": "Sunday",
"classDay2": "Tuesday",
"classTime": "09:30 AM-10:50 AM",
"roomNumber": "08F-20C"
},
{
"classDay1": "Monday",
"classDay2": "Wednesday",
"classTime": "11:00 AM-12:20 PM",
"roomNumber": "07A-07C"
}
]
Contributions are welcome! Follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Added a new feature"
- Push to your branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Hasanul Banna Himel
- GitHub: Hasanul-Banna-Himel
- Email: ([email protected])