A Flask-based web application for managing golf trip scoring, including individual and team leaderboards, scorecards, and certificate generation. Designed for multi-day golf events with persistent data storage and containerized deployment.
- Player Management: Track players and their handicap indexes.
- Course Management: Supports multiple courses with hole-by-hole par and stroke index.
- Scorecard Input: Enter and save strokes per player per hole for each day.
- Stableford Scoring: Automatic calculation of Stableford points based on net scores.
- Leaderboards: Live leaderboards for individuals, doubles, and four-player teams.
- PDF Certificates: Generate and download achievement certificates for players and teams.
- Authentication: Simple password-protected login.
- Data Persistence: All data stored in a SQLite database.
- Responsive UI: Mobile-friendly HTML/CSS templates.
- Containerized: Ready for deployment with Podman or Docker.
| Player Name | Handicap Index |
|---|---|
| Andy P | 10.4 |
| Joe B | 13.3 |
| Mark A | 9.9 |
| Michael D | 11.4 |
| Steve R | 19.8 |
| John L | 22.0 |
| Mark H | 27.0 |
| Ray H | 25.1 |
| Team | Player 1 | Player 2 |
|---|---|---|
| 1 | Andy P | Mark H |
| 2 | Joe B | John L |
| 3 | Michael D | Steve R |
| 4 | Mark A | Ray D |
| Team | Player 1 | Player 2 | Player 3 | Player 4 |
|---|---|---|---|---|
| A | Andy P | Mark H | Michael D | Ray D |
| B | Mark A | Joe B | John L | Steve R |
| Day | Course |
|---|---|
| 1 | Pasha |
| 2 | Nobilis |
| 3 | Sultan |
| 4 | Lykia |
| 5 | Sultan |
| 6 | Pasha |
- Backend: Python 3, Flask, Flask-SQLAlchemy, Flask-Migrate
- Frontend: HTML, CSS, JavaScript (with jsPDF and html2canvas for PDF export)
- Database: SQLite
- Containerization: Podman (or Docker) with
podman-compose - PDF Generation: reportlab (for backend), jsPDF/html2canvas (for frontend)
git clone https://github.com/yourusername/golf.git
cd golfpip install -r requirements.txtflask db upgradeflask runOr with Gunicorn (recommended for production):
gunicorn --bind 0.0.0.0:8585 app:appOpen your browser to http://localhost:5000 or the port you specified.
- Use the provided
Dockerfileandpodman-compose.ymlfor containerized deployment.
podman-compose build --no-cache
podman-compose up -d- The app will be available on port 8585 by default.
- Data is persisted in the
golf_datavolume.
- Players, teams, and courses: Update via the database or admin scripts.
- Course schedule: Edit
COURSE_MAPinapp.py. - Team assignments: Edit
doubles_teamsandfour_teamsintemplates/leaderboard.html. - Course/hole data: Seeded via
entrypoint.shand migrations. - App password: Set
APP_PASSWORDenv variable (default:golfer123). - Secret key: Set
SECRET_KEYenv variable (default:devkey).
See Documentation/input.md for details on updating players, teams, and course details.
MIT License
- For requirements and implementation details, see
Documentation/golf_trip_requirements.md.