Automated reservation system targeting the Affluences booking platform. After deconstructing the API endpoints and reverse-engineering the booking flow, I built this tool to bypass the manual UI workflow entirely as it was so boring to use
Technical Approach: Intercepted and analyzed the booking POST requests to identify required parameters and authentication patterns. Implemented direct API interaction bypassing the web interface, combined with IMAP-based email scraping for confirmation token extraction.
Security Implementation: Machine-specific credential encryption using XOR cipher with SHA256-derived keys tied to hostname+username. All sensitive data encrypted at rest, no plaintext credentials in version control.
- Direct API booking via reverse-engineered endpoints
- Automated email confirmation harvesting (IMAP search with multilingual date parsing)
- Concurrent validation using headless Chrome instances (ThreadPoolExecutor)
- Hardware-tied credential encryption (machine-specific decryption keys)
- Persistent state management with JSON storage
- Built-in rate limiting and daemon conflict resolution
- HTTP connection pooling for faster API requests
- Persistent IMAP connections for efficient email polling
- Inbox cleanup for Affluences emails
- Python 3.8+
- Chrome browser installed
- Gmail account with App Password
- Clone the repository:
git clone https://github.com/blavkice/SureSeat.git
cd sureseat- Install dependencies:
pip install streamlit selenium webdriver-manager requests pandas- Run the app:
streamlit run app.pyEmail credentials are saved securely in .streamlit/.creds with encryption based on your system.
- Go to Google App Passwords
- Generate a new app password
- In SureSeat sidebar, enter your Gmail and App Password
- Click "Save"
Note: Credentials are encrypted and automatically loaded on app start. They are tied to your machine.
Places are automatically saved to places.json and persist across sessions.
- Open the "Add New Place" section in sidebar
- Find your Resource ID:
- Go to Affluences
- Search and book any seat/resource
- Look at the URL:
affluences.com/reservation/12345 - The number
12345is your Resource ID
- Enter a name (e.g., "Library - Desk 42")
- Enter the Resource ID
- Click "Add Place"
- Select Place: Choose from your saved places
- Set Date: Pick start date (defaults to tomorrow)
- Choose Mode:
- "Single": Book only the selected date
- "Repeat (Week)": Book for the next 7 days
- Configure Time Slots: Add multiple slots per day if needed
- Click LAUNCH: The bot will:
- Send booking requests
- Monitor your email for confirmations
- Automatically validate bookings
If you have pending reservations that need validation:
- Click "VALIDATE ONLY (Last 3h)"
- The bot will search your emails from the last 3 hours
- Automatically validates all found confirmations
- Shows success/failure report
To delete Affluences emails cluttering your inbox:
- Click "🗑️ Clean Inbox"
- Deletes all Affluences emails from the last 7 days
- Removes both confirmation requests and confirmed booking emails
To book multiple slots per day (e.g., morning + afternoon):
- Configure first slot (e.g., 09:00 - 13:00)
- Click "Add Slot"
- Configure second slot (e.g., 14:00 - 18:00)
- The bot will book both slots for each selected date
If you encounter Chrome daemon conflicts:
- The app automatically kills stale Chrome processes before starting
- If issues persist, click "Close App" in sidebar to clean up
- Check spam folder
- Ensure App Password is correct
- Verify Gmail account has IMAP enabled
- Verify Resource ID is correct
- Check if the resource is available for booking
- Ensure you're within quota limits
- Language: Supports 10 languages (English, Spanish, French, Portuguese, German, Italian, Dutch, Polish, Russian, Turkish). Configuration files:
months.csv- month names for email date parsingkeywords.csv- button labels and success messages for web scraping
- Rate Limiting: The app includes delays between requests to avoid rate limiting
- Quota: Affluences has booking quotas - respect their limits
- Email: Only works with Gmail (uses IMAP)
- Browser: Requires Chrome/Chromium installed
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use and modify
This tool is for personal use only. Please respect Affluences' terms of service and booking policies. Use responsibly and don't abuse the automation features.