SpringTasker is a task management application built using Spring Boot and Kotlin. It supports both session-based authentication with CSRF protection for form-based logins and JWT-based authentication for API access. The application leverages H2 Database for persistence and follows clean, modular design principles for efficient task management.
- Session-based login/logout for UI users
- JWT-based authentication for API clients
- Create, edit, and delete tasks
- Mark tasks as completed
- Set priority levels (Low, Medium, High)
- CSRF protection for form logins
- Stateless JWT-based authentication for APIs
- Kotlin: Primary language
- Spring Boot: Framework for rapid development
- Spring Security: Authentication and authorization
- JWT (JSON Web Token): Secure API authentication
- H2 Database: Lightweight, embedded database
- Thymeleaf: Server-side template engine for UI
- Gradle: Build tool for dependency management
Endpoint | Authentication Method | Notes |
---|---|---|
/login , /register |
Session-based with CSRF protection | For UI users |
/api/auth/* |
JWT-based Authentication | For API clients |
/logout |
Invalidates session and JWT | Supports both methods |
- JDK 17 or higher
- Gradle installed
- Your favorite IDE (IntelliJ IDEA recommended)
- Clone the repository:
git clone https://github.com/iNoles/SpringTasker.git cd SpringTasker
- Build the project:
./gradlew build
- Run the application:
./gradlew bootRun
- Open your browser and navigate to:
http://localhost:8080
Method | Endpoint | Description |
---|---|---|
POST | /api/auth/login |
Login and receive JWT token |
POST | /api/auth/register |
Register a new user |
POST | /api/auth/logout |
Invalidate JWT token |
Method | Endpoint | Description |
---|---|---|
GET | /api/tasks/ |
Get all tasks by current user |
POST | /api/tasks/add |
Add a new task |
PUT | /api/tasks/{id} |
Update a task |
DELETE | /api/tasks/{id} |
Delete a task |
Here’s what’s coming next:
- Deployment
- Deploy the project on a public site for easy access
- Database Integration
- Upgrade from H2 to a production-grade database (PostgreSQL or MySQL)
This project is a work in progress, and contributions are welcome! Feel free to:
- Submit issues for bugs or feature suggestions
- Open pull requests to contribute directly