This is a sample repository for GitHub Copilot Workshop.
Using the files in this repository, we created a fully functional Pomodoro Timer Web Application using Python (Flask), JavaScript, HTML, and CSS.
A production-ready Pomodoro Timer web application that helps you stay focused and productive using the Pomodoro Technique. The app features:
- β±οΈ 25-minute work sessions with short and long breaks
- π Session tracking with visual progress indicators
- βοΈ Customizable timers for work and break durations
- π Automatic logging of all sessions
- π Browser notifications when sessions complete
- π± Responsive design that works on all devices
- Architecture - System design and technical architecture
- Implementation Summary - Detailed development progress and features
- Pomodoro App README - Application-specific documentation
- Development Plan - Original project plan and requirements
- Pomodoro Technique Guide - Learn about the productivity method
You need to have uv installed for this project.
uv is an extremely fast Python package and project manager, written in Rust. Install it using one of these methods:
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Or visit the official installation guide for more options.
-
Clone the repository:
git clone https://github.com/eComindo/2025-github-ur-copilot-workshop.git cd 2025-github-ur-copilot-workshop -
Create and activate virtual environment:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
uv pip install -r requirements.txt
-
Run the application:
cd pomodoro_app python app.py -
Open your browser: Navigate to
http://127.0.0.1:5000
When you're done working:
deactivate2025-github-ur-copilot-workshop/
βββ pomodoro_app/ # Main application directory
β βββ app.py # Flask backend server
β βββ static/ # CSS and JavaScript files
β β βββ style.css # Application styling
β β βββ timer.js # Timer logic and UI interactions
β βββ templates/ # HTML templates
β β βββ index.html # Main application page
β βββ test_app.py # Test suite
β βββ pomodoro_log.txt # Session logs (generated)
β βββ README.md # App-specific documentation
βββ wsgi.py # WSGI entry point for production
βββ startup.txt # Azure deployment startup command
βββ requirements.txt # Python dependencies
βββ architecture.md # Technical architecture
βββ IMPLEMENTATION_SUMMARY.md # Development summary
βββ README.md # This file
The project uses the following Python packages:
- Flask 3.1.2 - Web framework
- gunicorn 21.2.0 - Production WSGI server
- requests 2.32.5 - HTTP library for testing
- pytest 9.0.1 - Testing framework
- pytest-cov 7.0.0 - Code coverage plugin for pytest
- pytest-flask 1.3.0 - Flask-specific pytest utilities
- Accurate countdown timer with pause/resume
- Automatic transitions between work and break sessions
- Visual progress tracking through 4-session cycles
- Skip to next session option
- Modern, clean interface
- Responsive design for mobile and desktop
- Customizable session durations
- Persistent settings using localStorage
- Browser notifications
- Automatic session logging to file
- Timestamped entries for all events
- Session history API endpoint
- Completion vs. skip tracking
The application is deployed on Azure App Service using:
- WSGI server: Gunicorn
- Configuration: See
wsgi.pyandstartup.txt - Environment: Production-ready Flask configuration
# Check session history
curl http://pomodoro-timer-ecomindo-1763110994.azurewebsites.net/historyThe project includes comprehensive unit tests for all Flask routes and functionality. Tests are located in pomodoro_app/test_pomodoro.py with 19 test cases achieving 93% code coverage.
Run all tests:
cd pomodoro_app
uv run pytest test_pomodoro.py -vRun tests with coverage report (terminal):
cd pomodoro_app
uv run pytest test_pomodoro.py --cov=app --cov-report=term-missingRun tests with HTML coverage report:
cd pomodoro_app
uv run pytest test_pomodoro.py --cov=app --cov-report=htmlThis generates an HTML coverage report in htmlcov/index.html that you can open in your browser to see detailed line-by-line coverage.
Run specific test classes:
# Test only the index route
uv run pytest test_pomodoro.py::TestIndexRoute -v
# Test only logging functionality
uv run pytest test_pomodoro.py::TestLogSessionRoute -v
# Test only history functionality
uv run pytest test_pomodoro.py::TestHistoryRoute -v
# Test error handling
uv run pytest test_pomodoro.py::TestErrorHandling -vRun tests with extra verbose output:
uv run pytest test_pomodoro.py -vvAll 19 tests pass with 93% code coverage:
================================================= 19 passed in 0.26s ==================================================
Name Stmts Miss Cover Missing
--------------------------------------
app.py 41 3 93% 66-68
--------------------------------------
The unit tests cover:
- β Index Route - Homepage rendering and status codes
- β Session Logging - All session types (work, short break, long break)
- β Multiple Session Types - Completed vs. skipped sessions
- β Default Values - Handling of missing optional parameters
- β History Retrieval - Empty logs, populated logs, malformed entries
- β Log File Format - Entry structure and append behavior
- β Error Handling - Invalid JSON, file permissions, exceptions
- β Data Integrity - Correct parsing and structure of log entries
The app runs in debug mode by default during local development:
python app.pyThis project was built as part of a GitHub Copilot workshop. Feel free to:
- Fork the repository
- Create feature branches
- Submit pull requests
- Open issues for bugs or enhancements
This project demonstrates:
- Flask web development with modern Python
- Frontend-backend integration using AJAX
- Session management and logging
- Responsive web design with CSS
- Production deployment to Azure
- Test-driven development practices
This project is open source and available for educational purposes.