https://github.com/inoles/springtasker
task management app built with Spring Boot, Kotlin, and H2 database, featuring CRUD operations
https://github.com/inoles/springtasker
backend crud h2-database jwt kotlin spring-boot spring-security spring-security-jwt sprintboot task-management web-development
Last synced: 3 months ago
JSON representation
task management app built with Spring Boot, Kotlin, and H2 database, featuring CRUD operations
- Host: GitHub
- URL: https://github.com/inoles/springtasker
- Owner: iNoles
- License: gpl-3.0
- Created: 2024-12-22T19:25:34.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-25T01:35:23.000Z (4 months ago)
- Last Synced: 2025-01-25T02:24:09.501Z (4 months ago)
- Topics: backend, crud, h2-database, jwt, kotlin, spring-boot, spring-security, spring-security-jwt, sprintboot, task-management, web-development
- Language: Kotlin
- Homepage:
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpringTasker - Spring Boot & Kotlin π
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.
## Features π
### User Authentication & Authorization
- Session-based login/logout for UI users
- JWT-based authentication for API clients### Managing Tasks
- Create, edit, and delete tasks
- Mark tasks as completed
- Set priority levels (Low, Medium, High)### Security Enhancements
- CSRF protection for form logins
- Stateless JWT-based authentication for APIs## Technologies Used π οΈ
- **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## Authentication Methods π
| 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 |## Getting Started π‘
### Prerequisites
- JDK 17 or higher
- Gradle installed
- Your favorite IDE (IntelliJ IDEA recommended)### Running the Application
1. Clone the repository:
```bash
git clone https://github.com/iNoles/SpringTasker.git
cd SpringTasker
```
2. Build the project:
```bash
./gradlew build
```
3. Run the application:```bash
./gradlew bootRun
```4. Open your browser and navigate to:
```arduino
http://localhost:8080
```## API Endpoints π‘
### Authentication
| 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 |### Task Management
| 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 |## Roadmap π€οΈ
Hereβs whatβs coming next:
1. Deployment
- Deploy the project on a public site for easy access
2. Database Integration
- Upgrade from H2 to a production-grade database (PostgreSQL or MySQL)## Contributions π€
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