This is a simple task management web application built with Spring Boot and Thymeleaf. It includes a user interface for adding and completing tasks.
- Java 21+ (see instructions below for installation and setting JAVA_HOME on macOS)
- Gradle
- Node.js 23.7.0
- npm 10.2.4+ (for running end-to-end tests)
- 
Install Homebrew if you don't have it. 
- 
Install OpenJDK 21: brew install openjdk@21 
- 
Add Java to your PATH and set JAVA_HOME (add these lines to your ~/.zshrc or ~/.bash_profile): export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH" export JAVA_HOME="/opt/homebrew/opt/openjdk@21" Then reload your shell: source ~/.zshrc # or source ~/.bash_profile 
- 
Verify installation: java -version echo $JAVA_HOME 
- 
Clone the repository: git clone <repository-url> cd task-manager 
- 
Build the project: ./gradlew build 
- 
Run the application: ./gradlew bootRun 
- 
Open your browser and visit: http://localhost:8080
To run all unit tests:
./gradlew testThis project uses Playwright for end-to-end browser testing. Follow these steps to set up and use Playwright with VS Code integration.
- Node.js and npm (see Requirements above)
- VS Code
In the tests directory, run:
npm install
npx playwright install- Open VS Code
- Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
- Search for "Playwright Test for VSCode"
- Install the extension by Microsoft (ms-playwright.playwright)
For advanced test authoring with Model Context Protocol (MCP):
- Open VS Code
- Go to Extensions
- Search for "Copilot MCP"
- Install the extension by Automata Labs (automatalabs.copilot-mcp)
- Press Command+Shift+P in VS Code
- Type shell command
- Select Install 'code' command in PATH
Run in your terminal:
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'You must now run the MCP server manually in a separate terminal:
cd tests
npx @playwright/mcp@latestNote: The MCP server will not start automatically. Always start it manually before running Playwright tests.
To run all Playwright tests:
cd tests
npm testTo run tests with UI mode (for debugging):
cd tests
npm run test:uiTo run a specific test file:
cd tests
npx playwright test e2e/garfield-search.spec.tsFor more on developing new end-to-end tests, see the MCP Test Development Guide.
- Task– The model representing a single task.
- TaskRepository– A simple repository using- JdbcTemplatefor data access.
- TaskService– The service layer for managing task logic.
- TaskController– Handles web requests and renders the Thymeleaf UI.
- TaskRestController– REST API endpoints for task management (API version).
- templates/tasks.html– The Thymeleaf front-end.
- static/style.css– Styling for the UI.
- src/test/– Unit and integration tests for the Spring Boot application.
- tests/– End-to-end tests using Playwright:- e2e/– Contains the Playwright test files (- .spec.ts)
- playwright.config.ts– Configuration for Playwright tests
- mcp-client.js– Example MCP client for test development
 
- Task data is stored in an embedded H2 in-memory database.
- H2 is pulled automatically by Gradle, there is no need to install it manually.
- Tables are created automatically on startup.
- You can view the H2 console at http://localhost:8080/h2-console.