A web application designed to help NTUST (National Taiwan University of Science and Technology) students and faculty find available classrooms on campus. This tool crawls classroom schedules and provides an interface to search for empty rooms by building, date, or specific criteria.
- Building-based Search: Find empty rooms in specific buildings (T4, T3, E1, E2, EE, MA, TR, IB)
- Date-based Search: Search for available rooms on specific weekdays
- Room-specific Search: Check the schedule for a particular room
- Time Slot Filtering: Filter results by specific time periods (1-14 time slots)
- Responsive Design: Works seamlessly on desktop and mobile devices
- Real-time Data: Automated weekly data updates via web crawling
- Vue 3
- Vite
- Tailwind CSS
- Vue Router
- Node.js
- Express.js
- MongoDB
- Mongoose
- GitHub Actions - Update data weekly
- Selenium - Web crawling automation
- Node.js (v16 or higher)
- MongoDB instance
- Git
-
Clone the repository
git clone https://github.com/Evian-Chen/NTUST-Empty-Classroom.git
-
Install dependencies
# Install root dependencies npm install # Install backend dependencies cd backend/app npm install # Install frontend dependencies cd ../../frontend npm install
-
Environment Configuration
Create
.envfile in the backend directory:PORT=3000 MONGO_URI=your_mongodb_connection_string SCHOOL_START_DAY=2024-09-01 SCHOOL_END_DAY=2025-06-30
Create
.envfile in the frontend directory:VITE_API_BASE=/api
-
Start the application
Development mode:
# Terminal 1 - Start backend cd backend/app npm start # Terminal 2 - Start frontend cd frontend npm run dev
-
Access the application
- Development:
http://localhost:5173 - Production:
http://localhost:3000
- Development:
-
Building + Date Search
- Select a building from the dropdown
- Choose a weekday
- Optionally specify time slots
- Click "Search" to find available rooms
-
Weekday Search
- Select a specific weekday
- Optionally filter by time slots
- View all available rooms across campus
-
Room-specific Search
- Enter a room code (e.g., "TR-312")
- Select a weekday
- View the room's schedule
The system includes an automated web crawler that runs weekly to update classroom schedules:
- Schedule: Every Saturday at 9:00 AM (Taiwan time)
- Source: NTUST official classroom system
- Technology: Selenium WebDriver with headless Chrome
- Coverage: 8 campus buildings with 5 weekdays each
cd backend
python3 crawler.py- Connect your GitHub repository to Vercel
- Set root directory to
frontend - Configure build settings:
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Build Command:
- Set environment variables:
VITE_API_BASE: Your backend API URL
- Deploy the
backend/appdirectory - Set environment variables:
MONGO_URI: MongoDB connection stringPORT: Application port (usually auto-assigned)SCHOOL_START_DAY&SCHOOL_END_DAY: Academic year dates
This project is licensed under the MIT License - see the LICENSE file for details.