A web application for automating piano room reservations at the Central Conservatory of Music (CCOM).
- Automated Reservations: System automatically books rooms at 21:30 every day for the next day
- Weekly Recurring Reservations: Set up reservations that repeat every week on specific days
- One-time Reservations: Book rooms for specific dates or cancel existing reservations
- Push Notifications: Receive alerts when your reservations are confirmed or if there are issues
- Room Browser: View all available practice rooms with detailed information
- Admin Interface: Manage users, rooms, and system settings
- Python 3.8+
- Flask and dependencies (see requirements.txt)
- SQLite (default) or other database supported by SQLAlchemy
-
Clone the repository:
git clone https://github.com/Colorfulshadow/CCOM_Piano cd CCOM_Piano
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Initialize the database:
flask init-db
-
Create an admin user:
flask create-admin admin yourpassword
-
Run the application:
flask run
The application is configured through the config.py
file. Main configuration options:
MAX_DAILY_RESERVATIONS
: Maximum number of reservations per user per day (default: 2)MAX_RESERVATION_HOURS
: Maximum duration for a single reservation in hours (default: 3)RESERVATION_OPEN_TIME
: Time when CCOM opens reservations for the next day (default: "2130")NOTIFICATION_ENABLED
: Whether push notifications are enabled (default: True)
- Login: Sign in with your CCOM student ID and password
- Setup Recurring Reservations: Create weekly recurring reservations for your regular practice schedule
- Make One-time Reservations: Book rooms for specific dates or cancel existing reservations
- Configure Notifications: Add a push notification key in your profile to receive alerts
- User Management: Create, edit, and deactivate user accounts
- Room Management: Import and update room information
- System Settings: Configure system parameters and run maintenance tasks
- Reservation History: View and analyze all reservation activity
To import practice rooms from CCOM:
- Log in to your CCOM account
- Run the
update_nameid.py
script to generatedevices_data.csv
- Log in to the admin interface and navigate to Room Management > Import Rooms
- Upload the generated CSV file
ccom-piano-reservation/
├── app/
│ ├── __init__.py # Flask app initialization
│ ├── models/ # Database models
│ ├── routes/ # API endpoints and view functions
│ ├── services/ # Business logic
│ ├── tasks/ # Scheduled tasks
│ ├── templates/ # HTML templates
│ ├── static/ # CSS, JS, images
│ └── utils/ # Helper functions
├── config.py # Configuration settings
├── run.py # Application entry point
├── requirements.txt # Dependencies
└── README.md # Documentation
For development, run the application with debug mode enabled:
flask run --debug
The application provides several CLI commands:
flask init-db
: Initialize the databaseflask create-admin <username> <password>
: Create an admin userflask import-rooms <csv_file>
: Import rooms from a CSV fileflask list-routes
: List all available routes
This project is based on the original CCOM_Piano script by [original author's name].
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.