A compact, responsive web app to search Ticketmaster events, view event details with seatmaps, and explore venue information. Built with Flask (backend) and vanilla HTML/CSS/JavaScript (frontend). Deployed on Google App Engine Standard.
- Search events by keyword, category, distance, and location
- Auto‑detect location with browser geolocation (30‑minute cache)
- Manual address geocoding via secure backend proxy (/geocode)
- Results table with sorting (Event, Genre, Venue)
- Event details card with ticket status badges and validated seatmap image
- Venue details card with dynamic layout (logo + more events), maps link
- Clean error handling + tooltips for validation feedback
- Backend: Flask, requests, flask-cors, gunicorn
- Frontend: HTML5, CSS (Grid/Flexbox), Vanilla JS
- Deploy: Google App Engine (Standard)
main.py— Flask app, API proxies (/search,/event-details/<id>,/venue-details,/geocode)templates/events.html— main page templatestatic/—style.css,script.js,geohash.js, assetsapp.yaml— App Engine config (runtime, handlers, env)requirements.txt— Python dependencies
Configure the following variables for the backend to access external APIs:
TICKETMASTER_API_KEY(required)GOOGLE_API_KEY(required for manual address geocoding)IPINFO_API_KEY(optional; not used if browser geolocation is available)
Create a .env file in the project root:
TICKETMASTER_API_KEY=your-ticketmaster-key
GOOGLE_API_KEY=your-google-key
IPINFO_API_KEY=optional
Note: .env is ignored by Git and gcloud.
- Create and activate a virtual env (Windows CMD):
python -m venv venv
venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Start the server:
python main.py
- Open the app at http://127.0.0.1:5000/
- Ensure
gcloudis installed and you’re logged in. - Verify
app.yaml:
runtime: python312
service: default
entrypoint: gunicorn -b :$PORT main:app
handlers:
- url: /static
static_dir: static
- url: /.*
script: auto
env_variables:
FLASK_ENV: production
TICKETMASTER_API_KEY: "<set in console or here>"
GOOGLE_API_KEY: "<set in console or here>"
IPINFO_API_KEY: ""
- Deploy:
gcloud app deploy app.yaml
- Open:
gcloud app browse
- This repo includes
app.yaml.examplewith safe placeholders. - Copy it to
app.yamland fill in your real API keys before deploying:TICKETMASTER_API_KEYGOOGLE_API_KEYIPINFO_API_KEY(optional)
app.yamlis listed in.gitignore, so your real keys won’t be committed by accident.
- The frontend never exposes the Google key; it calls
/geocodeon the backend. - Keep real keys in
.env(local) orenv_variables(App Engine). Consider using Secret Manager for production.
- CORS errors: Ensure you access the app through Flask or the deployed domain (not from file://).
- 500 "TICKETMASTER_API_KEY is not set": Check your
.envlocally orenv_variablesin App Engine. - Geohash errors: Ensure
static/geohash.jsis loaded inevents.html. - Seatmap not showing: The code validates image before rendering; some events don’t have a seatmap.
MIT (for coursework; verify class guidelines if submission requires restrictions).