A simple CLI application for managing office room reservations with email and SMS notifications.
Linux/macOS:
git clone https://github.com/DayDang/room-booking
cd room-booking
./setup.sh
Windows:
git clone https://github.com/DayDang/room-booking
cd room-booking
setup.bat
git clone https://github.com/DayDang/room-booking
cd room-booking
# Build and run with Docker
docker build -t room-booking .
docker run --rm room-booking
git clone https://github.com/DayDang/room-booking
cd room-booking
pip install uv
uv sync
uv run python main.py --help
Quick Demo:
./demo.sh # Linux/macOS
demo.bat # Windows
Interactive Mode (Recommended):
# Start interactive mode - keeps running until you type 'quit'
uv run python main.py --interactive
# Once in interactive mode, just type commands without 'uv run python main.py'
📋 booking> check --room 1 --from "today 14:00" --to "today 16:00"
📋 booking> book --room 1 --from "today 15:00" --to "today 16:00" --name "John Doe"
📋 booking> list --date today
📋 booking> quit
Single Commands:
# Check room availability
uv run python main.py check --room 1 --from "today 14:00" --to "today 16:00"
# Book a room
uv run python main.py book --room 1 --from "today 14:00" --to "today 16:00" \
--name "John Doe" --email "[email protected]"
# View schedule
uv run python main.py list --date today
# Cancel booking
uv run python main.py cancel --booking-id 1 --name "John Doe"
- ✅ 5 Office Rooms - Book any of rooms 1-5
- ⚡ Conflict Detection - Prevents double bookings
- 📧 Email Notifications - Automatic confirmations
- 📱 SMS Support - Mock implementation included
- 🗄️ SQLite Database - Reliable data persistence
- 🕒 Business Hours - Enforces 8 AM - 6 PM, Monday-Friday
- ⏱️ Duration Limits - 15 minutes minimum, 8 hours maximum
Create a .env
file for email notifications:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=your-app-password
[email protected]
Command | Description | Example |
---|---|---|
--interactive |
Interactive mode | Keeps CLI running until you quit |
check |
Check room availability | --room 1 --from "today 14:00" --to "today 16:00" |
book |
Book a room | --room 1 --from "today 14:00" --to "today 16:00" --name "John" --email "[email protected]" |
list |
View schedules | --date today or --room 1 |
cancel |
Cancel booking | --booking-id 123 --name "John Doe" |
status |
System overview | Shows all rooms and stats |
"today 14:00"
,"tomorrow 09:00"
,"2024-12-20 14:30"
,"14:30"
- Rooms: 1-5
- Hours: 8 AM - 6 PM (Monday-Friday)
- Duration: 15 minutes - 8 hours
# Build the image
docker build -t room-booking .
# Quick test
docker run --rm room-booking
# Interactive booking mode (recommended)
docker run --rm -it room-booking uv run python main.py --interactive
# Interactive shell mode (for debugging)
docker run --rm -it room-booking /bin/bash
# Custom commands
docker run --rm room-booking uv run python main.py list
# With persistent data
docker run --rm -v $(pwd)/data:/app/data room-booking
MIT License - see LICENSE file
Need help? Run: uv run python main.py --help