A full-stack task management application built with Spring Boot, PostgreSQL, and a lightweight HTML/CSS/JavaScript dashboard. Users can register, sign in, and manage tasks that they create or are assigned to them.
- User registration with BCrypt-hashed passwords
- HTTP Basic authentication with stateless security
- Create, view, update, and delete tasks
- Task fields for title, description, priority, and due date
- Ownership-aware access control
- Users can view tasks they created or that are assigned to them.
- Users can edit or delete only tasks they created.
- Admins can edit or delete any task and assign tasks to other users.
- Browser dashboard with task search, statistics, and task forms
- Java 21
- Spring Boot 4.0.3
- Spring Web MVC, Spring Data JPA, Spring Security
- PostgreSQL
- Lombok
- HTML, CSS, and vanilla JavaScript
- JDK 21
- PostgreSQL
- A database for the application
The application reads its database settings from environment variables:
| Variable | Example |
|---|---|
DB_URL |
jdbc:postgresql://localhost:5432/task_manager |
DB_USERNAME |
postgres |
DB_PASSWORD |
your-password |
$env:DB_URL = "jdbc:postgresql://localhost:5432/task_manager"
$env:DB_USERNAME = "postgres"
$env:DB_PASSWORD = "your-password"Hibernate creates or updates the required tables on startup (spring.jpa.hibernate.ddl-auto=update).
From the project root:
.\mvnw.cmd spring-boot:runOpen http://localhost:8080 in a browser. Register an account, then sign in to open the dashboard.
To run tests:
.\mvnw.cmd testAll task endpoints require HTTP Basic authentication. The dashboard handles this automatically after login.
POST /register
Content-Type: application/json{
"username": "alex",
"password": "change-me"
}Newly registered users receive the USER role.
| Method | Endpoint | Description |
|---|---|---|
GET |
/task |
List tasks visible to the signed-in user |
GET |
/task/{id} |
Get one visible task |
POST |
/task |
Create a task |
PUT |
/task/{id} |
Update a task the user can modify |
DELETE |
/task/{id} |
Delete a task the user can modify |
Example task request:
{
"title": "Prepare project demo",
"description": "Finish slides and test the task flow.",
"priority": "High",
"dueDate": "2026-08-01",
"assignedUsername": "alex"
}assignedUsername is applied only for admins. A normal user's new tasks are automatically assigned to that user.
- An admin can assign a task to another user.
- A user can see tasks they created and tasks assigned to them.
- A user can update or delete only tasks they created.
- The current project has no task status, completion, or work-update feature. An assigned user cannot mark an admin-created task as completed yet.
- An admin can update or delete any task, but the current list endpoint shows only tasks the admin created or is assigned to.
src/
|-- main/
| |-- java/.../
| | |-- controller/ # REST endpoints
| | |-- service/ # task and user rules
| | |-- Repository/ # JPA repositories
| | |-- model/ # Task, user, and Role entities
| | |-- dto/ # request and response models
| | `-- configration/ # Spring Security configuration
| `-- resources/
| |-- static/ # login and dashboard UI
| `-- application.properties
`-- test/
- The initial public registration flow creates only
USERaccounts. Create anADMINaccount separately if you need admin-only assignment and management capabilities. - Never commit database credentials. Keep them in environment variables as shown above.